Forum

Unable to compile Hiawatha 9.6 on Ubuntu 14.04

jint
21 August 2014, 21:54
Hiawatha version: 9.6
Operating System: Ubuntu 14.04.1 LTS, Trusty Tahr
(uname: Linux 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux)

Initial Issue:
/tmp/hiawatha-9.6/src/log.c:20:18: fatal error: zlib.h: No such file or directory
#include <zlib.h>
^
compilation terminated.
make[2]: *** [CMakeFiles/hiawatha.dir/src/log.c.o] Error 1
make[1]: *** [CMakeFiles/hiawatha.dir/all] Error 2
make: *** [all] Error 2

Installed build essentials and the zlib dev package(s).

Second issue.

hiawatha-9.6/build# make
[ 4%] Built target cgi-wrapper
[ 63%] Built target polarssl
Linking C executable hiawatha
CMakeFiles/hiawatha.dir/src/log.c.o: In function `gzip_logfile':
/tmp/hiawatha-9.6/src/log.c:548: undefined reference to `gzdopen'
/tmp/hiawatha-9.6/src/log.c:564: undefined reference to `gzwrite'
/tmp/hiawatha-9.6/src/log.c:575: undefined reference to `gzclose'
collect2: error: ld returned 1 exit status
make[2]: *** [hiawatha] Error 1
make[1]: *** [CMakeFiles/hiawatha.dir/all] Error 2
make: *** [all] Error 2

I have the confirmed the presence of the following:
/usr/lib/x86_64-linux-gnu/libz.a
/usr/lib/x86_64-linux-gnu/libz.so
/usr/include/zlib.h

I attempted to force it to use clang by setting CC/CXX vars to clang per suggestion on a similar topic. Results were the same.
Unsure what to do.
Hugo Leisink
21 August 2014, 21:58
Execute the extra/make_debian_package script and follow the package-installation instructions.
jint
21 August 2014, 22:07
Upon execution I received:

extra/make_debian_package: 53: extra/make_debian_package: dh_testdir: not found
/usr/bin/fakeroot: line 178: dh_testroot: command not found
extra/make_debian_package: 58: extra/make_debian_package: dh_clean: not found
extra/make_debian_package: 60: extra/make_debian_package: dh_installdirs: not found
make: *** No rule to make target `install'. Stop.
extra/make_debian_package: 62: extra/make_debian_package: dh_strip: not found
gzip: debian/hiawatha/usr/share/man/man1/*: No such file or directory
extra/make_debian_package: 64: extra/make_debian_package: cannot create debian/hiawatha/etc/hiawatha/hiawatha.conf: Directory nonexistent
cp: cannot create directory 'debian/hiawatha/etc': No such file or directory
cp: cannot create directory 'debian/hiawatha/etc': No such file or directory
chmod: cannot access 'debian/hiawatha/etc/init.d/*': No such file or directory
/usr/bin/fakeroot: line 178: dh_installdocs: command not found
/usr/bin/fakeroot: line 178: dh_installchangelogs: command not found
gzip: debian/hiawatha/usr/share/doc/hiawatha/changelog*: No such file or directory
extra/make_debian_package: 72: extra/make_debian_package: dh_installinit: not found
/usr/bin/fakeroot: line 178: dh_installdeb: command not found
extra/make_debian_package: 74: extra/make_debian_package: dh_shlibdeps: not found
/usr/bin/fakeroot: line 178: dh_gencontrol: command not found
/usr/bin/fakeroot: line 178: dh_md5sums: command not found
/usr/bin/fakeroot: line 178: dh_builddeb: command not found
Hugo Leisink
21 August 2014, 22:15
*bangs head against wall* Seems there is a stupid bug in that script. Replace "fakeroot" at line 22 with "${package}".

Anyhow, install these Debian packages: make gcc libc6-dev dpkg-dev debhelper fakeroot libxml2-dev libxslt1-dev zlib1g-dev
jint
23 August 2014, 15:10
Sorry for the late response. Finally got around to it. Your suggestion(s) worked fine. Thanks a lot!
This topic has been closed.