Compiling Subversion in coolstack 1.2

CompilingSubversion Subversion compilation with Cool Stack 1.2 is not very straightforward. It is
a bug in Cool Stack 1.2

Coolstack apache needs ssl from /usr/sfw directory so Coolstack apache is
compiled with LDFLAGS="-L/opt/coolstack/lib -L/usr/sfw/lib" configure option.

This results in problems in libapr-1.la in libapruutil-1.la files. So when we
configure/compile subversion libexpat.so is available at multiple places. This
seems to be bug in coolstack apache. Apache apr should avoid having
/usr/sfw/lib in their RPATH.

I found out the workaround for this solution.

# echo $PATH
/opt/coolstack/lib:/usr/sbin:/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin

Step 1 : Remove libapr-1.la and libaprutil-la from /opt/coolstack/apache2/lib directory

# cd /opt/coolstack/apache2/lib/
# mv libapr-1.la /tmp/
# mv libaprutil-1.la /tmp/


Step 2 : Compile neon-0.25.5.tar.gz

# /usr/sfw/bin/gtar -zxf neon-0.25.5.tar.gz
# cd neon-0.25.5
# CFLAGS="-I/opt/coolstack/include" LDFLAGS="-L/opt/coolstack/lib" ./configure --prefix=/opt/coolstack --with-libxml2=/opt/coolstack --with-ssl=openssl
# make
# make install

Step 3 : configure subversion

# rm -rf subversion-1.4.6
# /usr/sfw/bin/gtar -jxf subversion-1.4.6.tar.bz2
# cd subversion-1.4.6
# CFLAGS="-I/opt/coolstack/include" LDFLAGS="-L/opt/coolstack/lib" ./configure --prefix=/opt/coolstack --with-apxs=/opt/coolstack/apache2/bin/apxs --with-apr=/opt/coolstack/apache2 --with-apr-util=/opt/coolstack/apache2 --with-neon=/opt/coolstack


Step 4 : Change Makefile manually : Add -lgettextlib -lintl manually to SVN_APR_LIBS and SVN_APRUTIL_LIBS

SVN_APR_LIBS =  -L/opt/coolstack/apache2/lib -R/opt/coolstack/apache2/lib -lapr-1 -luuid -lsendfile -lrt -lsocket -lnsl  -lpthread -lgettextlib -lintl
SVN_APRUTIL_LIBS =  -L/opt/coolstack/apache2/lib -R/opt/coolstack/apache2/lib -laprutil-1 -lldap  -lexpat -liconv -lgettextlib -lintl


Step 5 : build and install subversion

# make
# LD_LIBRARY_PATH=/opt/coolstack/apache2/lib:/opt/coolstack/lib:/usr/sfw/lib make install

I tried to run with "svn help" and it worked. I didn't try to run any tests on
it. I hope it should work fine with coolstack apache.

Step 6 : Revert back libapr-1.la and libaprutil-1.la (Optional)

You can add appropriate CFLAGS for optimization.
Comments:

What build of Solaris and Sun Studio are you using? I'm using OpenSolaris 79b and the included SUNWspro package, and it's failing on the -lgettextlib flags. If I skip that step, then everything compiles, but the install fails because the generated binaries cannot find libldap-2.3.so.0.

Any thoughts?

Posted by Nathan Fiedler on June 04, 2008 at 10:59 AM PDT #

BTW, I believe you have a typo near the top: "echo $PATH
/opt/coolstack/lib:..." <= shouldn't that be /bin instead of /lib?

Posted by Nathan Fiedler on June 05, 2008 at 03:24 AM PDT #

Another question: you have LDFLAGS for configuring neon, and LD_FLAGS for configuring svn. Is there a reason for that? Is one preferred over the other?

Posted by Nathan Fiedler on June 05, 2008 at 09:11 AM PDT #

I used Studio 12 compiler. It was on Solaris 10.

You are right about the PATH. It should be /opt/SUNWspro/bin. (It is a typo).

Posted by Basant Kukreja on June 09, 2008 at 11:09 AM PDT #

These instructions (less step 1) work for svn 1.5.1 and coolstack 1.3.1 on Solaris 10 with Studio 12. I had to remove -lgettextlib to get it to build.

I also had to add -lm to the libraries in serf/Makefile (fix a gcc quirk).

I hope this helps others.

Posted by Ian Collins on August 25, 2008 at 08:37 AM PDT #

You can specify the CFLAGS and LDFLAGS during configure time :

Check out my blog :
http://blogs.sun.com/basant/entry/compiling_subversion_in_coolstack_11

Posted by Basant Kukreja on August 25, 2008 at 09:15 AM PDT #

Post a Comment:
Comments are closed for this entry.
About

Basant Kukreja

Search

Top Tags
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today