Skip to content

Instantly share code, notes, and snippets.

Last active December 26, 2015 08:19
Show Gist options
  • Save jclausen/7121183 to your computer and use it in GitHub Desktop.
Save jclausen/7121183 to your computer and use it in GitHub Desktop.
Recompiling for OSX Mavericks
1) Updade XCode via App Store:
2) Install command line tools:
xcode-select --install (click install on prompt)
3) Create Missing symlink
sudo ln -s /Applications/ /Applications/
Replace in /native/common/jk_map.c:
strcpy(buf, rc);
memmove(buf, rc, len + 1);
cd ~/Desktop/connector-source/native
./configure CFLAGS='-arch x86_64' APXSLDFLAGS='-arch x86_64' --with-apxs=/usr/sbin/apxs
sudo make install
For Coldfusion 10 connector only:
5) Copy created
cp /usr/libexec/apache2/ /Applications/Coldfusion10/config/wsconfig/1/
Copy link

You'll need to install the command line tools again

Update/install xcode.
run xcode-select --install from the command line to reinstall the command line tools.

Copy link

See updated instructions here (first comment) to compile the correct version of mod_jk:

Copy link

ghost commented Nov 10, 2013

Thanks, worked perfectly for me for use with Railo. Great.

Copy link

Code change was not 100%. Caused jboss to hang on me. These stops worked.

Download latest Tomcat Connectors source from

Per change the method below in ./native/common/jk_maps.c to what you see here:

int jk_map_get_int(jk_map_t *m, const char *name, int def)
const char *rc;
int int_res;

rc = jk_map_get_string(m, name, NULL);

if(NULL == rc) {
    int_res = def;
} else {
    size_t len = strlen(rc);
    int multit = 1;

    if (len) {
        char buf[100];
        char *lastchar;
         strncpy(buf, rc, 100);
        lastchar = buf + len - 1;
        if ('m' == *lastchar || 'M' == *lastchar) {
            *lastchar = '\0';
            multit = 1024 * 1024;
        else if ('k' == *lastchar || 'K' == *lastchar) {
            *lastchar = '\0';
            multit = 1024;
        int_res = multit * atoi(buf);
        int_res = def;
return int_res;

Install command line tools

xcode-select --install

Create missing symlink

sudo ln -s /Applications/ /Applications/

cd ./native

./configure CFLAGS='-arch x86_64' APXSLDFLAGS='-arch x86_64' --with-apxs=/usr/sbin/apxs

chmod 755 scripts/build/


sudo make install

Copy link

demisx commented Sep 16, 2014

This was my experience compiling mod_jk on Mac OS Mavericks: Hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment