Re: default cflags to compile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 13 Dec 2005, Nuno Lopes mused:
On Mon, 12 Dec 2005, Nuno Lopes stipulated:
Update: I've tried to compile some sample sources, but linking has failed with:

Yeah, linking two libraries using incompatible versions of libstdc++
will be tricky, requiring linking against *both* copies using -Bgroup.
(It's best to experiment using little testbed shared libraries exporting
symbols of the same name, printing out different things from each shared
library, until you grasp how -Bgroup works. It can be counterintuitive.)

But I supposed that compiling it with proper -fabi-version would do the trick..

If you do that *and* point the libstdc++.so symlink to libstdc++.so.5, you
should be OK. (I didn't think of that. Oops.)
(...)
If you repoint the .so (no need to do anything with the .so.[56] files
themselves) and use the right -fabi-version, everything should just
work, I hope. (I didn't think of that, even though in hindsight it's
bloody obvious. Ah well. It's *much* more likely to work than messing
with -Bgroup.)


Hi again,

Many thanks for your help. I've been able to build a couple of programs and link them. (although I've not tested to run them yet, only tomorrow I'll have access to a mips machine). However not all programs are linking correctly. I've attached the errors I've got when building a Sony's example (http://mega.ist.utl.pt/~ncpl/openr_gcc4.txt).

I've built gcc 4.0.2 and replaced the mipsel-linux/lib/libstdc++.a/libstdc++.la/libsupc++.a/libsupc++.la with the ones generated by gcc 3.3.6.
What do I need to do now to make it link correctly?


Thanks in advance,
Nuno
for dir in MoNet MotionAgents SoundAgent MoNetTest ../PowerMonitor/PowerMonitor; do \
	(cd $dir && make INSTALLDIR=/socrob/aibo/sample/common/MoNet/MS all) \
done
make[1]: Entering directory `/socrob/aibo/sample/common/MoNet/MoNet'
/usr/local/OPEN_R_SDK/OPEN_R/bin/mkbin -p /usr/local/OPEN_R_SDK -o moNet.bin MoNetStub.o MoNet.o MoNetCommandInfo.o MoNetCommandInfoManager.o ../common/libODA/libODA.a ../common/libMTN/libMTN.a moNet.ocf -L/usr/local/OPEN_R_SDK/OPEN_R/lib -lObjectComm -lOPENR
MoNet.o: In function `_M_erase':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1160: undefined reference to `std::_List_node_base::unhook()'
MoNet.o: In function `_M_insert':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1153: undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
MoNet.o: In function `operator++':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:181: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
MoNet.o:/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1153: undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
MoNet.o: In function `_M_insert':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1153: undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
MoNet.o: In function `operator++':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:181: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
MoNet.o:/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:796: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
MoNet.o: In function `operator--':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:196: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
MoNet.o: In function `_M_insert_dispatch<std::_List_const_iterator<CommandArc> >':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1153: undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
MoNet.o:/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:796: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
MoNet.o: In function `operator--':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:196: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:196: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
MoNet.o: In function `operator++':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:181: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
MoNet.o:/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:796: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
MoNet.o: In function `_M_erase':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1160: undefined reference to `std::_List_node_base::unhook()'
MoNet.o: In function `_M_insert':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1153: undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
MoNet.o:/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1153: undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
MoNet.o: In function `erase':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:1033: undefined reference to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
MoNet.o: In function `PushBack':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1153: undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
MoNet.o: In function `_M_erase':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1160: undefined reference to `std::_List_node_base::unhook()'
MoNetCommandInfoManager.o: In function `_M_insert':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1153: undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
MoNetCommandInfoManager.o:/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:796: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
MoNetCommandInfoManager.o: In function `operator--':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:196: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:196: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
MoNetCommandInfoManager.o: In function `operator++':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_tree.h:181: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
collect2: ld returned 1 exit status
mkbin: running the following command failed(1, 0): /usr/local/OPEN_R_SDK/libexec/gcc/mipsel-linux/4.0.2/collect2 -o moNet.nosnap.elf -T /usr/local/OPEN_R_SDK/mipsel-linux/lib/ldscripts/elf32ltsmip.xbn -T /usr/local/OPEN_R_SDK/OPEN_R/ldscript/ldscript-defsym -e PrologueEntry /usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/crtbegin.o MoNetStub.o MoNet.o MoNetCommandInfo.o MoNetCommandInfoManager.o ../common/libODA/libODA.a ../common/libMTN/libMTN.a -L/usr/local/OPEN_R_SDK/OPEN_R/lib -lObjectComm -lOPENR -L/usr/local/OPEN_R_SDK/OPEN_R/lib -L/usr/local/OPEN_R_SDK/mipsel-linux/lib -lm --start-group -lstdc++ /usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/libgcc.a -lapsys -lOFSpub -lc- --end-group -lmcoopstub -lnosys /usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/libgcc.a /usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/crtend.o
make[1]: *** [moNet.bin] Error 9
make[1]: Leaving directory `/socrob/aibo/sample/common/MoNet/MoNet'
make[1]: Entering directory `/socrob/aibo/sample/common/MoNet/MotionAgents'
/usr/local/OPEN_R_SDK/OPEN_R/bin/mkbin -p /usr/local/OPEN_R_SDK -o motionAgents.bin MotionAgentsStub.o MotionAgents.o MoNetAgentManager.o MoNetAgent.o NeutralAgent.o NeutralAgent7.o MTNAgent.o MTNAgent7.o MTNWALKAgent7.o ../common/libODA/libODA.a ../common/libMTN/libMTN.a motionAgents.ocf -L/usr/local/OPEN_R_SDK/OPEN_R/lib -lObjectComm -lOPENR
MoNetAgentManager.o:/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1153: undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
collect2: ld returned 1 exit status
mkbin: running the following command failed(1, 0): /usr/local/OPEN_R_SDK/libexec/gcc/mipsel-linux/4.0.2/collect2 -o motionAgents.nosnap.elf -T /usr/local/OPEN_R_SDK/mipsel-linux/lib/ldscripts/elf32ltsmip.xbn -T /usr/local/OPEN_R_SDK/OPEN_R/ldscript/ldscript-defsym -e PrologueEntry /usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/crtbegin.o MotionAgentsStub.o MotionAgents.o MoNetAgentManager.o MoNetAgent.o NeutralAgent.o NeutralAgent7.o MTNAgent.o MTNAgent7.o MTNWALKAgent7.o ../common/libODA/libODA.a ../common/libMTN/libMTN.a -L/usr/local/OPEN_R_SDK/OPEN_R/lib -lObjectComm -lOPENR -L/usr/local/OPEN_R_SDK/OPEN_R/lib -L/usr/local/OPEN_R_SDK/mipsel-linux/lib -lm --start-group -lstdc++ /usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/libgcc.a -lapsys -lOFSpub -lc- --end-group -lmcoopstub -lnosys /usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/libgcc.a /usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/crtend.o
make[1]: *** [motionAgents.bin] Error 9
make[1]: Leaving directory `/socrob/aibo/sample/common/MoNet/MotionAgents'
make[1]: Entering directory `/socrob/aibo/sample/common/MoNet/SoundAgent'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/socrob/aibo/sample/common/MoNet/SoundAgent'
make[1]: Entering directory `/socrob/aibo/sample/common/MoNet/MoNetTest'
/usr/local/OPEN_R_SDK/OPEN_R/bin/mkbin -p /usr/local/OPEN_R_SDK -o moNetTest.bin MoNetTestStub.o MoNetTest.o moNetTest.ocf -L/usr/local/OPEN_R_SDK/OPEN_R/lib -lObjectComm -lOPENR
MoNetTest.o: In function `_M_insert':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1153: undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1153: undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
MoNetTest.o: In function `_M_erase':
/usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:1160: undefined reference to `std::_List_node_base::unhook()'
collect2: ld returned 1 exit status
mkbin: running the following command failed(1, 0): /usr/local/OPEN_R_SDK/libexec/gcc/mipsel-linux/4.0.2/collect2 -o moNetTest.nosnap.elf -T /usr/local/OPEN_R_SDK/mipsel-linux/lib/ldscripts/elf32ltsmip.xbn -T /usr/local/OPEN_R_SDK/OPEN_R/ldscript/ldscript-defsym -e PrologueEntry /usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/crtbegin.o MoNetTestStub.o MoNetTest.o -L/usr/local/OPEN_R_SDK/OPEN_R/lib -lObjectComm -lOPENR -L/usr/local/OPEN_R_SDK/OPEN_R/lib -L/usr/local/OPEN_R_SDK/mipsel-linux/lib -lm --start-group -lstdc++ /usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/libgcc.a -lapsys -lOFSpub -lc- --end-group -lmcoopstub -lnosys /usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/libgcc.a /usr/local/OPEN_R_SDK/lib/gcc/mipsel-linux/4.0.2/crtend.o
make[1]: *** [moNetTest.bin] Error 9
make[1]: Leaving directory `/socrob/aibo/sample/common/MoNet/MoNetTest'
make[1]: Entering directory `/socrob/aibo/sample/common/PowerMonitor/PowerMonitor'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/socrob/aibo/sample/common/PowerMonitor/PowerMonitor'

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux