On Aug 22 17:43:28, h...@stare.cz wrote: > > > > Is it because of the _order_ of the -L options? > > Seems so: > > cc -g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes > -Wstrict-prototypes -fstack-protector-strong -Wl,--as-needed -o .libs/sox > sox.o -L/usr/local/lib -L./.libs -lsox -lpng -lltdl -lao -lgsm -lid3tag -lz > -lmad -lmp3lame -ltwolame -lopusfile -lopus -lsndio -lvorbisfile -lwavpack > -lcrypto -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lm > -Wl,-rpath,/home/hans/lib -Wl,-rpath,/usr/local/lib > > fails, but > > cc -g -O2 -fstack-protector-strong -Wall -Wmissing-prototypes > -Wstrict-prototypes -fstack-protector-strong -Wl,--as-needed -o .libs/sox > sox.o -L./.libs -lsox -L/usr/local/lib -lpng -lltdl -lao -lgsm -lid3tag -lz > -lmad -lmp3lame -ltwolame -lopusfile -lopus -lsndio -lvorbisfile -lwavpack > -lcrypto -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lm > -Wl,-rpath,/home/hans/lib -Wl,-rpath,/usr/local/lib > > succeeds. The only difference between the two is the -L order, namely, > > cc [...] -o .libs/sox sox.o -L/usr/local/lib -L./.libs -lsox -lpng [...] > cc [...] -o .libs/sox sox.o -L./.libs -lsox -L/usr/local/lib -lpng [...]
This (fail vs succeed) is the case for each of the following: OpenBSD clang version 10.0.1 egcc (GCC) 8.3.0 gcc (GCC) 4.2.1 _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel