Project

General

Profile

Crosscompilation for arm error

Added by jakub jirsa about 9 years ago

I have a problem with crosscompilation for arm.

This is my Cmake:

SET (CMAKE_SYSTEM_NAME Linux)

SET (CMAKE_SYSTEM_VERSION 1)

SET (CMAKE_C_COMPILER /opt/gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc)

SET (CMAKE_CXX_COMPILER /opt/gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++)

SET (CMAKE_C_LINKER /opt/gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc)

SET (CMAKE_CXX_LINKER
/opt/gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++)

SET (CMAKE_SYSROOT /opt/sysroot/)

SET (CMAKE_CROSSCOMPILING TRUE)

  1. where is the target environment - we mounted it using sshfs
    SET (CMAKE_FIND_ROOT_PATH /opt/sysroot/)

<!-- -->

  1. search for programs in the build host directories
    SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
  2. for libraries and headers in the target directories
    SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
    SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
    set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

After calling cmake everything looks Ok.

......

--- Looking for pthread_create in pthreads

--- Looking for pthread_create in pthreads - not found

--- Looking for pthread_create in pthread

--- Looking for pthread_create in pthread - found

--- Found Threads: TRUE

......

After building comes with this error

/opt/gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find /lib/libpthread.so.0

/opt/gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find /usr/lib/libpthread_nonshared.a

Thanks for help


Replies (2)

RE: Crosscompilation for arm error - Added by Koen Deforche about 9 years ago

Hey,

That really sounds like there's something wrong with the cross-compilation setup, not something that has to do with the Wt build itself?

Regards,

koen

RE: Crosscompilation for arm error - Added by jakub jirsa about 9 years ago

Thanks for reply you got right :)

    (1-2/2)