Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues with compiling FLANN with arm-linux-gcc for ARM Cortex A9 ! #77

Closed
anupkini opened this issue Dec 17, 2012 · 1 comment
Closed

Comments

@anupkini
Copy link

Dear All,

I am trying to build a PCL and ROS platform for Xilinx ZYNQ SoC with a Dual Core ARM Coretex A9.

When i try to compile FLANN with the Code Sourcery ARM GNU Toolchain, i get the following error.
/home/akini/Downloads/flann-1.7.1-src/src/cpp/flann/util/logger.h:73:9: note: the mangling of 'va_list' has changed in GCC 4.4
Linking CXX executable ../bin/flann_example_cpp
/usr/local/lib/libhdf5.a(H5.c.o): In function H5check_version': H5.c:(.text+0x251c): undefined reference toH5libhdf5_settings'
/usr/local/lib/libhdf5.a(H5T.c.o): In function H5T_init_interface': H5T.c:(.text+0x9e0): undefined reference toH5TN_init_interface'
collect2: ld returned 1 exit status
make[2]: *** [bin/flann_example_cpp] Error 1
make[1]: *** [examples/CMakeFiles/flann_example_cpp.dir/all] Error 2
make: *** [all] Error 2

I have added the following lines in the CMakelists.txt at the beginning of the file.

cmake_minimum_required(VERSION 2.6)

SET(CMAKE_C_COMPILER /home/akini/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/arm-xilinx-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /home/akini/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/arm-xilinx-linux-gnueabi-g++)

SET(CMAKE_FIND_ROOT_PATH /home/akini/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/ /home/akini/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/arm-xilinx-linux-gnueabi/)

if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

Kindly let me know where i am going wrong and also if some one has already cross compiled for ARM, then few tips will be really helpful.

Thanks,
Anup.
email: akini@synapticon.com

@mariusmuja
Copy link
Collaborator

Hi,

It looks like you might be trying to link the flann_example_cpp which is compiled with the ARM cross-compile toolchain with the system library /usr/local/lib/libhdf5.a.

If the compilation got that far (to the example flann_example_cpp) it means the library was successfully compiled. FLANN does not require the hdf5 library, only the examples and the tests do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants