[Coin-discuss] Making Bcp - Solaris

Tommy Thomadsen tt at imm.dtu.dk
Mon Mar 17 05:10:34 EST 2003


Thank you for the answer!

g++ 2.95.2 is the default compiler on the sun machine I am using but
2.95.3 and 3.0.4 are also available. Using the two last mentioned I get
various linking and "include files not found" errors not due to coin.
Anyway I was hoping to be able to use the default compiler but I guess I
cannot avoid fighting the above mentioned errors.

I did manage to compile files using 2.95.3 but I cannot link. I think it
has something to do with static/dynamic linking. I get the error shown
below. Does coin require libstdc++.so? It exists on the linux machine I
managed to compile on, but it is not on the sun machine. (I am guessing
here..)


/Tommy


Creating library libCoin-O.so
Text relocation remains                 	referenced
    against symbol		    offset	in file
<unknown>                           0x7c4
/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/libstdc++.a(iovfprintf.o)
<unknown>                           0x7c8
/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/libstdc++.a(iovfprintf.o)

...

_IO_init                            0x2b0
/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/libstdc++.a(streambuf.o)
ld: fatal: relocations remain against allocatable but non-writable
sections
collect2: ld returned 1 exit status


> I can't think of anything else than that the error is in g++-2.95.2 itself. I
> know it's a fairly bold statement, but I just checked the code out and tried
> to compile it on Solaris 8 with gcc 2.95.3 and I had no problems. Here are my
> first few lines and the environment:
> 
> gridsun1:~/COIN$ uname -a
> SunOS gridsun1 5.8 Generic_108528-13 sun4u sparc SUNW,Sun-Blade-100
> gridsun1:~/COIN$ g++ -v
> Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs
> gcc version 2.95.3 20010315 (release)
> 
> (cd ../../Osi/OsiClp && make install)
> make[1]: Entering directory `/home/ladanyi/COIN/Osi/OsiClp'
> (cd /home/ladanyi/COIN/Clp && make install)
> make[2]: Entering directory `/home/ladanyi/COIN/Clp'
> (cd /home/ladanyi/COIN/Coin && make install)
> make[3]: Entering directory `/home/ladanyi/COIN/Coin'
> make -f /home/ladanyi/COIN/Makefiles/Makefile.lib install
> make[4]: Entering directory `/home/ladanyi/COIN/Coin'
> 
> Compiling CoinFactorization1.cpp
> g++ -I- -fPIC -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wwrite-str\
> ings -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -pi\
> pe -O6 -Iinclude   -c CoinFactorization1.cpp -o SunOS-O/CoinFactorization1.o
> 
> Compiling CoinFactorization2.cpp
> 
> 
> I'd suggest to upgrade to a newer g++, try it again and let us know if it
> still doesn't work. Both 2.95.3 and 3.2.2 should work.
> 
> --Laci
> 
> 
> On Fri, 14 Mar 2003, Tommy Thomadsen wrote:
> 
> > Hi,
> > 
> > I am trying to make the MaxCut example but can't seem to make it work
> > using Solaris 8 and gcc 2.95.2. (I did suceed using Linux.) 
> > 
> > First lines of error message included below (in total it is ~500 lines). 
> > 
> > I am not sure this is (only) a COIN problem so I looked for a solution in
> > c++ newsgroup. When the same error shows up it is suggested that the
> > compiler "thinks" it is compiling c code due to gcc being used instead of
> > g++. So I found the command issued by make (using make -n) and g++ _is_
> > used. The command is:
> > 
> > g++ -I- -fPIC -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual
> > -Wwrite-strings -Wconversion -Wstrict-prototypes -Wmissing-prototypes
> > -Wnested-externs -pipe -O6 -Iinclude   -c CoinFactorization1.cpp -o
> > SunOS-O/CoinFactorization1.o
> > 
> > Issuing the command manually gives the same error.
> > 
> > Any suggestions?
> > 
> > Thank you!
> > 
> > Tommy
> > 
> > gmake -f /home3/tt/COIN/Makefiles/Makefile.lib install
> > gmake[1]: Entering directory `/home3/tt/COIN/Coin'
> > 
> > Compiling CoinFactorization1.cpp
> > In file included from /usr/unic/share/gcc/2.95.2/include/g++-3/alloc.h:21,
> >                  from
> > /usr/unic/share/gcc/2.95.2/include/g++-3/std/bastring.h:39,
> >                  from /usr/unic/share/gcc/2.95.2/include/g++-3/string:6,
> >                  from include/CoinFactorization.hpp:14,
> >                  from CoinFactorization1.cpp:10:
> > /usr/unic/share/gcc/2.95.2/include/g++-3/stl_alloc.h:142: template with C
> > linkage
> > /usr/unic/share/gcc/2.95.2/include/g++-3/stl_alloc.h:224: template with C
> > linkage
> > /usr/unic/share/gcc/2.95.2/include/g++-3/stl_alloc.h:243: template with C
> > linkage
> > /usr/unic/share/gcc/2.95.2/include/g++-3/stl_alloc.h:320: template with C
> > linkage
> > 
> > ....
> > 
> > _______________________________________________
> > Coin-discuss mailing list
> > Coin-discuss at www-124.ibm.com
> > http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss
> > 
> 
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at www-124.ibm.com
> http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss
> 




More information about the Coin-discuss mailing list