[sldev] Why is scons ignoring the configured compiler for linking?

Dale Glass dale at daleglass.net
Fri Jun 29 14:11:45 PDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi, I'm having a problem building 17.2 here.

I run a 64 bit Gentoo box, but build the viewer as a 32 bit binary to
get sound.

My only changes to SConstruct are removing -Werror (build fails on
gcc4), and changing gcc_bin to g++32.

Problem: scons ignores the chosen compiler when linking.

This worked perfectly fine before, but now I've got a pretty strange
problem. The build goes like this:

g++32 -g -pipe -Wall -Wno-trigraphs -Wno-sign-compare -falign-loops=16
- -fno-math-errno -fexceptions -fsigned-char -fno-strict-aliasing
- -ffast-math -DLL_MESA_HEADLESS=0 -DLL_MESA=0 -DLL_LINUX=1
- -DAPPID=secondlife -DLL_SDL=1 -DLL_X11=1 -DLL_GTK=1
- -DLL_LIBXUL_ENABLED=1 -DNDEBUG -DLL_RELEASE=1 -Illcommon -Illmath
- -Illwindow -Illaudio -Illcharacter -Illdatabase -Illhavok -Illimage
- -Illinventory -Illmedia -Illmessage -Illprimitive -Illrender -Illscene
- -Illui -Illvfs -Illwindow -Illxml -Ilscript
- -I/home/dale/svk/buildfixes/libraries/include
- -I/home/dale/svk/buildfixes/libraries/include/havok
- -I/home/dale/svk/buildfixes/libraries/i686-linux/include
- -I/home/dale/svk/buildfixes/libraries/i686-linux/include/ELFIO
- -I/home/dale/svk/buildfixes/libraries/i686-linux/include/atk-1.0
- -I/home/dale/svk/buildfixes/libraries/i686-linux/include/glib-2.0
- -I/home/dale/svk/buildfixes/libraries/i686-linux/include/gtk-2.0
- -I/home/dale/svk/buildfixes/libraries/i686-linux/include/llfreetype2
- -I/home/dale/svk/buildfixes/libraries/i686-linux/include/pango-1.0 -c
- -o
/home/dale/tmp/home/dale/svk/buildfixes/indra/i686-linux-client-releasenoopt/llui/llviewquery.o
/home/dale/tmp/home/dale/svk/buildfixes/indra/i686-linux-client-releasenoopt/llui/llviewquery.cpp

gcc --no-keep-memory --reduce-memory-overheads -shared -o
lib_releasenoopt_client/i686-linux/libllkdu.so
- -Llib_releasenoopt_client/i686-linux
- -L/home/dale/svk/buildfixes/libraries/i686-linux/lib_release_client
- -lllimage -lllvfs -lllmath -lllcommon -lapr-1 -lkdu_v42R
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld:
skipping incompatible lib_releasenoopt_client/i686-linux/libllimage.so
when searching for -lllimage
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld:
skipping incompatible lib_releasenoopt_client/i686-linux/libllimage.a
when searching for -lllimage
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld:
cannot find -lllimage
collect2: ld returned 1 exit status
scons: *** [lib_releasenoopt_client/i686-linux/libllkdu.so] Error 1
scons: building terminated because of errors.


Notice the "gcc --no-keep-memory" one. But "gcc" doesn't appear
*anywhere* in SConstruct. Not only that, but it should be calling
g++32, as that's what gcc_bin is set to:
    gcc_bin = 'g++32'

    # some code snipped

    compiler = gcc_bin
    compiler_no_distcc = compiler
    if enable_distcc:
        compiler = 'distcc ' + gcc_bin

    # some code snipped

    base_env = Environment(CXX = compiler,
            CPPPATH = include_dirs,
            LIBPATH = lib_path,
            LINKFLAGS = system_link_flags + '--no-keep-memory
- --reduce-memory-overheads ' )




As an alternative to setting the compiler, building a 32 bit binary
can be easily done by adding a -m32 argument to GCC, which finally got
the thing to build properly.


Anybody knows why is it it ignoring the chosen compiler there?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGhXWKqzdyv8vqDKgRCkQiAKCMZvX6aROhUGXK9X8p8xFYZPPU2QCfaosW
bakRMjtsVo9ezDFrA9qGzgI=
=fCg5
-----END PGP SIGNATURE-----



More information about the SLDev mailing list