Project

General

Profile

Wt library for Raspberry Pi - cross compilation tutorial?

Added by Andrzej Górczak about 11 years ago

Dear Friends,

i faced hudge problem in cross compiling wt library for Raspberry Pi.

Ready package is not meeting my requirements so i need to cross compile latest version.

I cannot make it directly on Raspberry, so i have to use VM with Debian.

I'm able to compile library for VM but for RPI still have some problems with linking.

The library itself is compilet but i durring compilation of examples and make install there are some errors.

My request to you all is that maybe someone of you can help me to re-write tutorial once again?

Is there any good man who can do it together with me and help?

Thank you!

gorusAG


Replies (6)

RE: Wt library for Raspberry Pi - cross compilation tutorial? - Added by Wim Dumon about 11 years ago

Hi,

We wrote a tutorial earlier this year. Is it already outdated? What did not work?

http://redmine.emweb.be/projects/wt/wiki/Cross_compile_Wt_on_Raspberry_Pi

Best regards,

Wim.

RE: Wt library for Raspberry Pi - cross compilation tutorial? - Added by Andrzej Górczak about 11 years ago

Hello,

below you can find your tutorial with my modifications (bold format).

Install prerequisites on the raspberry pi

Log in on your raspberry pi and install the desired dependencies. To build Wt, boost is actually the only required dependency:

  1. log in on the rpi to install the dependency libraries
    ssh pi@raspberrypi
    sudo apt-get install libboost-all-dev
    *sudo apt-get install gcc g libboost-all-dev cmake make
    sudo apt-get install libssl-dev libfcgi-dev
    sudo apt-get install libpng12-dev libgraphicsmagick1-dev libhpdf-dev libpng12-dev libpango1.0-dev mesa-common-dev
    sudo apt-get install libqt4-dev
    sudo apt-get install graphviz
    sudo apt-get install libmysqlclient-dev*

Install cross compilation tool chain:

Ideally, raspbian should distribute cross-compilers for their distribution, but as far as I know, they don't. Building a correct, working cross compilation from scratch, even with tools like crosstool-ng, is a challenge in itself and many guides on the internet are either out-dated, flawed, or fail to produce the tools. We did not easily succeed to use crosstool-ng to generate a cross-compilation environment for the same gcc and glibc version as installed on our raspberry pi.

We finally used a pre-built cross compilation tool chain for a slightly different version of gcc and libc:

  1. make sure that you've logged out from your rpi, execute these commands in on your host computer:
    mkdir ~/rpi
    cd rpi
    git clone https://github.com/raspberrypi/tools.git

Make raspberry pi development files (header files, libraries) available on the host

On your cross compilation host, use sshfs to mount your complete raspberry pi:

  1. make sure that you've logged out from your rpi, execute these commands in on your host computer:
    Below IP adress is a RPI IP adress

sudo apt-get install sshfs

mkdir ~/mnt_rpi

sshfs pi@192.168.0.10:/ ~/mnt_rpi/ -o transform_symlinks -o allow_other

The -o transform_symlinks is required to transform absolute symlinks on the rpi to relative ones, so that a link on the rpi filesystem to /lib/libabc.so actually still points to the same file, and not to /lib/libabc.so on the host filesystem.

Make a cmake toolchain file for cross compilation

Create the file below, and save it on your host computer as ~/rpi-toolchain.cmake.

Replace /home/gorusag in the file below by your own home directory.

SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)

SET(CMAKE_C_COMPILER
/home/gorusag/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc)

SET(CMAKE_CXX_COMPILER
/home/gorusag/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++)

# where is the target environment - we mounted it using sshfs
SET(CMAKE_FIND_ROOT_PATH /home/gorusag/mnt_rpi)

# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


#this part is new to use locally pkg-config


