views:

3908

answers:

5

I'm trying to upgrade my subversion server (I have it hosted with Dreamhost)

This is what I run:

But I'm unable to continue any further because of this error:

  • checking for C compiler default output file name...
  • configure: error: C compiler cannot create executables
  • See `config.log' for more details.
  • configure failed for neon

Since I'm no expert with Linux, I'm not sure how to proceed.

So the question is: what is the best way to upgrade (given the constraints of being with this hosted provider).

Update:

Contents of config.log can be seen here (don't know the best way to show files here at SO)

Update:

I seem to have been looking at the wrong config.log file.
I probably should have been looking at subversion.1.5.2/neon/config.log

+4  A: 

You'll need to build your own copy under your own account.

mkdir ~/src
cd ~/src
wget http://subversion.tigris.org/downloads/subversion-1.5.2.tar.bz2
wget http://subversion.tigris.org/downloads/subversion-deps-1.5.2.tar.bz2
tar -xjf subversion-1.5.2.tar.bz2
tar -xjf subversion-deps-1.5.2.tar.bz2
cd subversion-1.5.2
./configure --prefix=/home/$USER --with-ssl
make
make install

You'll also need to alter your path for this to work if you haven't already.

Aupajo
A: 

This might be a security measure, if the system is compromised it will theoretically be harder for the malicious user to build more attack code on the system to get more access.

The solution to this is to cross compile the code on a local machine, then transfer it to the server. If you can't install to the system as Aupajo suggests, put the executable in your $HOME/bin directory. Keep in mind though that this probably means that you won't have permission to run the svn server, just the client application.

Here's a link on using debian to do cross compiling, some google searches should provide more information for you though.

Dana the Sane
A: 

When using

./configure --prefix=/usr/bin --with-libs=/usr/bin/openssl --with-ssl

then you can see in neon/config.log that it searches the includes in /usr/bin/openssl/include ... while this is ofcourse only a binary. So, skip this "--with-libs" option, and just make sure that the ssl development package is installed using

apt-get install libssl-dev
Unfortunately it's a hosted account so I don't have full control over it. This is what I get: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?Any other way I can try?
AtliB
see my answer to this one:http://stackoverflow.com/questions/274656/building-subversion-1-5-4-on-debian-could-not-find-library-containing-rsanew/2044428#2044428(I think it's workable on a shared account)
rogerdpack
+2  A: 

If you're using openssl with SVN then you need to configure SVN with

./configure .... --with-openssl=/path/to/openssl

When I've done this in the past I've had issues building other binaries that use this lib if I don't specify the -fPIC flag. So it's best to run make with that parameter (if you have that issue). You may also have to point make at your build binary as well.. so your make call will look something like this:

make CC="gcc -fPIC" LDFLAGS="/path/to/openssl/lib"

Don't forget to build openssl with CC="gcc -fPIC" too!

Good luck!

OJ
A: 

I was stuck with this error too:

configure: error: C compiler cannot create executables

Turns out in my case I had a clean installation of Debian Etch, without a C compiler. I had installed it (wrongly, I suppose) via apt-get install gcc . A few google searches led me to install g++ instead via

apt-get install g++

Afterwards it worked. Not sure if this helps you, but did help me.