Summary: A complete build of Subversion 0.37 on Solaris 9 using
Forte 7.
Not satisfied with my success with BerkeleyDB 4.1, I decided to
rebuild Subversion using 4.2 on Solaris 9 because you guys kept
insisting it was possible on Linux :-). Also, I had noticed gcc
(3.3.2 from sunfreeware.com) having trouble providing Solaris' ld
with adequate shared library paths on previous builds. I had tried
-R, -Xlinker -R, LD_RUN_PATH, etc. So, I switched to Forte since
its dependencies are standard Solaris fare, it links everything
properly with no fuss, and I'd gain a little optimization along the
way.
I started by rebuilding OpenSSL 0.9.7c. I originally forgot that
the Configure script has to be modified by adding a
`-R/usr/local/ssl/lib' right before the `-lsocket' on whichever
line corresponds to your target system. Then I ran:
./Configure solaris-sparcv9-cc shared
The db-4.2.52 build was straightforward:
$ more CONFIGURE_db-4.2.52
#!/bin/sh
CC=cc; export CC
CFLAGS="-xtarget=ultra2"; export CFLAGS
../dist/configure \
--prefix=/opt/pkgs/db-4.2.52
After make install, I symlinked /usr/local/BerkeleyDB.4.2 to its
new home (/opt is linked to /usr/local, BTW):
$ cd /usr/local; sudo ln -s pkgs/db-4.2.52 BerkeleyDB.4.2
This works well because I can easily move between minor revisions
of db-4.2 in the future without affecting binaries depending on the
location of the shared libdb-4.2.so.
Apache2 took a few tries, but this seems to work well:
$ more CONFIGURE_httpd-2.0.48
#!/bin/sh
CC=cc; export CC
CFLAGS="-xtarget=ultra2"; export CFLAGS
SSL=/usr/local/ssl
BDB=/usr/local/BerkeleyDB.4.2
CPPFLAGS="-I/usr/local/include \
-I${SSL}/include \
-I${BDB}/include"; export CPPFLAGS
LDFLAGS="-L/usr/local/lib -R/usr/local/lib \
-L${SSL}/lib -R${SSL}/lib \
-L${BDB}/lib -R${BDB}/lib"; export LDFLAGS
# This seems to work better than -R for nested 3rd-party
# stuff(apr, apr-util)
LD_RUN_PATH="/usr/local/lib:${SSL}/lib:${BDB}/lib"; export LD_RUN_PATH
# --with-berk.. and --with-dbm are unequivocally needed.
# apr-util will not configure without them (if you only have
# db-4.2 installed, that is).
./configure \
--prefix=/opt/pkgs/httpd-2.0.48 \
--sysconfdir=/etc/apache2 \
--datadir=/global/www \
--enable-so \
--enable-rewrite \
--enable-ssl \
--enable-http \
--enable-dav \
--enable-cgi \
--enable-cgid \
--with-ssl=$SSL \
--with-berkeley-db=$BDB \
--with-dbm=db4 \
--with-mpm=worker
Subversion:
$ more CONFIGURE_subversion-0.37.0
#!/bin/sh
SSL=/usr/local/ssl
BDB=/usr/local/BerkeleyDB.4.2
APACHE2=/opt/pkgs/httpd-2.0.48
JAVA_HOME=/usr/local/java; export JAVA_HOME
CC=cc; export CC
CFLAGS="-xtarget=ultra2"; export CFLAGS
CPPFLAGS="-I${SSL}/include \
-I${BDB}/include \
-I${APACHE2}/include"; export CPPFLAGS
LDFLAGS="-L${SSL}/lib -R${SSL}/lib \
-L${BDB}/lib -R${BDB}/lib \
-L${APACHE2}/lib -R${APACHE2}/lib"; export LDFLAGS
LD_RUN_PATH="${SSL}/lib:${BDB}/lib:${APACHE2}/lib"; export LD_RUN_PATH
./configure \
--prefix=/opt/pkgs/subversion-0.37.0 \
--sysconfdir=/etc/subversion \
--with-apxs=${APACHE2}/bin/apxs \
--with-apr=${APACHE2}/bin/apr-config \
--with-apr-util=${APACHE2} \
--with-ssl
And, finally, the glory:
$ env - ldd `which svn`
libsvn_client-1.so.0 => /opt/pkgs/subversion-0.37.0/lib/libsvn_client-1.so.0
libsvn_wc-1.so.0 => /opt/pkgs/subversion-0.37.0/lib/libsvn_wc-1.so.0
libsvn_ra-1.so.0 => /opt/pkgs/subversion-0.37.0/lib/libsvn_ra-1.so.0
libsvn_diff-1.so.0 => /opt/pkgs/subversion-0.37.0/lib/libsvn_diff-1.so.0
libsvn_ra_local-1.so.0 => /opt/pkgs/subversion-0.37.0/lib/libsvn_ra_local-1.so.0
libsvn_repos-1.so.0 => /opt/pkgs/subversion-0.37.0/lib/libsvn_repos-1.so.0
libsvn_fs-1.so.0 => /opt/pkgs/subversion-0.37.0/lib/libsvn_fs-1.so.0
libsvn_ra_dav-1.so.0 => /opt/pkgs/subversion-0.37.0/lib/libsvn_ra_dav-1.so.0
libsvn_ra_svn-1.so.0 => /opt/pkgs/subversion-0.37.0/lib/libsvn_ra_svn-1.so.0
libsvn_delta-1.so.0 => /opt/pkgs/subversion-0.37.0/lib/libsvn_delta-1.so.0
libsvn_subr-1.so.0 => /opt/pkgs/subversion-0.37.0/lib/libsvn_subr-1.so.0
libaprutil-0.so.0 => /opt/pkgs/httpd-2.0.48/lib/libaprutil-0.so.0
libdb-4.2.so => /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so
libexpat.so.0 => /opt/pkgs/httpd-2.0.48/lib/libexpat.so.0
libapr-0.so.0 => /opt/pkgs/httpd-2.0.48/lib/libapr-0.so.0
libsendfile.so.1 => /usr/lib/libsendfile.so.1
librt.so.1 => /usr/lib/librt.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libneon.so.24 => /opt/pkgs/subversion-0.37.0/lib/libneon.so.24
libssl.so.0.9.7 => /usr/local/ssl/lib/libssl.so.0.9.7
libcrypto.so.0.9.7 => /usr/local/ssl/lib/libcrypto.so.0.9.7
libgssapi_krb5.so.2 => /usr/local/lib/libgssapi_krb5.so.2
libkrb5.so.3 => /usr/local/lib/libkrb5.so.3
libk5crypto.so.3 => /usr/local/lib/libk5crypto.so.3
libcom_err.so.3 => /usr/local/lib/libcom_err.so.3
libresolv.so.2 => /usr/lib/libresolv.so.2
libxml2.so.2 => /usr/lib/libxml2.so.2
libz.so.1 => /usr/lib/libz.so.1
libpthread.so.1 => /usr/lib/libpthread.so.1
libm.so.1 => /usr/lib/libm.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libc.so.1 => /usr/lib/libc.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libmd5.so.1 => /usr/lib/libmd5.so.1
libmp.so.2 => /usr/lib/libmp.so.2
libthread.so.1 => /usr/lib/libthread.so.1
/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
/usr/platform/SUNW,Ultra-60/lib/libmd5_psr.so.1
I'm not sure I've ever built anything on Solaris before with that
many dependencies. Subversion is worth the trouble.
Thank-you to the developers for writing compiler-independent code!
--
aaraines@pobox.com (Andrew A. Raines)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Feb 19 20:18:00 2004