Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to compile the tomcat connector from source, everything appears fine except that no file gets created.

Software versions: RHEL6 x86_64
tomcat-connector 1.2.37

cd native
./configure --with-apxs=/usr/local/apache2/bin/apxs
cd apache-2.0
The only warning message during the make is:
Warning! dlname not found in /usr/local/tomcat-connectors-1.2.37-src/native/apache-2.0/

Does anyone have any suggestions on how to get the file to be generated?

share|improve this question
What version of tomcat are you compiling for? IIRC, was for early/earlier versions of tomcat and has been replaced. – jim_m_somewhere Dec 11 '12 at 17:46
compiling for tomcat 7.0.33. – user1171848 Dec 11 '12 at 18:04
up vote 0 down vote accepted

I eventually got this to work. It turns out that I had bigger problems than just the tomcat connector.

First, there are several things I needed to do to compile apache with 64 bit Linux. I was getting build errors such as:

relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC 

To fix that, OpenSSL had to have a special configure option:

./configure -fPIC

So I recompiled OpenSSL, which allowed Apache to compile the ssl module correctly. Then I got another error during the apache make install:

libtool: install: error: relink `' with the above command before installing it

To fix this, the APR classes needed a special configuration option during their compilation:

CC="gcc -m64" ./configure --prefix=/usr/local/apr
CC="gcc -m64" ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

Compiling these separately meant that I needed to use the --with-apr option instead of --with-included-apr in the Apache build:

./configure ... --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util

I also had been using a strange config option during the Apache configuration:


which should have been:


After getting all of those things straightened out and recompiling apache, I tried again with the tomcat connector build. The file then generated correctly.

share|improve this answer
It's a terrible solution. And why do you need to use apache-2.4.3? tomcat-connector 1.2.37 build without any problem with httpd-2.2.15. Or do you need some specific features from 2.4.x? – ALex_hha Aug 6 '13 at 19:39
My 'terrible' solution is what got mod_jk to compile. I posted it here in hopes that it might help someone having the same problems. The solution has nothing to do with Apache 2.4; I had the same problems with Apache 2.2. If you have a better solution, feel free to post it as an answer. – user1171848 Aug 7 '13 at 15:08

The system info

# uname -r

# cat /etc/redhat-release
CentOS release 6.4 (Final)

# rpm -qa | grep httpd

I will suggest to build from source only module himself

# cd /root/
# wget

# tar -xzf tomcat-connectors-1.2.37-src.tar.gz
# cd tomcat-connectors-1.2.37-src/native/
# ./configure --prefix=/opt/ --with-apxs=/usr/sbin/apxs
# make
# file apache-2.0/
apache-2.0/ ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped

# cp apache-2.0/ /usr/lib64/httpd/modules/
# echo "LoadModule jk_module modules/" > /etc/httpd/conf.d/mod_jk.conf

# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

# apachectl -t -D DUMP_MODULES | grep jk
Syntax OK
 jk_module (shared)

So there is no need to install apache/openssl/apr/apr-util from source. If you want to upgrade the packages - it would be the hell

share|improve this answer
I agree that if you can install Apache via RPM, then the process is a whole lot easier. We chose to install Apache from source for a few reasons: 1) we had done it that way in the past, 2) we had better control of included modules, and 3) we could get the latest version. We may reconsider our approach in the future. – user1171848 Aug 7 '13 at 19:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.