rm static libraries before rebuilding

Поиск
Список
Период
Сортировка
Искать

rm static libraries before rebuilding

От:
Noah Misch <noah@leadboat.com>
Дата:
Вложения:
We build static libraries with "ar crs" or "ar cr".  If the static library
already exists in the build directory, those commands will add new members and
replace existing members.  They will not remove members present in the
existing library but not named on the "ar" command line.  This matters when,
for example, you rerun ./configure in a way that removes a file from
$(LIBOBJS).  libpgport carries the obsolete member until "make clean".  Let's
fix that by issuing "rm -f" before running $(AR).  I would back-patch this.

Re: rm static libraries before rebuilding

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Noah Misch  writes:
> We build static libraries with "ar crs" or "ar cr".  If the static library
> already exists in the build directory, those commands will add new members and
> replace existing members.  They will not remove members present in the
> existing library but not named on the "ar" command line.  This matters when,
> for example, you rerun ./configure in a way that removes a file from
> $(LIBOBJS).  libpgport carries the obsolete member until "make clean".  Let's
> fix that by issuing "rm -f" before running $(AR).  I would back-patch this.

+1 ... I doubt anybody's thought about this.
		regards, tom lane


Re: rm static libraries before rebuilding

От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
Noah Misch wrote:
> We build static libraries with "ar crs" or "ar cr".  If the static library
> already exists in the build directory, those commands will add new members and
> replace existing members.  They will not remove members present in the
> existing library but not named on the "ar" command line.  This matters when,
> for example, you rerun ./configure in a way that removes a file from
> $(LIBOBJS).  libpgport carries the obsolete member until "make clean".  Let's
> fix that by issuing "rm -f" before running $(AR).  I would back-patch this.

+1 -- I was (as I expect many were) bitten by this recently.


-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


FAQ