# set env vars so that pkg-config will look in the appropriate directory for
# .pc files (as there seems to be no way to force using ${HOST}-pkg-config)
set(ENV{PKG_CONFIG_LIBDIR} "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
set(ENV{PKG_CONFIG_PATH} "/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/pkgconfig")

Cross compile Wt

Once the cross compilation environment is set up, compiling Wt is straight forward:

  1. make sure that you've logged out from your rpi, execute these commands in on your host computer:
  2. tar wt: tar xvzf wt-3.3.3.tar.gz
    cd wt-3.3.3
    mkdir build-rpi
    cd build-rpi

cmake ../ -DCMAKE_TOOLCHAIN_FILE=~/rpi-toolchain.cmake -DWT_CPP_11_MODE=-std=c++0x -DWT_WRASTERIMAGE_IMPLEMENTATION=GraphicsMagick -DSHARED_LIBS=OFF

Here you can see the outcome of cmake command.

The effect of running cmake is below:

--- The C compiler identification is GNU 4.8.3

--- The CXX compiler identification is GNU 4.8.3

--- Check for working C compiler: /home/gorusag/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc

--- Check for working C compiler: /home/gorusag/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --- works

--- Detecting C compiler ABI info

--- Detecting C compiler ABI info - done

--- Check for working CXX compiler: /home/gorusag/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g

--- Check for working CXX compiler: /home/gorusag/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g --- works

--- Detecting CXX compiler ABI info

--- Detecting CXX compiler ABI info - done

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:566 ] _boost_TEST_VERSIONS = 1.35;1.36;1.37;1.38;1.39;1.40;1.41;1.42;1.43;1.44;1.45;1.46;1.47;1.48;1.49;1.50;1.51;1.52;1.53;1.54;1.55;1.56;1.57;1.58;1.59;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:568 ] Boost_USE_MULTITHREADED = ON

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:570 ] Boost_USE_STATIC_LIBS =

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:572 ] Boost_USE_STATIC_RUNTIME =

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:574 ] Boost_ADDITIONAL_VERSIONS = 1.35;1.36;1.37;1.38;1.39;1.40;1.41;1.42;1.43;1.44;1.45;1.46;1.47;1.48;1.49;1.50;1.51;1.52;1.53;1.54;1.55;1.56;1.57;1.58;1.59

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:576 ] Boost_NO_SYSTEM_PATHS =

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:644 ] Declared as CMake or Environmental Variables:

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:646 ] BOOST_ROOT = /usr

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:648 ] BOOST_INCLUDEDIR =

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:650 ] BOOST_LIBRARYDIR =

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:652 ] _boost_TEST_VERSIONS = 1.35;1.36;1.37;1.38;1.39;1.40;1.41;1.42;1.43;1.44;1.45;1.46;1.47;1.48;1.49;1.50;1.51;1.52;1.53;1.54;1.55;1.56;1.57;1.58;1.59;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:705 ] Include debugging info:

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:707 ] _boost_INCLUDE_SEARCH_DIRS = /usr/include;/usr;C:/boost/include;C:/boost;/boost/include;/boost;/sw/local/include

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:709 ] _boost_PATH_SUFFIXES = boost-1_35;boost_1_35;boost-1_36;boost_1_36;boost-1_37;boost_1_37;boost-1_38;boost_1_38;boost-1_39;boost_1_39;boost-1_40;boost_1_40;boost-1_41;boost_1_41;boost-1_42;boost_1_42;boost-1_43;boost_1_43;boost-1_44;boost_1_44;boost-1_45;boost_1_45;boost-1_46;boost_1_46;boost-1_47;boost_1_47;boost-1_48;boost_1_48;boost-1_49;boost_1_49;boost-1_50;boost_1_50;boost-1_51;boost_1_51;boost-1_52;boost_1_52;boost-1_53;boost_1_53;boost-1_54;boost_1_54;boost-1_55;boost_1_55;boost-1_56;boost_1_56;boost-1_57;boost_1_57;boost-1_58;boost_1_58;boost-1_59;boost_1_59;boost-1_56_0;boost_1_56_0;boost-1_56;boost_1_56;boost-1_55_0;boost_1_55_0;boost-1_55;boost_1_55;boost-1_54_0;boost_1_54_0;boost-1_54;boost_1_54;boost-1_53_0;boost_1_53_0;boost-1_53;boost_1_53;boost-1_52_0;boost_1_52_0;boost-1_52;boost_1_52;boost-1_51_0;boost_1_51_0;boost-1_51;boost_1_51;boost-1_50_0;boost_1_50_0;boost-1_50;boost_1_50;boost-1_49_0;boost_1_49_0;boost-1_49;boost_1_49;boost-1_48_0;boost_1_48_0;boost-1_48;boost_1_48;boost-1_47_0;boost_1_47_0;boost-1_47;boost_1_47;boost-1_46_1;boost_1_46_1;boost-1_46_0;boost_1_46_0;boost-1_46;boost_1_46;boost-1_45_0;boost_1_45_0;boost-1_45;boost_1_45;boost-1_44_0;boost_1_44_0;boost-1_44;boost_1_44;boost-1_43_0;boost_1_43_0;boost-1_43;boost_1_43;boost-1_42_0;boost_1_42_0;boost-1_42;boost_1_42;boost-1_41_0;boost_1_41_0;boost-1_41;boost_1_41;boost-1_40_0;boost_1_40_0;boost-1_40;boost_1_40;boost-1_39_0;boost_1_39_0;boost-1_39;boost_1_39;boost-1_38_0;boost_1_38_0;boost-1_38;boost_1_38;boost-1_37_0;boost_1_37_0;boost-1_37;boost_1_37;boost-1_36_1;boost_1_36_1;boost-1_36_0;boost_1_36_0;boost-1_36;boost_1_36;boost-1_35_1;boost_1_35_1;boost-1_35_0;boost_1_35_0;boost-1_35;boost_1_35

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:734 ] location of version.hpp: /home/gorusag/mnt_rpi/usr/include/boost/version.hpp

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:753 ] version.hpp reveals boost 1.49.0

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:785 ] guessed _boost_COMPILER = -gcc48

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:795 ] _boost_MULTITHREADED = -mt

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:838 ] _boost_RELEASE_ABI_TAG = -

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:840 ] _boost_DEBUG_ABI_TAG = -d

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:883 ] _boost_LIBRARY_SEARCH_DIRS = /usr/lib;/usr/stage/lib;/home/gorusag/mnt_rpi/usr/include/lib;/home/gorusag/mnt_rpi/usr/include/../lib;/home/gorusag/mnt_rpi/usr/include/stage/lib;C:/boost/lib;C:/boost;/boost/boost_1_49_0/lib;/boost/boost_1_49/lib;/boost/lib;/boost;/sw/local/lib

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for DATE_TIME_LIBRARY_RELEASE: boost_date_time-gcc48-mt-1_49;boost_date_time-gcc48-mt;boost_date_time-mt-1_49;boost_date_time-mt;boost_date_time

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for DATE_TIME_LIBRARY_DEBUG: boost_date_time-gcc48-mt-d-1_49;boost_date_time-gcc48-mt-d;boost_date_time-mt-d-1_49;boost_date_time-mt-d;boost_date_time-mt;boost_date_time

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for REGEX_LIBRARY_RELEASE: boost_regex-gcc48-mt-1_49;boost_regex-gcc48-mt;boost_regex-mt-1_49;boost_regex-mt;boost_regex

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for REGEX_LIBRARY_DEBUG: boost_regex-gcc48-mt-d-1_49;boost_regex-gcc48-mt-d;boost_regex-mt-d-1_49;boost_regex-mt-d;boost_regex-mt;boost_regex

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for PROGRAM_OPTIONS_LIBRARY_RELEASE: boost_program_options-gcc48-mt-1_49;boost_program_options-gcc48-mt;boost_program_options-mt-1_49;boost_program_options-mt;boost_program_options

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for PROGRAM_OPTIONS_LIBRARY_DEBUG: boost_program_options-gcc48-mt-d-1_49;boost_program_options-gcc48-mt-d;boost_program_options-mt-d-1_49;boost_program_options-mt-d;boost_program_options-mt;boost_program_options

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for SIGNALS_LIBRARY_RELEASE: boost_signals-gcc48-mt-1_49;boost_signals-gcc48-mt;boost_signals-mt-1_49;boost_signals-mt;boost_signals

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for SIGNALS_LIBRARY_DEBUG: boost_signals-gcc48-mt-d-1_49;boost_signals-gcc48-mt-d;boost_signals-mt-d-1_49;boost_signals-mt-d;boost_signals-mt;boost_signals

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for SYSTEM_LIBRARY_RELEASE: boost_system-gcc48-mt-1_49;boost_system-gcc48-mt;boost_system-mt-1_49;boost_system-mt;boost_system

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for SYSTEM_LIBRARY_DEBUG: boost_system-gcc48-mt-d-1_49;boost_system-gcc48-mt-d;boost_system-mt-d-1_49;boost_system-mt-d;boost_system-mt;boost_system

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for FILESYSTEM_LIBRARY_RELEASE: boost_filesystem-gcc48-mt-1_49;boost_filesystem-gcc48-mt;boost_filesystem-mt-1_49;boost_filesystem-mt;boost_filesystem

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for FILESYSTEM_LIBRARY_DEBUG: boost_filesystem-gcc48-mt-d-1_49;boost_filesystem-gcc48-mt-d;boost_filesystem-mt-d-1_49;boost_filesystem-mt-d;boost_filesystem-mt;boost_filesystem

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for THREAD_LIBRARY_RELEASE: boost_thread-gcc48-mt-1_49;boost_thread-gcc48-mt;boost_thread-mt-1_49;boost_thread-mt;boost_thread

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for THREAD_LIBRARY_DEBUG: boost_thread-gcc48-mt-d-1_49;boost_thread-gcc48-mt-d;boost_thread-mt-d-1_49;boost_thread-mt-d;boost_thread-mt;boost_thread

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for RANDOM_LIBRARY_RELEASE: boost_random-gcc48-mt-1_49;boost_random-gcc48-mt;boost_random-mt-1_49;boost_random-mt;boost_random

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for RANDOM_LIBRARY_DEBUG: boost_random-gcc48-mt-d-1_49;boost_random-gcc48-mt-d;boost_random-mt-d-1_49;boost_random-mt-d;boost_random-mt;boost_random

--- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:1107 ] Boost_FOUND = TRUE

--- Boost version: 1.49.0

--- Found the following Boost libraries:

--- date_time

--- regex

--- program_options

--- signals

--- system

--- filesystem

--- thread

--- random

--- Found png libraries

--- Looking for mysql_library_init

--- Looking for mysql_library_init - found

--- Found libharu libraries

--- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")

--- checking for module 'pangoft2'

--- found pangoft2, version 1.30.0

--- Looking for connect

--- Looking for connect - found

--- Looking for sin

--- Looking for sin - not found

--- Looking for Q_WS_X11

--- Looking for Q_WS_X11 - found

--- Looking for Q_WS_WIN

--- Looking for Q_WS_WIN - not found.

--- Looking for Q_WS_QWS

--- Looking for Q_WS_QWS - not found.

--- Looking for Q_WS_MAC

--- Looking for Q_WS_MAC - not found.

--- Found Qt4: /usr/bin/qmake (found version "4.8.2")

--- Looking for include file pthread.h

--- Looking for include file pthread.h - found

--- Looking for pthread_create

--- Looking for pthread_create - not found.

--- 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

--- Boost 104900 < 1.54, WT_SIGNALS_IMPLEMENTATION = boost.signals recommended

--- Selecting boost.signals

--- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)

--- Looking for strcasestr

--- Looking for strcasestr - found

--- Looking for strcasecmp

--- Looking for strcasecmp - found

--- Looking for crypt

--- Looking for crypt - not found

--- Looking for crypt in crypt

--- Looking for crypt in crypt - found

This is also part of the outcome but was not written in the >> file. Appeared on the terminal.

Enabling multi threading.

Enabling advanced font support using libpango

Wt::Dbo: building SQLite3 backend.

Wt::Dbo: building Postgres backend.

Wt::Dbo: not building Firebird backend.

Indicate the location of your FirebirdSQL and IBPP installation using

-DFIREBIRD_PREFIX=... -DIBPP_SRC_DIRECTORY=...

Wt::Dbo: building MySQL backend.

Disabling ISAPI.

Enabling FastCGI connector.

Enabling built-in httpd.

Testing Wt::Dbo using Postgres backend

Testing Wt::Dbo using Mysql backend

Testing Wt::Dbo using Sqlite3 backend

--- Configuring done

--- Generating done

--- Build files have been written to: /home/gorusag/wt-3.3.3/build-rpi

Basically everything looks ok. Pango libraries also found with local pkg-config.

Running make without -j 8 options due to VM memory size limitations.

make

I will paste later what compilation will bring.

RE: Wt library for Raspberry Pi - cross compilation tutorial? - Added by Wim Dumon about 11 years ago

