3

I'm new to CentOS (regular Ubuntu user, but used Slackware and Gentoo a long time ago), and I'm trying to create a package for some software that depends on log4cxx. Unfortunately, there isn't a log4cxx package on CentOS 6 repository (or on EPEL). Is there any other "default" package repository for CentOS where I could find log4cxx, or should I just go cry into a corner and compile it myself?

1 Answer 1

3

In these cases, I perform a quick check for the package on RPMFind.net and rpm.pbone.net. If neither return a result for my distribution, chances are that a precompiled RPM is not available.

You can compile log4cxx from the Fedora source repository, though.

In order to build an SRPM, you'll pretty much need to download the .srpm or .src.rpm file. From there, you can run rpmbuild --rebuild filename.src.rpm and the compilation process should result in a usable binary package.

I took a spare CentOS 6 system and ran the download using this log4cxx source RPM package and compiled:

There was a dependency on apr-devel and apr-util-devel, but aside from that, the log4cxx built without incident.

# rpmbuild  --rebuild log4cxx-0.10.0-13.fc18.src.rpm 
.
.
...fancy compilation output...
.
.
Wrote: /root/rpmbuild/RPMS/x86_64/log4cxx-0.10.0-13.el6.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/log4cxx-debuginfo-0.10.0-13.el6.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/log4cxx-devel-0.10.0-13.el6.x86_64.rpm

From there, install the resultant RPM's and you're good to go.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .