Boost linking problem

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

 



Hi there,


I am using a 2012 code which uses gcc-4.6. I know it is old but I am not testing that with current OS versions due to the dependency problems. So, I have installed a virtual ubuntu-12.04 for this purpose.





The following g++ command returns an undefined reference error which is related to boost libraries



mahmood@vb:AES$ g++ -fPIC -m64 \
> -o /home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES \
> obj/x86_64/release/aescuda.cpp.o \
> obj/x86_64/release/aesCudaUtils.cpp.o \
> obj/x86_64/release/aesHost.cu.o \
> -L/usr/local/cuda/lib64 \
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/lib \
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/common/lib/linux \
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/shared/lib \
> -lcudart -lcutil_x86_64  -lshrutil_x86_64
obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':
aescuda.cpp:(.text.startup+0x68b): undefined reference to `boost::system::get_system_category()'
aescuda.cpp:(.text.startup+0x697): undefined reference to `boost::system::get_generic_category()'

....



I simply include the required library files, but still get the same error.



mahmood@vb:AES$ find /home/mahmood/boost_1_54_0/ -name libboost_filesystem*
/home/mahmood/boost_1_54_0/bin.v2/libs/filesystem/build/gcc-4.6/release/link-static/threading-multi/libboost_filesystem.a
/home/mahmood/boost_1_54_0/bin.v2/libs/filesystem/build/gcc-4.6/release/threading-multi/libboost_filesystem.so.1.54.0
/home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.so.1.54.0
/home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.a

/home/mahmood/boost_1_54_0/stage/lib/libboost_filesystem.so



However



mahmood@vb:AES$ g++ -fPIC -m64 \
> -o /home/mahmood/gpgpu-sim_distribution/ispass2009-benchmarks/bin/release/AES \
> obj/x86_64/release/aescuda.cpp.o \
> obj/x86_64/release/aesCudaUtils.cpp.o \
> obj/x86_64/release/aesHost.cu.o \
> -L/usr/local/cuda/lib64 \
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/lib \
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/C/common/lib/linux \
> -L/home/mahmood/NVIDIA_GPU_Computing_SDK/shared/lib \
> -lcudart -lcutil_x86_64  -lshrutil_x86_64 \
> -L/home/mahmood/boost_1_54_0/stage/lib \
> -lboost_system -lboost_filesystem
obj/x86_64/release/aescuda.cpp.o: In function `_GLOBAL__sub_I_aescuda.cpp':
aescuda.cpp:(.text.startup+0x68b): undefined reference to `boost::system::get_system_category()'
aescuda.cpp:(.text.startup+0x697): undefined reference to `boost::system::get_generic_category()'

....



I know that the order of those boost libraries are important. But, changing the order has no effect. Maybe the problem is with Boost. But I have checked that with the guys and seems to be normal. I think somewhere in the link stage,  g++ forget the library path.


Surely the program has been used by other people, so it is generally correct. The Makefile is available at https://github.com/gpgpu-sim/ispass2009-benchmarks/blob/master/AES/Makefile



Why that happens? Anybody has faced that before? Any comment?





Regards,
Mahmood




[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