[sr #111196] Linking a static convenience library with fat objects fails if output already exists

Ileana Dumitrescu <[email protected]> Tue, 25 Feb 2025 15:32:51 -0500 (EST)
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <[email protected]>
--8323329-1970643730-1740515571=:2285183
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline

Follow-up Comment #1, sr #111196 (group libtool):=0A=0AThank you for your b=
ug report.=0A=0AI was able to reproduce this issue, but I do not think it i=
s something that=0Aneeds an update in libtool. Instead, you should execute =
a libtool clean=0Abetween subsequent builds, similarly to just removing the=
 output archive.=0A=0A$LIBTOOL --mode=3Dcompile --tag=3DCC $CC -c -o foo.lo=
 $CPPFLAGS $CFLAGS -arch=0Ax86_64 -arch arm64 foo.c=0Alibtool: compile:  gc=
c -c -Wall -g -O2 -arch x86_64 -arch arm64 foo.c=0A-fno-common -DPIC -o .li=
bs/foo.o=0Alibtool: compile:  gcc -c -Wall -g -O2 -arch x86_64 -arch arm64 =
foo.c -o foo.o=0A>/dev/null 2>&1=0A=0A$LIBTOOL --mode=3Dlink --tag=3DCC  $C=
C -static $CPPFLAGS $CFLAGS -o libfoo.a=0Afoo.lo=0Alibtool: link: ar cr lib=
foo.a  foo.o=0Alibtool: link: ranlib libfoo.a=0A=0A$LIBTOOL --mode=3Dclean =
rm -f libfoo.a=0Alibtool: clean: rm -f libfoo.a=0Alibtool: clean: rmdir .li=
bs >/dev/null 2>&1=0A=0A$LIBTOOL --mode=3Dcompile --tag=3DCC $CC -c -o foo.=
lo $CPPFLAGS $CFLAGS -arch=0Ax86_64 -arch arm64 foo.c=0Alibtool: compile:  =
gcc -c -Wall -g -O2 -arch x86_64 -arch arm64 foo.c=0A-fno-common -DPIC -o .=
libs/foo.o=0Alibtool: compile:  gcc -c -Wall -g -O2 -arch x86_64 -arch arm6=
4 foo.c -o foo.o=0A>/dev/null 2>&1=0A=0A$LIBTOOL --mode=3Dlink --tag=3DCC  =
$CC -static $CPPFLAGS $CFLAGS -o libfoo.a=0Afoo.lo=0Alibtool: link: ar cr l=
ibfoo.a  foo.o=0Alibtool: link: ranlib libfoo.a=0A=0A=0A=0A=0A    _________=
______________________________________________=0A=0AReply to this item at:=
=0A=0A  <https://savannah.gnu.org/support/?111196>=0A=0A___________________=
____________________________=0AMessage sent via Savannah=0Ahttps://savannah=
.gnu.org/=0A
--8323329-1970643730-1740515571=:2285183
Content-Type: APPLICATION/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCZ74o8wAKCRCqLAuaBUf3
TqfiAQC92igNrAQL4N2uo9awxl1aA1CKyA7Hk8ZCARopr4IWOwD9E40+FTdViG/W
pTPEPU2jSvsOjKpp5dqiNBSZ0IcJngo=
=s35l
-----END PGP SIGNATURE-----

--8323329-1970643730-1740515571=:2285183--