zlib.h required even when using --with-miniz
(1) By andygoth on 2018-09-22 00:02:27 [link] [source]
I am unable to build using --with-miniz because shell.c requires zlib.h.
Yes, this particular system lacks zlib.h. I don't know why. I didn't set it up, but I'm stuck with it.
$ f info checkout: bd2bf81c352f67940f1cfbb8556ff94c65858680 2018-08-31 13:05:36 UTC $ ./configure --with-miniz --with-openssl=none Host System...x86_64-unknown-linux-gnu Build System...x86_64-unknown-linux-gnu C compiler... cc -g -O2 C++ compiler... c++ -g -O2 Build C compiler...cc Checking for stdlib.h...ok Checking for uint32_t...ok Checking for uint16_t...ok Checking for int16_t...ok Checking for uint8_t...ok Checking for pread...ok Checking for tclsh...ok Legacy mv/rm support enabled Checking libs for iconv...none needed Using miniz for compression Checking libs for gethostbyname...none needed Checking libs for socket...none needed Checking libs for ns_name_uncompress...no Checking for utime...ok Checking for usleep...ok Checking for strchrnul...ok Checking for pledge...not found Checking for backtrace...ok Checking for getloadavg...ok Checking for getpassphrase...not found Checking libs for getpass...none needed Checking libs for sin...-lm Checking libs for fuse_mount...no Checking for dlopen in dl...-ldl Created Makefile from Makefile.in Created autoconfig.h $ make cc ... -c src/shell.c -o bld/shell.o src/shell.c:4052:18: error: zlib.h: No such file or directory $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.8 (Tikanga) CentOS release 5.8 (Final)
(2) By Richard Hipp (drh) on 2018-09-22 16:27:55 in reply to 1 [source]
Your work-around, pending a proper fix (which will be tricky), is to manually edit the src/main.mk file to disable all occurrences of SQLITE_HAVE_ZLIB. Perhaps change every "SQLITE_HAVE_ZLIB" to "SQLITE_HAVE_ZLIB_OFF".
(3) By andygoth on 2018-09-26 01:38:16 in reply to 2 [link] [source]
This workaround seemed to do the trick, though I am still fighting the smtp.c resolver issues.
(4) By Richard Hipp (drh) on 2018-09-26 13:20:47 in reply to 3 [link] [source]
Please try adding -DFOSSIL_OMIT_DNS to the Makefile. Report back whether or not that helps.
(5) By andygoth on 2018-09-26 16:18:31 in reply to 4 [link] [source]
-DFOSSIL_OMIT_DNS did the trick, thanks!
Though, we're on the wrong thread at this point. Oh well. I'm still having to use -DSQLITE_HAVE_ZLIB_OFF to deal with the zlib.h issue, by the way.
Also, Markdown's handling of _ is getting to be really annoying.
(6) By Warren Young (wyoung) on 2018-09-26 18:24:36 in reply to 5 [link] [source]
Markdown's handling of _ is getting to be really annoying.
If you make it a habit to put backticks around inline code, commands, etc., you'll avoid such problems and they'll be specially styled besides, indicating computer literal text.