ubuntu16.04 cross compile Poco1.7.8 for arm

Environment: ubuntu16.04 x64, arm-linux-gcc (Sourcery G++ Lite 2010.09-50) 4.5.1


First, prepare for compilation, compile and install packages such as OPENSSL, STLport, etc., and prepare dependent packages for compiling Poco (since I do not use MySQL and ODBC, there is no cross-compilation and installation, and you can cross-compile and install it yourself if you need it).
1. OPENSSL cross compilation and installation (subject to 1.0.0e)
       source code download address: https://www.openssl.org/source/openssl-1.0.0e.tar.gz
       After downloading, compile and install according to the following instructions:
       tar -xvf openssl-1.0.0e.tar.gz
       cd openssl-1.0.0e
      ./config CC=arm-none-linux-gnueabi-gcc --prefix=/opt/arm-cross-tools/openssl
       make
       make install
       installation completed Then hyperlink all files of /opt/arm-cross-tools/openssl/lib to arm-linux-gcc/arm-none-linux-gnueabi/lib of the cross compiler, /opt/arm-cross-tools/openssl The /include/openssl directory is hyperlinked to arm-linux-gcc/arm-none-linux-gnueabi/include, and the hyperlink name is openssl. (After the hyperlink, there is no need to modify the source code configuration openssl path when cross-compiling Poco)
2. Compile STLport
       Source code download address: https://nchc.dl.sourceforge.net/project/stlport/STLport/STLport-5.2.1/STLport-5.2.1.tar.bz2 After
       downloading, compile and install according to the following instructions:

       tar -xvf STLport-5.2.1.tar.bz2

       Modify the file: STLport-5.2.1/stlport/stl/_cstdlib.h,

       Line 94 is replaced by #if !defined(__sun) with

#      if !defined(__sun) && !defined (__arm__) && !defined (__sh__)

       Line 150 is replaced by #if !defined(__sun) with

#    if !defined (__sun) && !defined (__arm__) && !defined (__mips__) && !defined (__mipset__) && !defined (__sh__)

       cd STLport-5.2.1

       ./configure --target=arm-linux --prefix=/opt/arm-cross-tools/STLport
       make

       make install

       cd /opt/arm-cross-tools/STLport/arm-linux-lib

       ln -s -f libstlport.so libstlport_arm-linux-gcc.so 

       After the installation is complete, hyperlink all files in /opt/arm-cross-tools/STLport/lib to arm-linux-gcc/arm-none-linux-gnueabi/lib of the cross compiler, /opt/arm-cross-tools The /STLport/include/stlport directory is hyperlinked to arm-linux-gcc/arm-none-linux-gnueabi/include, and the hyperlink name is stlport. (After the hyperlink, there is no need to modify the source configuration stlport path when cross-compiling Poco)


Then, compile and
install Poco 3. Compile and install Poco
       source code download address: https://pocoproject.org/releases/poco-1.7.8/poco-1.7.8-all.tar.gz
       tar -xzvf poco-1.7.8 -all.tar.gz
       cd poco-1.7.8-all
       ./configure --config=ARM-Linux --no-tests --no-samples --omit=Data/ODBC,Data/MySQL --prefix=/ opt/arm-cross-tools/Poco --static --shared
       make
       make install

       At this point, Poco has completed cross-compilation and installation.


It should be noted that when compiling arm-linux-gcc (Sourcery G++ Lite 2010.09-50) 4.5.2, it cannot pass when compiling XML's xmltok.c. I have been compiling for several days and have not figured out what happened. , I hope there are colleagues who know a lot to guide.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324360684&siteId=291194637