LOCNNIL opened a new issue, #176: URL: https://github.com/apache/logging-log4cxx/issues/176
I'm trying to cross compile the **log4cxx** lib for an armv7l arch. # Steps to reproduce: ### Install the cross tolchain arm-linux-gnueabi ```bash sudo apt install -y gcc-arm-linux-gnueabi g++-arm-linux-gnueabi binutils-arm-linux-gnueabi ``` ### Start some env variables to hold directores ```bash export DIR_TARGET=/data/marthe/usr export DIR_HOST=$HOME/project/lib/expat ``` ## **Expat** dependency library ```bash wget https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-2.5.0.tar.gz ## Extract the source code tar -xvf expat-2.5.0.tar.gz cd expat-2.5.0 ``` #### Configuring ```bash ./configure \ --build=i686-pc-linux-gnu \ --host=arm-linux-gnueabi \ --prefix=$DIR_HOST \ --exec-prefix=$DIR_HOST \ STRIP="/usr/bin/arm-linux-gnueabi-strip" \ AR="/usr/bin/arm-linux-gnueabi-ar" \ CC="/usr/bin/arm-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=softfp -mfpu=neon" \ CXX="/usr/bin/arm-linux-gnueabi-g++ -march=armv7-a -mfloat-abi=softfp -mfpu=neon" \ CFLAGS="-O3 -fexpensive-optimizations -frename-registers -fomit-frame-pointer" \ CXXFLAGS="-O3 -fexpensive-optimizations -frename-registers -fomit-frame-pointer" \ LDFLAGS="-Wl,--strip-all -Wl,--rpath=$DIR_TARGET/lib -Wl,--dynamic-linker=$DIR_TARGET/lib/ld-linux.so.3 -Wl,-O3 -Wl,--hash-style=gnu -Wl,--as-needed" \ CPP="/usr/bin/arm-linux-gnueabi-gcc -E -march=armv7-a -mfloat-abi=softfp -mfpu=neon" \ CXXCPP="/usr/bin/arm-linux-gnueabi-g++ -E -march=armv7-a -mfloat-abi=softfp -mfpu=neon" \ STRIP="/usr/bin/arm-linux-gnueabi-strip" \ OBJDUMP="/usr/bin/arm-linux-gnueabi-objdump" make -j4 make install ``` ## Log4cxx instalation ### Downloading and extracting source code ```bash wget https://dlcdn.apache.org/logging/log4cxx/1.0.0/apache-log4cxx-1.0.0.tar.gz tar -xvf apache-log4cxx-1.0.0.tar.gz cd apache-log4cxx-1.0.0 ``` ### Configuring ```bash cmake -Bbuild -H. \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$HOME/project/lib/log4cxx \ -DCMAKE_TOOLCHAIN_FILE=$HOME/project/cmake/toolchain-arm-linux-gnueabi.cmake \ -DBUILD_TESTING=off \ -DBUILD_SHARED_LIBS=off \ -DEXPAT_LIBRARY=$HOME/project/lib/expat/lib \ -DEXPAT_INCLUDE_DIR=$HOME/project/lib/expat/include \ -G "Unix Makefiles" ``` # Error from configuration step ``` -- Available appenders: -- Async Appender .................. : ON -- ODBC Appender ................... : OFF -- SMTP Appender ................... : OFF -- XMLSocketAppender ............... : ON -- SocketHubAppender ............... : ON -- SyslogAppender .................. : ON -- TelnetAppender .................. : ON -- NTEventLogAppender .............. : OFF -- OutputDebugStringAppender ....... : ON -- ConsoleAppender ................. : ON -- FileAppender .................... : ON -- RollingFileAppender ............. : ON -- MultiprocessRollingFileAppender . : OFF -- Available layouts: -- HTMLLayout ...................... : ON -- JSONLayout ...................... : ON -- PatternLayout ................... : ON -- SimpleLayout .................... : ON -- XMLLayout ....................... : ON -- FMTLayout ....................... : OFF CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: /home/lincoln/cross_compile/source/apache-log4cxx-1.0.0/src/APR_INCLUDE_DIR used as include directory in directory /home/lincoln/cross_compile/source/apache-log4cxx-1.0.0/src/main/cpp /home/lincoln/cross_compile/source/apache-log4cxx-1.0.0/src/APR_UTIL_INCLUDE_DIR used as include directory in directory /home/lincoln/cross_compile/source/apache-log4cxx-1.0.0/src/main/cpp -- Configuring incomplete, errors occurred! See also "/home/lincoln/cross_compile/source/apache-log4cxx-1.0.0/build/CMakeFiles/CMakeOutput.log". See also "/home/lincoln/cross_compile/source/apache-log4cxx-1.0.0/build/CMakeFiles/CMakeError.log". ``` these are the log files of the errors: [CMakeError.log](https://github.com/apache/logging-log4cxx/files/10403684/CMakeError.log) [CMakeOutput.log](https://github.com/apache/logging-log4cxx/files/10403685/CMakeOutput.log) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
