linux g++ compile error

R

Richard Wang

I am trying to build an open source package gpuocelot, it requires gcc 4.7 and
boost library 1.54. I have compiled these two from the sources.

The building of gpuocelot requires other libraries as well. I have built all of them and put them in a personal install location such as $HOME/localbin. I have also update /etc/ld.so.conf and execute ldconfig.

this is the error message I got. I have two questions

1, it shows that the compiling has skipped some libraries in the default
system lib search path. I have put all the needed ones in my personal lib path
and configured them . Do I have to care about the "skipping ...." messages?

2, from the error messages, it does not seem to be related to the codes in gpuocelot, more likely it is about common libraries such as boosting etc.
but how can fix it?

Sorry, I know this is not the best place to post. I do not know why
but I cannot post to the gpuocelot group (I have tried many times, with different browsers, none of them works). If anyone know how to fix this problem, please let me know.

Thanks.
Richard


==============================================================

g++ -o .release_build/ocelot/LoadPtx .release_build/ocelot/ocelot/tools/LoadPtx.o -L/usr/lib -L/home/richard.wangy/localbin/lib -L/home/richard.wangy/localbin/lib -locelot -lboost_system -lboost_filesystem -lboost_thread -ldl -lrt -lpthread


/usr/bin/ld: skipping incompatible /usr/lib/libboost_filesystem.so when searching for -lboost_filesystem
/usr/bin/ld: skipping incompatible /usr/lib/libboost_filesystem.a when searching for -lboost_filesystem
/usr/bin/ld: skipping incompatible /usr/lib/libboost_thread.so when searching for -lboost_thread
/usr/bin/ld: skipping incompatible /usr/lib/libboost_thread.a when searching for -lboost_thread
/usr/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /home/richard.wangy/localbin/lib/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /home/richard.wangy/localbin/lib/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /home/richard.wangy/localbin/lib/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /home/richard.wangy/localbin/lib/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /home/richard.wangy/localbin/lib/libgcc_s.so when searching for -lgcc_s

/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /home/richard.wangy/localbin/lib/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: skipping incompatible /home/richard.wangy/localbin/lib/libgcc_s.so when searching for -lgcc_s
..release_build/ocelot/ocelot/tools/LoadPtx.o: In function `operator<<(std::basic_ostream<char, std::char_traits<char> >&, cudaError_enum)':
LoadPtx.cpp:(.text+0x1e): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'
..release_build/ocelot/ocelot/tools/LoadPtx.o: In function `main':
LoadPtx.cpp:(.text.startup+0x1c4): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<void const*>(void const*)'
LoadPtx.cpp:(.text.startup+0x1dc): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<unsigned long>(unsigned long)'
/home/richard.wangy/localbin/lib/libocelot.so: undefined reference to `boost::this_thread::interruption_point()'
/home/richard.wangy/localbin/lib/libocelot.so: undefined reference to `boost::thread::native_handle()'
/home/richard.wangy/localbin/lib/libocelot.so: undefined reference to `std::basic_istream<char, std::char_traits<char> >& std::basic_istream<char, std::char_traits<char> >::_M_extract<unsigned int>(unsigned int&)'
/home/richard.wangy/localbin/lib/libocelot.so: undefined reference to `std::basic_istream<char, std::char_traits<char> >& std::basic_istream<char, std::char_traits<char> >::_M_extract<unsigned long>(unsigned long&)'
/home/richard.wangy/localbin/lib/libocelot.so: undefined reference to `std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)'
 
R

Richard Wang

OK, I solved it.

the problem is I forgot to add the 64-bit lib path $HOME/localbin/lib64 in the library search path. I guess the "skipping ....." message just tells me that the
libraries g++ found are for 32-bit, not 64-bit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top