4

Is it possible to modify APR's embedded values without recompiling APR? Or is there a way to edit and "reload" APR's configuration files?

On OS X 10.8 there are several bad values embedded in the Apache Portable Runtime Library. These values are causing problems compiling software whose makefiles rely on APR derived values.

Specifically, the values for CC reported by both apr-1-config and apxs point to a non-existent Xcode Toolchain (OSX10.8.xctoolchain instead of XcodeDefault.xctoolchain). It would also be nice to tell apxs to use a different version of libtool.

The values seem to be pulling from some mix of /usr/share/apr-1/build-1/apr_rules.mk and /usr/share/httpd/build/config_vars.mk. Editing config_vars.mk will change the results of queries to apxs but will not affect output from apr-1-config. I changed the LIBTOOL definition in config_vars.mk to point to /usr/bin/ and got this:

$ apxs -q LIBTOOL
/usr/bin/libtool --silent   // modified

$ apr-1-config --apr-libtool
/usr/share/apr-1/build-1/libtool  // default value

Neither apxs or apr-1-config reflected similar changes to apr_rules.mk. Unfortunately, I suspect my problem is with the values returned by apr-1-config.

More:

A simple workaround is to just symlink the xctoolchain as described here: Homebrew Issue #13586

sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain
joemaller
  • 19,579
  • 7
  • 67
  • 84

0 Answers0