I found a problem with the build of apr-util-1.2.2 (libapr-util1-1.2.2-13.2.src.rpm), when both expat-2.0.0-13.2.x86_64.rpm and expat-32bit-2.0.0-13.2.x86_64.rpm are installed.
I am using SLES10 amd64 version, and building a amd64 version of libapr-util1.2.2.

This is the error-message that appears when I issue command: "rpmbuild -ba SPECS/libapr-util1.spec"

1.        gcc -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fPIC -Wall -fno-strict-aliasing -DLDAP_DEPRECATED -Wall -g -fpie -fstack-protector -pthread -pie -fno-pie -fno-PIE -o .libs/svn add-cmd.o blame-cmd.o cat-cmd.o checkout-cmd.o cleanup-cmd.o commit-cmd.o copy-cmd.o delete-cmd.o diff-cmd.o export-cmd.o help-cmd.o import-cmd.o info-cmd.o lock-cmd.o log-cmd.o ls-cmd.o main.o merge-cmd.o mkdir-cmd.o move-cmd.o notify.o prompt.o propdel-cmd.o propedit-cmd.o propget-cmd.o proplist-cmd.o props.o propset-cmd.o resolved-cmd.o revert-cmd.o status-cmd.o status.o switch-cmd.o unlock-cmd.o update-cmd.o util.o ../../../subversion/libsvn_client/.libs/libsvn_client-1.so /usr/src/packages/BUILD/subversion-1.3.x/subversion/libsvn_wc/.libs/libsvn_wc-1.so /usr/src/packages/BUILD/subversion-1.3.x/subversion/libsvn_ra/.libs/libsvn_ra-1.so ../../../subversion/libsvn_wc/.libs/libsvn_wc-1.so /usr/src/packages/BUILD/subversion-1.3.x/subversion/libsvn_diff/.libs/libsvn_diff-1.so ../../../subversion/libsvn_ra/.libs/libsvn_ra-1.so /usr/src/packages/BUILD/subversion-1.3.x/subversion/libsvn_ra_local/.libs/libsvn_ra_local-1.so /usr/src/packages/BUILD/subversion-1.3.x/subversion/libsvn_repos/.libs/libsvn_repos-1.so /usr/src/packages/BUILD/subversion-1.3.x/subversion/libsvn_fs/.libs/libsvn_fs-1.so /usr/src/packages/BUILD/subversion-1.3.x/subversion/libsvn_fs_fs/.libs/libsvn_fs_fs-1.so /usr/src/packages/BUILD/subversion-1.3.x/subversion/libsvn_fs_base/.libs/libsvn_fs_base-1.so /usr/src/packages/BUILD/subversion-1.3.x/subversion/libsvn_ra_svn/.libs/libsvn_ra_svn-1.so /usr/src/packages/BUILD/subversion-1.3.x/subversion/libsvn_delta/.libs/libsvn_delta-1.so ../../../subversion/libsvn_delta/.libs/libsvn_delta-1.so /usr/src/packages/BUILD/subversion-1.3.x/subversion/libsvn_subr/.libs/libsvn_subr-1.so ../../../subversion/libsvn_subr/.libs/libsvn_subr-1.so /usr/lib64/libaprutil-1.so /usr/lib/libexpat.so -lldap -llber -ldb-4.3 /usr/lib64/libexpat.so /usr/lib64/libapr-1.so -lrt -lcrypt -lpthread -ldl -lz -Wl,--rpath -Wl,/usr/lib64
2.        /usr/lib/libexpat.so: could not read symbols: File in wrong format

as the error-message shows, it's trying to include /usr/lib/libexpat.so, and the reason for this can be found in SOURCES/apr-util-1.2.2/build/apu-conf.m4, where a macro tests first for a 32bit version, and uses this if it exists.

What I did to make the sourcecode build, was to change the order in which the macro tests/includes, so that the 64bit-version takes presence over the 32bit version. I do not consider this a foolproof sollution, because this might break when building a 32bit version. What probably should be done is to use @libdir@/$libdir, or somehow check arcitechture for build before including a version of this lib (my autoconf knowlege is minimal).

Here is patch I used to get the package built:

--- apu-conf.m4.orig    2007-05-10 09:05:58.927993750 +0200
+++ apu-conf.m4 2007-05-10 09:06:28.277828000 +0200
@@ -64,13 +64,6 @@
  elif test -r "$1/include/expat.h" -a \
-    -r "$1/lib/libexpat.la"; then
-    dnl Expat 1.95.* installation (with libtool)
-    expat_include_dir="$1/include"
-    expat_ldflags="-L$1/lib"
-    expat_libs="-lexpat"
-    expat_libtool="$1/lib/libexpat.la"
-  elif test -r "$1/include/expat.h" -a \
    -r "$1/lib64/libexpat.la"; then
    dnl Expat 1.95.* installation on certain 64-bit platforms (with libtool)
@@ -78,6 +71,13 @@
  elif test -r "$1/include/expat.h" -a \
+    -r "$1/lib/libexpat.la"; then
+    dnl Expat 1.95.* installation (with libtool)
+    expat_include_dir="$1/include"
+    expat_ldflags="-L$1/lib"
+    expat_libs="-lexpat"
+    expat_libtool="$1/lib/libexpat.la"
+  elif test -r "$1/include/expat.h" -a \
    -r "$1/lib/libexpat.a"; then
    dnl Expat 1.95.* installation (without libtool)
    dnl FreeBSD textproc/expat2

Med vennlig hilsen/Best Regards


Daniel Bond

Østerdalsgata 1 K
0658 OSLO

Telefon:  +47 21 00 01 00
Telefax:  +47 21 00 01 01

Vi ber om at alle henvendelser går via post@nsn.no.
Du sikrer da en rask behandling av din henvendelse.
Jeg må gjøre deg oppmerksom på at det kan ta tid å
behandle din sak om du velger å ikke bruke post@nsn.no.

This email may contain NSN confidential and privileged material for
the sole use of the intended recipient.  Any review or distribution by
others is strictly prohibited.  If you are not the intended recipient
please contact the sender and delete all copies.