You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by 亚男(Timandes) <ti...@gmail.com> on 2015/01/06 02:00:42 UTC
--with-zlib seems to have no effect on libsvn_delta
This is my configuration options:
# ./configure --prefix=/usr/local/subversion-1.8.11 \
--with-apr=/usr/local/apr-1.4.6/bin/apr-1-config \
--with-apr-util=/usr/local/apr-util-1.5.1/bin/apu-1-config 、
--with-sqlite=/usr/local/sqlite-autoconf-3071501 、
--with-zlib=/usr/local/zlib-1.2.8
after that, is:
# make && make install
But when i try to use it, i found this warning:
# /usr/local/subversion-1.8.11/bin/svn --version
/usr/local/subversion-1.8.11/bin/svn: /lib64/libz.so.1: no version
information available (required by
/usr/local/subversion-1.8.11/lib/libsvn_delta-1.so.0)
svn, version 1.8.11 (r1643975)
...
Then i realize that configure program maybe use pre-installed zlib in my
system.
# ldd /usr/local/subversion/lib/libsvn_delta-1.so.0|grep libz
/usr/local/subversion/lib/libsvn_delta-1.so.0: /lib64/libz.so.1: no version
information available (required by
/usr/local/subversion/lib/libsvn_delta-1.so.0)
libz.so.1 => /lib64/libz.so.1 (0x00007ff5c959c000)
Other information:
# ln -s /usr/local/subversion-1.8.11 /usr/local/subversion
# uname -a
Linux log4.zg.zwt.qihoo.net 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22
GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/redhat-release
CentOS release 6.2 (Final)
# rpm -qa|grep zlib
zlib-1.2.3-27.el6.x86_64
# ll /usr/local/zlib-1.2.8/
total 12
drwxr-xr-x 2 root root 4096 Oct 16 09:20 include
drwxr-xr-x 3 root root 4096 Oct 16 09:20 lib
drwxr-xr-x 3 root root 4096 Oct 16 09:20 share
Part of config.log:
...
configure:21895: zlib library configuration
configure:21902: checking zlib.h usability
configure:21902: gcc -c -g -O2 -g -O2 -pthread -DLINUX=2 -D_REENTRANT
-D_GNU_SOURCE -I/usr/local/zlib-1.2.8/include conftest.c >&5
configure:21902: $? = 0
configure:21902: result: yes
configure:21902: checking zlib.h presence
configure:21902: gcc -E -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
-I/usr/local/zlib-1.2.8/include conftest.c
configure:21902: $? = 0
configure:21902: result: yes
configure:21902: checking for zlib.h
configure:21902: result: yes
configure:21910: checking for inflate in -lz
configure:21935: gcc -o conftest -g -O2 -g -O2 -pthread -DLINUX=2
-D_REENTRANT -D_GNU_SOURCE -I/usr/local/zlib-1.2.8/include
-L/usr/local/zlib-1.2.8/lib conftest.c -lz >&5
configure:21935: $? = 0
configure:21944: result: yes
...
ac_cv_header_zlib_h=yes
...
LDFLAGS=' -L/usr/local/zlib-1.2.8/lib'
...
SVN_ZLIB_INCLUDES='-I/usr/local/zlib-1.2.8/include'
SVN_ZLIB_LIBS='-lz'
...
Re: --with-zlib seems to have no effect on libsvn_delta
Posted by Philip Martin <ph...@wandisco.com>.
亚男(Timandes) <ti...@gmail.com> writes:
> This is my configuration options:
>
> # ./configure --prefix=/usr/local/subversion-1.8.11 \
> --with-apr=/usr/local/apr-1.4.6/bin/apr-1-config \
> --with-apr-util=/usr/local/apr-util-1.5.1/bin/apu-1-config 、
> --with-sqlite=/usr/local/sqlite-autoconf-3071501 、
> --with-zlib=/usr/local/zlib-1.2.8
>
> after that, is:
> # make && make install
>
> But when i try to use it, i found this warning:
> # /usr/local/subversion-1.8.11/bin/svn --version
> /usr/local/subversion-1.8.11/bin/svn: /lib64/libz.so.1: no version
> information available (required by
> /usr/local/subversion-1.8.11/lib/libsvn_delta-1.so.0)
> svn, version 1.8.11 (r1643975)
> ...
--with-zlib has caused configure to find the local zlib however it has
not arranged for RPATH to be set in the shared libraries to find zlib in
the non-standard location. You have two options:
- run your current build using something like:
LD_LIBRARY_PATH=/usr/local/zlib-1.2.8/lib
- build again using something like
LD_FLAGS=-Wl,-rpath,/usr/local/zlib-1.2.8/lib
--
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Re: --with-zlib seems to have no effect on libsvn_delta
Posted by Stefan Sperling <st...@elego.de>.
On Tue, Jan 06, 2015 at 09:00:42AM +0800, 亚男(Timandes) wrote:
> This is my configuration options:
>
> # ./configure --prefix=/usr/local/subversion-1.8.11 \
> --with-apr=/usr/local/apr-1.4.6/bin/apr-1-config \
> --with-apr-util=/usr/local/apr-util-1.5.1/bin/apu-1-config 、
> --with-sqlite=/usr/local/sqlite-autoconf-3071501 、
> --with-zlib=/usr/local/zlib-1.2.8
>
> after that, is:
> # make && make install
>
> But when i try to use it, i found this warning:
> # /usr/local/subversion-1.8.11/bin/svn --version
> /usr/local/subversion-1.8.11/bin/svn: /lib64/libz.so.1: no version
> information available (required by
> /usr/local/subversion-1.8.11/lib/libsvn_delta-1.so.0)
> svn, version 1.8.11 (r1643975)
> ...
>
> Then i realize that configure program maybe use pre-installed zlib in my
> system.
> # ldd /usr/local/subversion/lib/libsvn_delta-1.so.0|grep libz
> /usr/local/subversion/lib/libsvn_delta-1.so.0: /lib64/libz.so.1: no version
> information available (required by
> /usr/local/subversion/lib/libsvn_delta-1.so.0)
> libz.so.1 => /lib64/libz.so.1 (0x00007ff5c959c000)
>
> Other information:
> # ln -s /usr/local/subversion-1.8.11 /usr/local/subversion
>
> # uname -a
> Linux log4.zg.zwt.qihoo.net 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22
> GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
>
> # cat /etc/redhat-release
> CentOS release 6.2 (Final)
>
> # rpm -qa|grep zlib
> zlib-1.2.3-27.el6.x86_64
>
> # ll /usr/local/zlib-1.2.8/
> total 12
> drwxr-xr-x 2 root root 4096 Oct 16 09:20 include
> drwxr-xr-x 3 root root 4096 Oct 16 09:20 lib
> drwxr-xr-x 3 root root 4096 Oct 16 09:20 share
>
> Part of config.log:
> ...
> configure:21895: zlib library configuration
> configure:21902: checking zlib.h usability
> configure:21902: gcc -c -g -O2 -g -O2 -pthread -DLINUX=2 -D_REENTRANT
> -D_GNU_SOURCE -I/usr/local/zlib-1.2.8/include conftest.c >&5
> configure:21902: $? = 0
> configure:21902: result: yes
> configure:21902: checking zlib.h presence
> configure:21902: gcc -E -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
> -I/usr/local/zlib-1.2.8/include conftest.c
> configure:21902: $? = 0
> configure:21902: result: yes
> configure:21902: checking for zlib.h
> configure:21902: result: yes
> configure:21910: checking for inflate in -lz
> configure:21935: gcc -o conftest -g -O2 -g -O2 -pthread -DLINUX=2
> -D_REENTRANT -D_GNU_SOURCE -I/usr/local/zlib-1.2.8/include
> -L/usr/local/zlib-1.2.8/lib conftest.c -lz >&5
> configure:21935: $? = 0
> configure:21944: result: yes
> ...
> ac_cv_header_zlib_h=yes
> ...
> LDFLAGS=' -L/usr/local/zlib-1.2.8/lib'
> ...
> SVN_ZLIB_INCLUDES='-I/usr/local/zlib-1.2.8/include'
> SVN_ZLIB_LIBS='-lz'
> ...
This is likely a problem caused by libtool.
libtool passes several -L flags to the linker, one for each library
directory used during the build. Sometimes these -L flags are passed
in the wrong order.
My guess is that there is another library (not zlib) in /lib64 used by
the build. If libtool generates linker arguments which contain -L/lib64
before -L/usr/local/zlib-1.2.8/lib the linker finds libz in /lib64 first!
To verify if this theory, run libtool in debug mode and check the linker
arguments used. For example:
$ touch subversion/libsvn_subr/compress.c
$ make subversion/libsvn_subr/libsvn_subr-1.la
/bin/sh "/home/stsp/svn/svn-trunk/libtool" --tag=CC --silent --mode=compile gcc -std=c89 ...
You see a long libtool command line which includes the --silent option.
Copy-paste the entire command line and replace --silent with --debug, and
run it. You'll see the argument list libtool is generating for the linker.
Is -L/lib64 before -L/usr/local/zlib-1.2.8/lib?
I had the same problem and could only work around it by not using any
dependencies from a library directory I did not want the build to use.
So if you don't use any library from /lib64 this problem should disappear.
You could install other dependencies (such as APR, sqlite, etc.) into
/usr/local/ and make the build use them, too.