Looks good, I'm interested to hear your results.

Wim.

RE: Wt library for Raspberry Pi - cross compilation tutorial? - Added by Andrzej Górczak about 11 years ago

Hello,

looks that interrupts compilation on 83%.

Missing standard libraries like: libbz2.so.1.0, libpcre.so.3, libuuid.so.1, liblzma.so.5, libexpat.so.1.

[ 0%] Generating JQuery_js.C

[ 0%] Generating Plain_html.C

[ 0%] Generating Boot_html.C

[ 0%] Generating Hybrid_html.C

[ 0%] Generating Boot_js.C

[ 0%] Generating Wt_js.C

[ 1%] Generating Wt_xml.C

[ 1%] Generating AuthStrings_xml.C

[ 1%] Generating BootstrapTheme_xml.C

[ 1%] Generating Bootstrap3Theme_xml.C

[ 1%] Generating AuthCssTheme_xml.C

Scanning dependencies of target wt

[ 3%] Building CXX object src/CMakeFiles/wt.dir/Wt/PopupWindow.o

[ 3%] Building CXX object src/CMakeFiles/wt.dir/Wt/Resizable.o

[ 3%] Building CXX object src/CMakeFiles/wt.dir/Wt/SizeHandle.o

[ 3%] Building CXX object src/CMakeFiles/wt.dir/Wt/StdGridLayoutImpl2.o

[ 3%] Building CXX object src/CMakeFiles/wt.dir/Wt/StdLayoutImpl.o

[ 3%] Building CXX object src/CMakeFiles/wt.dir/Wt/StdLayoutItemImpl.o

.

.

..

...

up to

[ 83%] Building CXX object test/CMakeFiles/test.dir/payment/MoneyTest.o

[ 83%] Building CXX object test/CMakeFiles/test.dir/locale/LocaleNumberTest.o

[ 83%] Building CXX object test/CMakeFiles/test.dir/trampoline/RefEncoder.o

[ 83%] Building CXX object test/CMakeFiles/test.dir/paintdevice/WRasterTest.o

Linking CXX executable test

and then comes:

/home/gorusag/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: warning: libbz2.so.1.0, needed by /home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so, not found (try using -rpath or -rpath-link)

/home/gorusag/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: warning: libpcre.so.3, needed by /home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libglib-2.0.so, not found (try using -rpath or -rpath-link)

/home/gorusag/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: warning: libuuid.so.1, needed by /home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libSM.so.6, not found (try using -rpath or -rpath-link)

/home/gorusag/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: warning: liblzma.so.5, needed by /home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libxml2.so.2, not found (try using -rpath or -rpath-link)

/home/gorusag/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: warning: libexpat.so.1, needed by /home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1, not found (try using -rpath or -rpath-link)

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1: undefined reference to `XML_SetUserData'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1: undefined reference to `XML_ParserFree'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libglib-2.0.so: undefined reference to `pcre_exec'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libglib-2.0.so: undefined reference to `pcre_study'

/home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so: undefined reference to `BZ2_bzCompressEnd'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libglib-2.0.so: undefined reference to `pcre_dfa_exec'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libglib-2.0.so: undefined reference to `pcre_fullinfo'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libglib-2.0.so: undefined reference to `pcre_get_stringnumber'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libglib-2.0.so: undefined reference to `pcre_compile2'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1: undefined reference to `XML_ParserCreate'

/home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so: undefined reference to `BZ2_bzDecompress'

/home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so: undefined reference to `BZ2_bzwrite'

/home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so: undefined reference to `BZ2_bzread'

/home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so: undefined reference to `BZ2_bzopen'

/home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so: undefined reference to `BZ2_bzerror'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libglib-2.0.so: undefined reference to `pcre_get_stringtable_entries'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libxml2.so.2: undefined reference to `lzma_auto_decoder@XZ_5.0'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libglib-2.0.so: undefined reference to `pcre_free'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libxml2.so.2: undefined reference to `lzma_properties_decode@XZ_5.0'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1: undefined reference to `XML_GetErrorCode'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1: undefined reference to `XML_GetCurrentLineNumber'

/home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so: undefined reference to `BZ2_bzCompressInit'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1: undefined reference to `XML_SetElementHandler'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1: undefined reference to `XML_SetCharacterDataHandler'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1: undefined reference to `XML_GetBuffer'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1: undefined reference to `XML_SetDoctypeDeclHandler'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1: undefined reference to `XML_ParseBuffer'

/home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so: undefined reference to `BZ2_bzflush'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1: undefined reference to `XML_ErrorString'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libSM.so.6: undefined reference to `uuid_unparse_lower@UUID_1.0'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libSM.so.6: undefined reference to `uuid_generate@UUID_1.0'

/home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so: undefined reference to `BZ2_bzclose'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libxml2.so.2: undefined reference to `lzma_end@XZ_5.0'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libglib-2.0.so: undefined reference to `pcre_config'

/home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so: undefined reference to `BZ2_bzDecompressInit'

/home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so: undefined reference to `BZ2_bzCompress'

/home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so: undefined reference to `BZ2_bzDecompressEnd'

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf/libxml2.so.2: undefined reference to `lzma_code@XZ_5.0'

collect2: error: ld returned 1 exit status

make[2]: * [test/test] Error 1

make[1]: * [test/CMakeFiles/test.dir/all] Error 2

make: * [all] Error 2

I suppose that cross compiler/linker cannot find all these files which are located in raspberrypi - /lib/arm-linux-gnueabihf.

This is standard error but i cannot solve this.

I found some hints here: http://sysprogs.com/blog/?p=54

But some how it is too dificult for me how to do it.

RE: Wt library for Raspberry Pi - cross compilation tutorial? - Added by Wim Dumon about 11 years ago

Hi,

Is /home/gorusag/mnt_rpi/usr/lib/libGraphicsMagick.so a user-readable file, and does it contain absolute paths? Does it work if you apply the same kind of fixes as described in the 'Important Note' on our rpy wiki page?

The link you provide seems to talk about the same absolute prefix that is always present in those .so files. Hmm, would this work:

on rpy, make a symlink from /home/gorusag/mnt_rpi/ to /

edit the files described in the blog article you link to into this form:

/home/gorusag/mnt_rpi/lib/arm-linux-gnueabihf

/home/gorusag/mnt_rpi/usr/lib/arm-linux-gnueabihf

Then run ldconfig on the rpy and see if those .so files were changed and now contain a path that works both on the rpi and on your cross-compilation computer.

BR,

Wim.

RE: Wt library for Raspberry Pi - cross compilation tutorial? - Added by Andrzej Górczak about 11 years ago

Hi,

so far no progress.

usr/lib/libGraphicsMagick.so is not readable unfortunately.

So still the same error.

I don't know what to do more.

    (1-6/6)