IpFire build : cmake compilation error

Hi guys, i’m currently cross-compiling IpFire for armv5tel. cmake is encountering compilation error with zlib which does not seem to be found. I don’t see how to resolve that. I would have tried a manual compilation under the chrooted LFS environnement under x64, but as i’m cross-compiling for arm…Some help will be really appreciated :slight_smile: Here’s the console output :

cmake (3.11.2) [ 2:29 ][ FAIL ]

-- Looking for C++ include cxxabi.h
-- Looking for C++ include cxxabi.h - found
-- Checking whether cxxabi works with this C++ compiler
-- Checking whether cxxabi works with this C++ compiler - yes
-- Checking whether CXX compiler has getloadavg
-- Checking whether CXX compiler has getloadavg - yes
-- Checking whether <ext/stdio_filebuf.h> is available
-- Checking whether <ext/stdio_filebuf.h> is available - yes
-- Using system-installed BZIP2
-- Using system-installed CURL
-- Using system-installed EXPAT
-- Using system-installed FORM
-- Using system-installed LIBARCHIVE
-- Using system-installed LIBLZMA
-- Using system-installed ZLIB
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")
CMake Error at CMakeLists.txt:386 (message):
CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!
Call Stack (most recent call first):

-- Configuring incomplete, errors occurred!
See also "/usr/src/cmake-3.11.2/CMakeFiles/CMakeOutput.log".
See also "/usr/src/cmake-3.11.2/CMakeFiles/CMakeError.log".
Error when bootstrapping CMake:
Problem while running initial CMake
make: *** [cmake:77: /usr/src/log/cmake-3.11.2] Error 11

ERROR: Building cmake [ FAIL ]
Check /DEV/ipfire-2.x/log/_build.ipfire.log for errors if applicable

I have not tried to cross compile this long, long time because the compile on my odroidc2 was faster than on my old i5 laptop.

The error looks strange because zlib is built long before cmake (even before gcc) and should present in the build environment.

Indeed. I remember such a pb when i was compiling LFS distros a long long time ago :wink: Zlib is well present in the chroot env. I suppose there’s a lack of paths somewhere in the code (LD_LIB_PATH ou include). Is there a way to try some manual build into the ./make.sh shell environnement ? Hi could not find come usefull docs about that. Thanks. Pierre

Set ENABLE_RAMDISK=off in .config and try “./make.sh build” again run into the error.
This will not cleanup /usr/src so the source should still there.

Now you can run “./make.sh shell” , change to /usr/src/… and run tests.