Forum

Compile Error Debian with Hiawatha 10.4

Rene
18 October 2016, 13:44
error messages:
[ 4%] Building C object CMakeFiles/cgi-wrapper.dir/src/userconfig.c.o
Linking C executable cgi-wrapper
CMakeFiles/cgi-wrapper.dir/src/libfs.c.o: In function `gzip_file':
/src/hiawatha-10.4/src/libfs.c:388: undefined reference to `gzopen'
/src/hiawatha-10.4/src/libfs.c:409: undefined reference to `gzclose'
/src/hiawatha-10.4/src/libfs.c:402: undefined reference to `gzwrite'
/src/hiawatha-10.4/src/libfs.c:409: undefined reference to `gzclose'
collect2: error: ld returned 1 exit status
CMakeFiles/cgi-wrapper.dir/build.make:210: recipe for target 'cgi-wrapper' failed
make[2]: *** [cgi-wrapper] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/cgi-wrapper.dir/all' failed
make[1]: *** [CMakeFiles/cgi-wrapper.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2

Deian Version: 8.6
zlib1g-dev is installed

gcc -v:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10)
Hugo Leisink
18 October 2016, 16:47
Have you tried the script extra/make_debian_package yet?
Rene
18 October 2016, 18:30
i dont need the package, i will only compile the webserver (i start them from the src-path).

Version 10.3 compiles perfect on my machine.
Hugo Leisink
18 October 2016, 19:43
Sure, but that script checks for build requirements. If that one runs fine, manual compilation will too.
Rene
18 October 2016, 19:59
i have installed the dependencies and execute the script make_debian_package:

-- Build files have been written to: /src/hiawatha-10.4
make: *** No targets specified and no makefile found. Stop.

make build files:

#!/bin/sh

cmake \
-DENABLE_CACHE=OFF \
-DENABLE_DEBUG=OFF \
-DENABLE_IPV6=ON \
-DENABLE_MONITOR=OFF \
-DENABLE_RPROXY=ON \
-DENABLE_TLS=ON \
-DENABLE_TOOLKIT=ON \
-DENABLE_XSLT=OFF \
-DENABLE_TOMAHAWK=OFF \
-DCONFIG_DIR=/etc/service/www/conf \
-DLOG_DIR=/var/log/www \
-DPID_DIR=/var/run \
-DWEBROOT_DIR=/var/www/ \
-DWORK_DIR=/tmp/hiawatha

same error.
Rene
21 October 2016, 06:52
Hello,
i have installed llvm with clang, remove the old build directory and build them again from source, now it works.

Rene
Hugo Leisink
21 October 2016, 07:20
Weird. I always make sure that Hiawatha compiles with both gcc and clang. I use clang myself most of the time, but just checked the latest version with gcc. It compiled just fine. Anyway, good to hear it works now.
This topic has been closed.