On 08/21/2011 08:11 PM, Sergei Steshenko wrote:
Hello,

I am building a lot of stuff from sources in a manner each
target is installed in a separate directory, e.g.:

/mnt/sdb8/sergei/AFSWD_debug/20110601/file-5.08
/mnt/sdb8/sergei/AFSWD_debug/20110601/mozilla_nss-3.12.11_nspr-4.8.9
/mnt/sdb8/sergei/AFSWD_debug/20110601/db-5.2.28
,
etc.


The build is done automatically, and LD_LIBRARY_PATH is set
automatically as needed, for example, for rpm-4.9.1 it is
set this way:

"

LD_LIBRARY_PATH=/mnt/sdb8/sergei/AFSWD_debug/20110601/bison-2.4.3/lib:/mnt/sdb8/sergei/AFSWD_debug/20110601/db-5.2.28/lib:/mnt/sdb8/sergei/AFSWD_debug/20110601/file-5.08/lib:/mnt/sdb8/sergei/AFSWD_debug/20110601/gettext-0.18/lib:/mnt/sdb8/sergei/AFSWD_debug/20110601/libiconv_pre-1.13.1/lib:/mnt/sdb8/sergei/AFSWD_debug/20110601/libtool-2.4/lib:/mnt/sdb8/sergei/AFSWD_debug/20110601/lua-5.1.4/lib:/mnt/sdb8/sergei/AFSWD_debug/20110601/mozilla_nss-3.12.11_nspr-4.8.9/lib:/mnt/sdb8/sergei/AFSWD_debug/20110601/ncurses-5.8/lib:/mnt/sdb8/sergei/AFSWD_debug/20110601/popt-1.16/lib:/mnt/sdb8/sergei/AFSWD_debug/20110601/readline-6.2/lib:/mnt/sdb8/sergei/AFSWD_debug/20110601/sqlite-autoconf-3070701/lib:/mnt/sdb8/sergei/AFSWD_debug/20110601/tcl-8.5.9/lib:/mnt/sdb8/sergei/AFSWD_debug/20110601/tcl-8.5.9/lib/expect5.44.1.15:/mnt/sdb8/sergei/AFSWD_debug/20110601/tcl-8.5.9/lib/tcl8.5/graphviz:/mnt/sdb8/sergei/AFSWD_debug/20110601/zlib-1.2.5/lib
export LD_LIBRARY_PATH

".

'make check' first of all had a lot of failures because 'rpm' couldn't load
'libdb-5.2.so' file.

Digging the issue I've found that the root cause is in
'rpm-4.9.1/tests/atlocal.in' file, specifically in this:

LD_LIBRARY_PATH="${abs_builddir}/testing@usrlibdir@"

line. In reality this line becomes

LD_LIBRARY_PATH="${abs_builddir}/testing/mnt/sdb8/sergei/AFSWD_debug/20110601/rpm-4.9.1/lib"

in 'rpm-4.9.1/tests/atlocal' file,  which is senseless anyway, i.e. this path
doesn't exist.

To improve the situation I repalced

LD_LIBRARY_PATH="${abs_builddir}/testing@usrlibdir@"

with

export LD_LIBRARY_PATH="${abs_builddir}/lib:$LD_LIBRARY_PATH"

- in my case LD_LIBRARY_PATH is definitely set. But a better
solution is needed for general case.

That should be avoidable by building with LDFLAGS="-L<lots of paths>" instead. Although having the test-suite just prepend instead of replace LD_LIBRARY_PATH wouldn't be too bad...


Still there are a lot of failures - mostly of

+error: cannot open Packages database in /${prefix}/var/lib/rpm
kind.

IIRC this is a bug somewhere in the config/make system that you'll encounter if you build rpm without an explicit --prefix. Also there were (and quite possibly still are) bugs in the test-suite which cause some cases to fail unless --prefix=/usr is used.

There should be a way to test 'rpm' not using root privileges.

The test-suite is intended to be run without root privileges (for obvious reasons), that's why it uses fakechroot extensively. However (on top of the above bugs) for all released rpm versions it occasionally tries to read from the system rpmdb, and can incorrectly fail because of that. In rpm.org HEAD, all of the test-cases run fully inside fakechroot environment so it's not subject to problems like that anymore.

        - Panu -
_______________________________________________
Rpm-maint mailing list
[email protected]
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to