[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: [EXT] Re: building subversion --with-zlib=.... seems to have no effect

From: Hiran CHAUDHURI <hiran.chaudhuri_at_amadeus.com>
Date: Thu, 31 Aug 2017 12:01:15 +0000

From: Daniel Shahaf [mailto:d.s_at_daniel.shahaf.name]
>Hiran CHAUDHURI wrote on Mon, 14 Aug 2017 14:25 +0000:
>> I am building subversion from source but always see the output files
>> depend on the system-supplied zlib which is way older than the one I want to use.
>
>I gather you build 1.9.5.

Confirmed. That is the version I build, based on Apache httpd 2.4.27 and APR 1.6.2.

>> ./configure --with-apr=$PREFIX/apr --with-apr-util=$PREFIX /apr-util
>> --with-sqlite=$PREFIX /sqlite
>>
>> which gives me the error message that subversion requires zlib. So far
>> so good.
>
>This implies that configure doesn't find zlib in the default paths.
>That's odd, given that later you indicate that libz was found in /lib64, which probably _is_ one of the default paths.

In fact there is a zlib installed in a default location, but it is not as current as the zlib I want to use. So I compile it myself (zlib 1.2.11), install it in my path and want to compile subversion using this new zlib.

>Are there any clues in configure's output from this run?

I just ran that command again. I see this:

-STDOUT---------------------->8---------
configure: zlib library configuration via pkg-config
checking for zlib library... no
configure: zlib library configuration
checking zlib.h usability... no
checking zlib.h presence... no
checking for zlib.h... no
configure: error: subversion requires zlib
-STDOUT------8<-------------------------

-config.log---------------------->8---------
configure:22665: zlib library configuration via pkg-config
configure:22668: checking for zlib library
configure:22697: result: no
configure:22704: zlib library configuration
configure:22706: checking zlib.h usability
configure:22706: gcc -c -g -O2 -g -O2 -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE conftest.c >&5
conftest.c:75:18: error: zlib.h: No such file or directory
configure:22706: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "subversion"
| #define PACKAGE_TARNAME "subversion"
| #define PACKAGE_VERSION "1.9.5"
| #define PACKAGE_STRING "subversion 1.9.5"
| #define PACKAGE_BUGREPORT "http://subversion.apache.org/"
| #define PACKAGE_URL ""
| #define SVN_SOVERSION 0
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define SVN_HAVE_MEMCACHE 1
| #define SVN_HAS_ATOMIC_BUILTINS 1
| #define SVN_BINDIR "/usr/local/bin"
| #define SVN_LOCALE_DIR "/usr/local/share/locale"
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define SVN_FS_WANT_DB_MAJOR 4
| #define SVN_FS_WANT_DB_MINOR 0
| #define SVN_FS_WANT_DB_PATCH 14
| #define SVN_HAVE_GPG_AGENT 1
| #define ENABLE_NLS 1
| #define HAVE_BIND_TEXTDOMAIN_CODESET 1
| #define STDC_HEADERS 1
| #define HAVE_VPRINTF 1
| #define HAVE_SYMLINK 1
| #define HAVE_READLINK 1
| #define HAVE_SYS_UTSNAME_H 1
| #define HAVE_UNAME 1
| #define HAVE_TCGETATTR 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_TCSETATTR 1
| #define HAVE_TERMIOS_H 1
| /* end confdefs.h. */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| # include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| # include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <zlib.h>
configure:22706: result: no
configure:22706: checking zlib.h presence
configure:22706: gcc -E -DLINUX -D_REENTRANT -D_GNU_SOURCE conftest.c
conftest.c:42:18: error: zlib.h: No such file or directory
configure:22706: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "subversion"
| #define PACKAGE_TARNAME "subversion"
| #define PACKAGE_VERSION "1.9.5"
| #define PACKAGE_STRING "subversion 1.9.5"
| #define PACKAGE_BUGREPORT "http://subversion.apache.org/"
| #define PACKAGE_URL ""
| #define SVN_SOVERSION 0
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define SVN_HAVE_MEMCACHE 1
| #define SVN_HAS_ATOMIC_BUILTINS 1
| #define SVN_BINDIR "/usr/local/bin"
| #define SVN_LOCALE_DIR "/usr/local/share/locale"
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define SVN_FS_WANT_DB_MAJOR 4
| #define SVN_FS_WANT_DB_MINOR 0
| #define SVN_FS_WANT_DB_PATCH 14
| #define SVN_HAVE_GPG_AGENT 1
| #define ENABLE_NLS 1
| #define HAVE_BIND_TEXTDOMAIN_CODESET 1
| #define STDC_HEADERS 1
| #define HAVE_VPRINTF 1
| #define HAVE_SYMLINK 1
| #define HAVE_READLINK 1
| #define HAVE_SYS_UTSNAME_H 1
| #define HAVE_UNAME 1
| #define HAVE_TCGETATTR 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_TCSETATTR 1
| #define HAVE_TERMIOS_H 1
| /* end confdefs.h. */
| #include <zlib.h>
configure:22706: result: no
configure:22706: checking for zlib.h
configure:22706: result: no
configure:22760: error: subversion requires zlib
-config.log------8<-------------------------

From this output I would conclude the system-supplied library is not found/accepted as the headers (or zlib-devel) is not installed.

>> After make and make install, when I check the compiled libraries I get
>> this output:
>>
>> ldd libsvn_client-1.so ... libz.so.1 => /lib64/libz.so.1
>> (0x00007fc978e9f000) ...
>>
>> This shows me that the system zlib library is indeed referenced. How
>> would I compile subversion with zlib in a nonstandard location?
>
>Possibly apr or serf bring in another copy of zlib than the one you intended.
>What's the output of «grep "^SVN_.*LIBS =" Makefile»?

Here is what I get:
/buildApache/build/subversion-1.9.5> grep "^SVN_.*LIBS =" Makefile
SVN_APR_LIBS = -L /buildApache/build/httpd-2.4.27/srclib/apr -lapr-1
SVN_APRUTIL_LIBS = -L /buildApache/build/httpd-2.4.27/srclib/apr-util -laprutil-1 -lldap -llber -lexpat
SVN_APR_MEMCACHE_LIBS =
SVN_DB_LIBS =
SVN_GPG_AGENT_LIBS = @SVN_GPG_AGENT_LIBS@
SVN_GNOME_KEYRING_LIBS =
SVN_KWALLET_LIBS =
SVN_MAGIC_LIBS =
SVN_INTL_LIBS =
SVN_SASL_LIBS =
SVN_SERF_LIBS =
SVN_SQLITE_LIBS = -L$PREFIX/sqlite/lib -lsqlite3
SVN_XML_LIBS =
SVN_ZLIB_LIBS = -L$PREFIX/zlib/lib -lz
 /buildApache/build/subversion-1.9.5>

> Can you show the linker invocation of libsvn_client?

I may need more information here. How would I find the desired output/command?

Meanwhile I am playing around with
env LDFLAGS='-Wl,-R$PREFIX/openssl/lib,-R$PREFIX/zlib/lib' ./configure .......

It seems this helps to set the run path in the executables and libraries, but I am still trying to figure out whether Subversion was compiled using the correct libraries.

Hiran
Received on 2017-08-31 14:01:28 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.