apu-config --libs has no output

Bug #96980 reported by Hyrum Wright
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apr-util (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: libaprutil1-dev

I'm building Subversion from source on a freshly installed Feisty system, something that I've been able to do hundreds of times on an Edgy system. I've installed the required -devel packages, as well as any dependent libraries.

When configuring Subversion it doesn't seem to be able to find the Berkeley DB development files. This is because it uses `apu-config --libs' to determine which libraries apr-util was linked against. Currently, the system-provided`apu-config --libs' does not return anything, whereas a custom build one returns `-ldb-4.4 -lsqlite3 -lexpat', which is what I expect from the apu-config provided by libaprutil1-dev.

Running `ldd /usr/lib/libaprutil-1.so' shows that apr-util is linked against libdb-4.4, libsqlite3, and libexpat, so I believe this is a bug.

Revision history for this message
Max Bowsher (maxb) wrote :

I think that being unable to use a library to satisfy the dependencies of manual from-source builds is a fairly serious bug. Could someone with the necessary privileges tag this bug with a suitably high "Importance" value, please?

Revision history for this message
ragaman (ragabonds) wrote :

I concur with Max Bowsher. Trying to install the latest version of SVN (1.5.1) from source which isn't in the Ubuntu repo for Hardy and can't do it without libaprutil-dev in order to build SVN with Berkeley DB support to use http and https schemes.

Trying to install llibaprutil-dev gives:

The following packages have unmet dependencies:
  libaprutil1-dev: Depends: libldap2-dev but it is not going to be installed

This is long overdue.

Revision history for this message
Daniel T Chen (crimsun) wrote :

On 8.10 alpha/beta, in a 64-bit chroot, I see:

...
When linking with libtool, an application should do something like:
  APU_LIBS="`apu-1-config --link-libtool --libs`"
or when linking directly:
  APU_LIBS="`apu-1-config --link-ld --libs`"
...

Does this suffice for your needs?

Changed in apr-util:
status: New → Incomplete
Revision history for this message
Max Bowsher (maxb) wrote :

Daniel: I'm uncertain what point you're trying to make by quoting the documentation. It doesn't seem relevant to the issue at hand.

The point is that upstream *by design* re-exports certain libraries from apu-1-config --libs, and this feature has been broken by a Debian patch.

I do understand why distributions desire to avoid unnecessary recursive linking of libraries because of the excessive pain that this causes to library transitions, but in this case in the eagerness of stomping on supposedly unnecessary linkage, an upstream feature has been broken.

Changed in apr-util:
status: Incomplete → New
Revision history for this message
Simon Morgan (sjmorgan) wrote :

Can reproduce this in 8.10.

~ $ apu-config --libs

~ $ ldd /usr/lib/libaprutil-1.so | grep libdb
 libdb-4.6.so => /usr/lib/libdb-4.6.so (0x00007f88026df000)
~ $ ldd /usr/lib/libaprutil-1.so | grep sqlite
 libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x00007fee6d158000)
~ $ ldd /usr/lib/libaprutil-1.so | grep expat
 libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f9ddb64d000)

Changed in apr-util:
status: New → Confirmed
Revision history for this message
Adam Jiang (jiang-adam) wrote :

Can reproduce this on Jaunty

~/workspace/packaging/subversion/subversion-1.5.6$ apu-config --libs
~/workspace/packaging/subversion/subversion-1.5.6$ ldd /usr/lib/libaprutil-1.so | grep libdb
 libdb-4.6.so => /usr/lib/libdb-4.6.so (0xb7e7d000)
~/workspace/packaging/subversion/subversion-1.5.6$ ldd /usr/lib/libaprutil-1.so | grep sqlite
 libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb7bbb000)
~/workspace/packaging/subversion/subversion-1.5.6$ ldd /usr/lib/libaprutil-1.so | grep expat
 libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7a94000)

It really disappoint me that the bugs remain over years in our Ubuntu release. I don't think this will help us to get Bug #1 fixed.

Is there anyone could please teach me to solve this problem. I mean the Bug #96980, not the unreachable Bug #1.

Revision history for this message
Stefan Sperling (stsp) wrote :

Well, so I got bitten by this, too.
Turns out that making "apu-config --libs" silent was done deliberately in Debian:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=378105

Note that Debian bug #378105, as well as this bug report, were both filed by Subversion developers :)
So I'd say we might as well sort this out between ourselves within Subversion and stop bothering distribution bug trackers.

Maybe Subversion is wrong snooping into the libraries apr-util is linked to?
Why can't we just hope that things will go ok if apu-config --db-version returns 4?
Isn't that good enough?
Also note that Arfrever has recently made enhancements to our berkeley-db.m4,
see Subversion's r35017 and subsequent commits to that file.
I'm not sure but maybe this may help to work around this problem, too.

Revision history for this message
Nick Webb (webbn) wrote :

I was really happy to see this post, and others that helped me isolate the issue I had building SVN 1.7.4 on Ubuntu 8.04 to /usr/bin/apu-1-config. For others getting snagged by this issue, there is a quick and dirty fix: simply update the LIBS="" line in /usr/bin/apu-1-config to include "-ldb" then build SVN.

nickw@myhost:/usr/bin$ diff apu-1-config apu-1-config.dist
30c30
< LIBS="-ldb"
---
> LIBS=

Hope that helps, it worked for me, YMMV.

Also, I did not experience this problem on the next LTS release, 10.10, so I assume it does not have this issue any longer. Running /usr/bin/apu-1-config --libs there does return " -ldb".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.