> Alright. Thanks very much to everyone for their input so far; now I (sort > of) know what to look for. I have no control over the server's > configuration, only my makefile, and this server is brand new to me. As it > stands, the situation is pretty grim. Ready? > > sol:~/graphics>where gcc > /opt/csw/gcc4/bin/gcc > /usr/sfw/bin/gcc > /global/apps/bin/gcc > /usr/local/bin/gcc > > sol:~/graphics>which gcc > /opt/csw/gcc4/bin/gcc > > sol:~/graphics>/opt/csw/gcc4/bin/gcc --version | head -1 > gcc (GCC) 4.3.3 > sol:~/graphics>/usr/sfw/bin/gcc --version | head -1 > gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath) > sol:~/graphics>/global/apps/bin/gcc --version | head -1 > gcc (GCC) 3.4.2 > sol:~/graphics>/usr/local/bin/gcc --version | head -1 > gcc (GCC) 3.4.6 > > sol:~/graphics>where g++ > /opt/csw/gcc4/bin/g++ > /usr/sfw/bin/g++ > /global/apps/bin/g++ > /usr/local/bin/g++ > > sol:~/graphics>which g++ > /opt/csw/gcc4/bin/g++ > > sol:~/graphics>/opt/csw/gcc4/bin/g++ --version | head -1 > g++ (GCC) 4.3.3 > sol:~/graphics>/usr/sfw/bin/g++ --version | head -1 > g++ (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath) > sol:~/graphics>/global/apps/bin/g++ --version | head -1 > g++ (GCC) 3.4.2 > sol:~/graphics>/usr/local/bin/g++ --version | head -1 > g++ (GCC) 3.4.6 > > sol:~/graphics>where ld > /usr/ucb/ld > /usr/ccs/bin/ld > /usr/ucb/ld > > sol:~/graphics>which ld > /usr/ucb/ld > > sol:~/graphics>/usr/ucb/ld -V > ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.489 > sol:~/graphics>/usr/ccs/bin/ld -V > ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.489 > > sol:~/graphics>where gld > /opt/csw/bin/gld > /usr/sfw/bin/gld > > sol:~/graphics>which gld > /opt/csw/bin/gld > > sol:~/graphics>/opt/csw/bin/gld -V | head -1 > GNU ld (GNU Binutils) 2.19 > sol:~/graphics>/usr/sfw/bin/gld -V | head -1 > GNU ld version 2.15 > > ...PHEW. So with that mess of multiple versions of nearly everything, it's > no wonder that I'm having linking problems. What versions of what should I > pick? And I know how to specify which compiler to use in my makefile, but > the makefile compiles things with no intermediary .o, so how do I tell the > compiler what default linker to use? > > Thanks again.
I'm not too sure how your environment is setup but I tend to stay very conservative in order to compile things that work. PATH=/opt/csw/gcc4/bin:/opt/csw/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/sbin:/bin:/usr/sbin:/usr/dt/bin:/usr/openwin/bin Note there are no bits in there from /usr/local or /usr/sfw or anywhere else. You will one GCC and only one in this way. Same goes for binutils at least on Solaris 10. CC=/opt/csw/gcc4/bin/gcc CPPFLAGS=-I/opt/csw/include CXX=/opt/csw/gcc4/bin/g++ You can specify thingss like that just to be pedantic. Certainly you are clear where you want the include files to be found. EDITOR=/usr/xpg4/bin/vi You don't have to do that. This is what I do .. but you can use vim or emacs or pico or whatever you like. LANG=C LC_ALL=C LC_MESSAGES=en_US.UTF-8 LD_OPTIONS=-R/opt/csw/lib/$ISALIST:/opt/csw/lib -L/opt/csw/lib/$ISALIST:/opt/csw/lib The LD_OPTIONS there is somewhat important because it will tell the final link stage where your binaries should be looking for dynamic libs. SHELL=/usr/xpg4/bin/sh No really ... I have that. Sometimes. :-) $ which gcc /opt/csw/gcc4/bin/gcc Having siad all this ... have you looked at Sun Studio 12 or 12 update 1 ? It does work a whole lot better you know. -- Dennis Clarke dcla...@opensolaris.ca <- Email related to the open source Solaris dcla...@blastwave.org <- Email related to open source for Solaris _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code