|
-
Dec 30th, 2008, 03:30 PM
#1
Compiling from Source
Hey,
This isn't strictly a development question, but it is definitely a linux question, so I am hoping someone can answer it.
I am currently rebuilding my linux server, (I am a bit of a noob at linux) and since I have been unable to find rpm versions of the package that I want for my distro, I am having to compile it from source, which seems to have went well. The package in question is subversion.
However, when I then try and add other packages which depend on subversion, such as mod_dav_svn, which I can get a pre-built rpm for, when I try and install it, it says that subversion is not installed, and it will install it. However, I know for a fact that the version that I get from the rpm repo is an earlier version, and I don't want it.
So I have two questions.
1) Is it ok to have multiple versions of subversion installed? If so, how do you know which one is being used.
2) How to you get prepackaged rpm's to realise that a version of the program is installed, however it has been installed from source.
On a side note, if a newer version of the package becomes available, is it ok to compile directly from source again, or do you have to uninstall what I have already compiled.
Hope the above makes sense!!
Thanks in advance!!
Gary
-
Dec 30th, 2008, 09:18 PM
#2
Re: Compiling from Source
If you build Subversion from source, specify the --with-apr, --with-apr-utils, and --with-apxs options in order to build mod_dav_svn. Read ./configure --help to find what values to give here; I used the paths to apr-1-config, apu-1-config, and apxs (in /wherever/apache/bin).
Alternatively, grab 'rpm2cpio':
Code:
# wget http://www.iagora.com/~espel/rpm2cpio
# chmod u+x rpm2cpio
Then use it to extract an rpm instead of installing it, like so:
Code:
# rpm2cpio mod_dav_svn-whatever.rpm | cpio -imdv
This will create various directories such as 'usr' and 'etc' within the current working directory instead of the filesystem root. You can then copy the extracted files to their proper destinations.
Another thing you can do is use the --no-deps option:
Code:
# rpm -Uvh --no-deps whatever.rpm
This bypasses the dependency checks. The installation may or may not work.
 Originally Posted by gep13
On a side note, if a newer version of the package becomes available, is it ok to compile directly from source again, or do you have to uninstall what I have already compiled.
Just go through configure/make/make install again and it will replace the previous version. (If you've done anything funny with paths, then you'll need to do the same each time.)
Last edited by penagate; Dec 30th, 2008 at 09:31 PM.
-
Dec 31st, 2008, 09:16 AM
#3
Re: Compiling from Source
Hey,
Thank you very much for taking the time to respond. Although, I think you might have to dumb it down a little bit for me if you can.
Specifically, am I to take from what you said that if I specify configure with the flags that you suggested that I would not need to separately install mod_dav_svn? If so, then this is exactly what I need. This may be a silly question, but how do you know that this is an option when compiling subversion, or is this just something you learn as you go? I saw no mention of what you are suggesting in any of the documentation that I read. Did I miss something?
Is it ok to compile subversion again with these flags set, or would I have to uninstall it and start again.
Sorry if these are silly questions, but I am still used to "Add/Remove Programs" 
I haven't tended to do anything funny with paths etc when compiling, mainly because I am still not sure what I am doing. Where possible I have always tried to use rpm's or apt-get for the packages that I want, but it seems like I can't always get the packages for my distro's, so having to do it the hard way.
Gary
-
Dec 31st, 2008, 04:15 PM
#4
Frenzied Member
Re: Compiling from Source
 Originally Posted by gep13
This may be a silly question, but how do you know that this is an option when compiling subversion, or is this just something you learn as you go?
Usually, if you run `./configure --help` you can see a list of the different options.
 Originally Posted by gep13
Is it ok to compile subversion again with these flags set, or would I have to uninstall it and start again.
You should just be able to run configure with the same options as before PLUS the additional options mentioned to you by the previous poster, then compile and install it without any problems.
-
Jan 17th, 2009, 10:27 AM
#5
Re: Compiling from Source
Hello there,
I tried doing what was suggested using:
Code:
./configure --with-apr=/usr/webconfig/bin/apr-config --with-apr-util=/usr/webconfig/bin/apu-config --with-apxs=/usr/webconfig/bin/apxs
But I got the following error:
Code:
checking for static Apache module support... no
checking for Apache module support via DSO through APXS... cannot open /usr/webconfig/build/config_vars.mk: No such file or directory at /usr/webconfig/bin/apxs line 218.
configure: error: no - APXS refers to an old version of Apache
Unable to locate /mod_dav.h
I am at a loss as to what this means?!?!
I was able to get the rpm to install using --nodeps, but I was just wondering if there is an additional problem that I need to correct.
Thanks
Gary
-
Jan 17th, 2009, 01:16 PM
#6
Re: Compiling from Source
Ok, some more on this...
This error seems to be due to the fact that httpd-devel was not installed, however, I had installed it, but a further part of my installation routine had unistalled it. I began from scratch, ensuring that httpd-devel was installed, which led to the following error:
Code:
checking for linking Python extensions... gcc -pthread -shared
checking for linking Python libraries...
checking for apr_int64_t Python/C API format string...
configure: error: failed to recognize APR_INT64_T_FMT on this platform
using:
Code:
./configure --with-apr=/usr/webconfig/bin/apr-config --with-apr-util=/usr/webconfig/bin/apu-config --with-apxs
Any thoughts?
Thanks
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|