On Wednesday, 18 September 2013 at 07:09:27 UTC, eles wrote:
import os env = Environment(ENV = os.environ)
gcc -o test01 -m32 test01.o -L/usr/lib -lphobos2 -lpthread -lm
Related, why the scons is passing the -L/usr/lib to the gcc, while the LD_LIBRARY_PATH variable of my bash shell is rather: /opt/gdc-4.9/lib/../lib64 This provides a bad version of lib(g)phobos.a. The verbose invocation of gcc (no -L parameter), that is: gcc -v -o test01 -m64 test01.o -lgphobos2 -lpthread -lm correctly specifies: LIBRARY_PATH=/opt/gdc-4.9/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/:/opt/gdc-4.9/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../lib64/:/lib/x86_64-linux-gnu/:/lib/../lib64/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib64/:/opt/gdc-4.9/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../:/lib/:/usr/lib/ and finds the libgphobos.a from: /opt/gdc-4.9/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../lib64/ which, indeed, is the correct version. Note that I have two installations of gdc, but the PATH of /opt/gdc-4.9/bin preceded the /usr/bin: $ which -a gcc /opt/gdc-4.9/bin/gcc /usr/bin/gcc
