views:

4582

answers:

8

I've been trying to build subversion (on a limited account) for a long time but without any luck :(

The instructions I'm following: http://wiki.dreamhost.com/Subversion_Installation

Running this:

./configure --prefix=${RUN} --without-berkeley-db --with-ssl --with-zlib --enable-shared

Gives me this error:

checking for library containing RSA_new... not found
configure: error: could not find library containing RSA_new
configure failed for neon

Can someone explain to me:

  1. Possible reasons for this
  2. Possible ways to circumvent it
  3. Optional: What these modules are and what their purpose is (Neon/RSA_new)

Thanks!

Log file contents:

Trying to find interesting bits from the neon config.log file:

configure:27693: gcc -o conftest -g -O2   conftest.c  >&5
/tmp/ccazXdJz.o: In function `main':
/home/stpinst/soft/subversion-1.5.4/neon/conftest.c:93: undefined reference to `RSA_new'
collect2: ld returned 1 exit status
configure:27699: $? = 1
configure: failed program was:
...
| int
| main ()
| {
| RSA_new();
|   ;
|   return 0;
| }
configure:27742: gcc -o conftest -g -O2   conftest.c  -lcrypto  -lz >&5
/usr/bin/ld: cannot find -lcrypto
collect2: ld returned 1 exit status
configure:27748: $? = 1

--

+8  A: 
  1. you don't have libcrypto.a and libcrypto.so on your system
  2. you need to install install libcrypto, which is in the libssl-dev package (aptitude install libssl-dev)
  3. Neon is the WebDAV library included in subversion; WebDAV being one of the wire protocols that subversion supports (http:). RSA is an encryption algorithm. Neon doesn't actually need it itself - it's just that configure uses it to determine whether libcrypto is available.
Martin v. Löwis
Your point 3 is wrong: neon obviously needs the SSL libraries for https, and the configure is not using neon, rather it's neon's configure that is failing (it obviously has a separate configure).
CesarB
Calling "aptitude install libssl-dev" gives me this error (since I'm on a shared host and thus have limited access): E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
AtliB
BTW, I actually don't even need SSL support. I'm just using it directly over http!
AtliB
So - are you root? If not, ask the administrator to install the header file for you (of course, the admin may then just install subversion in the first place). If root won't do that for you, install OpenSSL first yoruself.
Martin v. Löwis
CesarB: Yes, Neon does need OpenSSL. However, it does not (directly) call RSA_new; the RSA_new is only in configure (unless Neon is recent and built with pakchois).
Martin v. Löwis
If you don't need SSL support, you can configure Neon --without-ssl.
Martin v. Löwis
I don't know if the point is wrong, but the aptitude install libssl-dev was exactly what I needed. I had libssl but forgot the dev. Thanks, you made my day.
Peter Kahn
A: 

did you check Compiling Subversion with SSL Support, where the following varaibles were needed to complete the process ?

setenv CC "gcc -I/usr/local/ssl/include -L/usr/local/ssl/lib"
setenv CFLAGS "-O2 -g -I/usr/local/ssl/include"
setenv LDFLAGS "-L/usr/local/ssl/lib"
setenv CPP "gcc -E -I/usr/local/ssl/include"

And the post could not find library containing RSA_new, recommend to made sure the headers were also installed on the system (Debian-Ubuntu-Dapper-Beta2: "apt-get install libssl-dev"), or as Martin says: aptitude install libssl-dev.

In short, either the headers are not there, or they are not in the proper path during the configure process.

VonC
A: 

NB: I'm using a shared host so I'm not able to do some things.

Calling

apt-get install libssl-dev

gives me this error:

E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Calling aptitude install libssl-dev

gives me this error:

E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied) 
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root

As you can perhaps see, I'm totally lost so any further hand-holding would be greatly appreciated! :)

AtliB
You won't get far without root-access.
Alphager
see my comment above for it being possible after serious contortions.
rogerdpack
+2  A: 

You either need to install OpenSSL first, or configure --without-ssl (or just omit the --with-ssl option if you have been following the instructions literally).

Martin v. Löwis
+1  A: 

If I skip the SSL:

./configure --prefix=${RUN} --without-ssl

I get this error:

checking for openssl/opensslv.h... no
configure: error: We require OpenSSL; try --with-openssl
configure failed for serf

If i do:

 ./configure --prefix=${RUN} --with-openssl

I get a warning:

configure: WARNING: Unrecognized options: --with-openssl
...
configure: error: '--with-openssl requires a path to a directory'
configure failed for serf

:-s

AtliB
A: 

I think I've finally got the "configure" part to work.

First, I retrieved openssl locally:

wget http://www.openssl.org/source/openssl-0.9.8a.tar.gz
tar zxvf openssl-0.9.8a.tar.gz
cd openssl-0.9.8a
./configure --prefix=${RUN}
make
make install

Then I built subversion with a reference to that folder:

./configure --prefix=${RUN} --without-berkeley-db --with-openssl=$HOME/soft/openssl-0.9.8a

I actually got this warning:

configure: WARNING: Unrecognized options: --with-openssl

Now that I though I had it all covered, it compiles for a few minutes but then gives me this error:

link: warning: `/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../..//libsqlite                                                                        3.la' seems to be moved
libtool: link: warning: `/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../..//libsqlite                                                                        .la' seems to be moved
libtool: link: warning: `/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../..//libexpat.                                                                        la' seems to be moved
/usr/bin/ld: cannot find -lssl
collect2: ld returned 1 exit status
make[1]: *** [libserf-0.la] Error 1
make[1]: Leaving directory `/mnt/local/home/stpinst/soft/subversion-1.5.4/serf'
make: *** [external-all] Error 1

This seems to be the neverending story... can I somewhere just download the latest binaries?

AtliB
A: 

Check out my response over here.

OJ
I think it would be better to response here as well...
Lipis
I don't agree at all. Duplication is a FAIL. The link is more than sufficient.
OJ
Lipis - you voted me down coz i didn't copy and paste? Epic Fail.
OJ
+3  A: 

Finally got it to work. How: download openssl-0.x.x.tar.gz, unpack, cd into it

install it somewhere, like (for me)

$ ./config shared --prefix=$HOME/installs && make clean && make && make install

$  export CFLAGS= "-O2 -g -I/root/installs/include"
$  export CFLAGS="-O2 -g -I/root/installs/include"
$  export LDFLAGS="-L/root/installs/lib"
$  export CPP="gcc -E -I/root/installs/include"

unpack the subversion + its deps

go into the neon subdirectory

$ ./configure --with-ssl=openssl --prefix=$HOME/installs && make clean && make && make install

delete the neon directory

go into the subversion directory

$ ./configure --with-ssl --prefix=$HOME/installs --with-neon=/root/installs/bin/neon-config && make clean && make && make install

Note: you might be able to get away without all the exports by using --with-ssl=/root/installs or something along those lines.

rogerdpack
concept47