Skip to content

Instantly share code, notes, and snippets.

@kimausloos
Created February 5, 2014 09:28
Show Gist options
  • Select an option

  • Save kimausloos/8820017 to your computer and use it in GitHub Desktop.

Select an option

Save kimausloos/8820017 to your computer and use it in GitHub Desktop.
OSX Mavericks install mod_jk ( tomcat-connectors-1.2.37-src )
1) Install lastest XCode from App Store:
2) Install command line tools:
xcode-select --install
3) Create Missing symlink
sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain
4) Replace in native/common/jk_map.c:
Manually replace function jk_map_get_int (line 183) by:
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);
}
else
int_res = def;
}
return int_res;
}
5) compile and install:
./configure CFLAGS='-arch x86_64' APXSLDFLAGS='-arch x86_64' --with-apxs=/usr/sbin/apxs
make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment