Attempting to build nxlog with updated libraries, stuck at libapr-1 running ./configure

Tags: windows | mingw | nxlogs

#1 pacmanwa

I'm attempting to build nxlog with some updated libraries:

  • Latest APR (1.5.2)
  • Non-Heartbleed vulnerable OpenSSL sources
  • PCRE 8.37
  • Zlib 1.2.8

After building all the dependencies I'm a little stuck on getting nxlogs to build, specifically I'm stuck on the step where I run ./configure

At first it couldn't find apr-1-config, so I added /local/apr/bin to the path.

Then it couldn't fine libapr-1 so I added /local/apr/lib to the path, this is where the problems started. When APR built there wasn't a "libapr-1" file in /local/apr/lib, only libapr-1.a, libapr-1.la, libapr-1.dll.a.

Did I build APR incorrectly?

I'm trying to build this on windows

List of steps to get where I am:

1. Install MINGW using MinGW Installation Manager

Add packages:

  • mingw-developer-toolkit
  • mingw-base
  • mingw-expat bin
  • mingw32-libexpat dev
  • msys-libopenssl dev
  • msys-automake
  • msys-autoconf

Setup msys fstab (c:/mingw     /mingw)

2. Install Python (2.5)

3. Add Python and mingw to system path (C:\Python25;C:\MinGW\bin;C:\MinGW\msys\1.0\bin)

3. Get and build APR source (I could not get APR iconv to compile)

Download:

  • http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.11.tar.gz
  • http://mirror.nexcess.net/apache//apr/apr-1.5.2-win32-src.zip
  • http://mirror.nexcess.net/apache//apr/apr-util-1.5.4-win32-src.zip
  • http://sourceforge.net/projects/pcre/files/pcre/8.37/pcre-8.37.zip/download
  • http://zlib.net/zlib128.zip

Build:

  1. Extract all files to c:\mingw\msys\1.0\src
  2. Compile libiconv
    1. cd libiconv-1.11
    2. 
      ./configure CFLAGS="-O2 -s -mms-bitfields -march=i686" CXXFLAGS="-O2 -s -mms-bitfields -march=i686"
    3. make && make install
  3. Compile APR
    1. cd apr
    2. ./buildconf
    3.  
      
      ./configure CFLAGS="-O0 -s -mms-bitfields -march=i686" CXXFLAGS="-O0 -s -mms-bitfields -march=i686"
    4. make && make install
    5. cd ..
  4. Compile APR-UTIL
    1. cd apr-util-1.5.4
    2. ./buildconf --with-apr=/usr/src/apr-1.5.2
    3. 
      ./configure CFLAGS="-O2 -s -mms-bitfields -march=i686" CXXFLAGS="-O2 -s -mms-bitfields -march=i686" --with-apr=/usr/src/apr-1.5.2
    4. make && make install
    5. cd ..
  5. Compile PCRE
    1. cd pcre-.37
    2. ./configure
    3. make && make install
    4. (make threw an error corrected with make clean, autoconf -i --force, started back at step 1)
    5. cd ..
  6. Compile ZLIB
    1. cd zlib-1.2.8
    2. make -f win32/Makefile.gcc
  7. Compile nxlog
    1. cd nxlog-ce-2.8.1248
    2. ./configure

This is where the problems began. First it couldn't find apr-1-config.

Fixed by adding /local/apr/bin to path.

Now it can't find libapr-1, addint /local/apr/lib to the path doesn't help. There is no libapr-1 file in the MinGW directory tree. Ideas?

 

-pacmanwa

 

#2 adm Nxlog ✓
#1 pacmanwa
I'm attempting to build nxlog with some updated libraries: Latest APR (1.5.2) Non-Heartbleed vulnerable OpenSSL sources PCRE 8.37 Zlib 1.2.8 After building all the dependencies I'm a little stuck on getting nxlogs to build, specifically I'm stuck on the step where I run ./configure At first it couldn't find apr-1-config, so I added /local/apr/bin to the path. Then it couldn't fine libapr-1 so I added /local/apr/lib to the path, this is where the problems started. When APR built there wasn't a "libapr-1" file in /local/apr/lib, only libapr-1.a, libapr-1.la, libapr-1.dll.a. Did I build APR incorrectly? I'm trying to build this on windows List of steps to get where I am: 1. Install MINGW using MinGW Installation Manager Add packages: mingw-developer-toolkit mingw-base mingw-expat bin mingw32-libexpat dev msys-libopenssl dev msys-automake msys-autoconf Setup msys fstab (c:/mingw     /mingw) 2. Install Python (2.5) 3. Add Python and mingw to system path (C:\Python25;C:\MinGW\bin;C:\MinGW\msys\1.0\bin) 3. Get and build APR source (I could not get APR iconv to compile) Download: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.11.tar.gz http://mirror.nexcess.net/apache//apr/apr-1.5.2-win32-src.zip http://mirror.nexcess.net/apache//apr/apr-util-1.5.4-win32-src.zip http://sourceforge.net/projects/pcre/files/pcre/8.37/pcre-8.37.zip/download http://zlib.net/zlib128.zip Build: Extract all files to c:\mingw\msys\1.0\src Compile libiconv cd libiconv-1.11 ./configure CFLAGS="-O2 -s -mms-bitfields -march=i686" CXXFLAGS="-O2 -s -mms-bitfields -march=i686" make && make install Compile APR cd apr ./buildconf   ./configure CFLAGS="-O0 -s -mms-bitfields -march=i686" CXXFLAGS="-O0 -s -mms-bitfields -march=i686" make && make install cd .. Compile APR-UTIL cd apr-util-1.5.4 ./buildconf --with-apr=/usr/src/apr-1.5.2 ./configure CFLAGS="-O2 -s -mms-bitfields -march=i686" CXXFLAGS="-O2 -s -mms-bitfields -march=i686" --with-apr=/usr/src/apr-1.5.2 make && make install cd .. Compile PCRE cd pcre-.37 ./configure make && make install (make threw an error corrected with make clean, autoconf -i --force, started back at step 1) cd .. Compile ZLIB cd zlib-1.2.8 make -f win32/Makefile.gcc Compile nxlog cd nxlog-ce-2.8.1248 ./configure This is where the problems began. First it couldn't find apr-1-config. Fixed by adding /local/apr/bin to path. Now it can't find libapr-1, addint /local/apr/lib to the path doesn't help. There is no libapr-1 file in the MinGW directory tree. Ideas?   -pacmanwa  
  • What libapr-1 file are you referring to?
  • Make sure to build all dependencies from sources (including expat and openssl):
    • put .h in include
    • put .dll.a in lib
    • put .dll in bin
  • pre 1.0 openssl was not Heartbleed vulnerable - in case that's what this is about.