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

Re: Failed to build 1.7.0-beta3 on IBM AIX 5.3

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Mon, 22 Aug 2011 12:53:04 +0100

Hyrum K Wright <hyrum.wright_at_wandisco.com> writes:

> For some reason, zlib isn't being linked in. The compressBound()
> symbol is defined in zlib, and I would expect to see '-lz' in the link
> command, but it isn't. I do note you're using a non-standard zlib
> location in your configure command, but I don't know if the problem is
> released to our configure scripts or something else.
>
> Thanks for the report.

Using "make EXTRA_LDFLAGS=-lz" should be a workaround.

Looking at my Linux build I see "SVN_ZLIB_LIBS = -lz" in the Makefile
and I see SVN_ZLIB_LIBS used in build-outputs.mk when linking
libsvn_subr, libsvn_delta and libsvn_diff. That causes -lz to be added
to the libtool files like libsvn_subr-1.la. However the final link
command doesn't specify -lz explicitly:

cd subversion/svn && /bin/bash /home/pm/sw/subversion/obj/libtool --tag=CC --silent --mode=link gcc -shared -g -pthread -rpath /usr/local/subversionx/lib -o svn add-cmd.lo blame-cmd.lo cat-cmd.lo changelist-cmd.lo checkout-cmd.lo cleanup-cmd.lo commit-cmd.lo conflict-callbacks.lo copy-cmd.lo delete-cmd.lo diff-cmd.lo export-cmd.lo help-cmd.lo import-cmd.lo info-cmd.lo list-cmd.lo lock-cmd.lo log-cmd.lo main.lo merge-cmd.lo mergeinfo-cmd.lo mkdir-cmd.lo move-cmd.lo notify.lo patch-cmd.lo propdel-cmd.lo propedit-cmd.lo propget-cmd.lo proplist-cmd.lo props.lo propset-cmd.lo relocate-cmd.lo resolve-cmd.lo resolved-cmd.lo revert-cmd.lo status-cmd.lo status.lo switch-cmd.lo tree-conflicts.lo unlock-cmd.lo update-cmd.lo upgrade-cmd.lo util.lo ../../subversion/libsvn_client/libsvn_client-1.la ../../subversion/libsvn_wc/libsvn_wc-1.la ../../subversion/libsvn_ra/libsvn_ra-1.la ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_diff/libsvn_diff-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la -
laprutil-1 -lapr-1 -lneon

If I execute that command manually with --silent changed to --verbose I
see the link command:

libtool: link: gcc -g -o .libs/svn .libs/add-cmd.o .libs/blame-cmd.o .libs/cat-cmd.o .libs/changelist-cmd.o .libs/checkout-cmd.o .libs/cleanup-cmd.o .libs/commit-cmd.o .libs/conflict-callbacks.o .libs/copy-cmd.o .libs/delete-cmd.o .libs/diff-cmd.o .libs/export-cmd.o .libs/help-cmd.o .libs/import-cmd.o .libs/info-cmd.o .libs/list-cmd.o .libs/lock-cmd.o .libs/log-cmd.o .libs/main.o .libs/merge-cmd.o .libs/mergeinfo-cmd.o .libs/mkdir-cmd.o .libs/move-cmd.o .libs/notify.o .libs/patch-cmd.o .libs/propdel-cmd.o .libs/propedit-cmd.o .libs/propget-cmd.o .libs/proplist-cmd.o .libs/props.o .libs/propset-cmd.o .libs/relocate-cmd.o .libs/resolve-cmd.o .libs/resolved-cmd.o .libs/revert-cmd.o .libs/status-cmd.o .libs/status.o .libs/switch-cmd.o .libs/tree-conflicts.o .libs/unlock-cmd.o .libs/update-cmd.o .libs/upgrade-cmd.o .libs/util.o ../../subversion/libsvn_client/.libs/libsvn_client-1.so ../../subversion/libsvn_wc/.libs/libsvn_wc-1.so ../../subversion/libsvn_ra/.libs/libsvn_ra-1.so ../../subversion/libsvn_delta/.libs
/libsvn_delta-1.so ../../subversion/libsvn_diff/.libs/libsvn_diff-1.so ../../subversion/libsvn_subr/.libs/libsvn_subr-1.so /usr/lib/libaprutil-1.so /usr/lib/libapr-1.so -lneon -pthread -Wl,-rpath -Wl,/usr/local/subversionx/lib

That doesn't specify -lz explicitly either, so I guess we are relying on
the ELF NEEDED sections to pull in zlib. Since Subversion uses zlib
explicitly perhaps we should be linking to zlib explicitly? We don't
really seem to be consistent here, I see -lneon but not -lserf or -ldb.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2011-08-22 13:59:38 CEST

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

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