macOSBuild
Â
For notes on Installation see this topic
Building the Native SP from Source on macOS
The following installation procedure will build the Shibboleth 3.x SP and all its dependencies. Completion of the instructions will result in a functional and loaded but unconfigured SP installed under /opt/shibboleth-sp/
. If you'd like to use an alternative directory, modify all paths accordingly.
The 3.x native SP has been built successfully using the following combinations:
OS X 10.4 with gcc4 (PPC, 32-bit)
OS X 10.5 with gcc4 (PPC, 32-bit)
OS X 10.5 with gcc4 (Intel, 32-bit)
OS X 10.6 with gcc4 (Intel, 64-bit) - see below
Set Up the Build Environment
SetÂ
DYLD_LIBRARY_PATH
 to the eventual lib path into which you'll be installing the packages you're building (/opt/shibboleth-sp/lib
)SetÂ
MACOSX_DEPLOYMENT_TARGET
 to your OS X version (e.g.Â10.4
 orÂ10.5
)See DYLD_LIBRARY_PATH note below for additional setup option before proceeding.
Building Shibboleth
As per this topic Shibboleth requires multiple dependencies to be available or built.
The Boost headers. But you don't need to actually build or install the full Boost library set.
cxxtest (optional, for unit test support)
Prior to building Xerces-C for macOx you will also need ICU
If you have pkg-config installed, you may need to append --with-openssl=/usr
 to the XMLTooling-C and OpenSAML-C configure commands (or remove pkg-config from your path).
When building Shibboleth, you may need to use different options if you're not using the standard Apple Apache version and/or if the Apache files are not in your system path.
DYLD_LIBRARY_PATH and Apache on macOS
If you build as indicated above you should be successful, however, it is likely that you will have difficulty getting the module to load in Apache. This is because the DYLD_LIBRARY_PATH must be set when Apache is started, but Apple starts Apache with a launch control process (/bin/launchctl) and it is difficult to set an environment variable that this process will notice when starting Apache because it executes httpd directly rather than using /usr/sbin/apachectl. So, I present two options for you:
Option 1: Write DYLD_LIBRARY_PATH into compiled binaries
This is the option I prefer because everything will just work all the time when you are done compiling. When setting up your build environment:
Set LDFLAGS="-Wl,-rpath,(your_shib-sp_install_dir)/lib"
AddÂ
--enable-rpath
 as an option to the ICU configure line.
Option 2: Set DYLD_LIBRARY_PATH for launchctl
Personally I dislike this option because I don't like doing something that could get obliterated by an Apple system update. This may be someone else's preferred method though so I will put it here for the record. Note that I discovered this solution when trying to figure this out myself and came across the thread http://lists.apple.com/archives/macos-x-server/2008/Nov/msg00241.html.
Add the following XML snippet to /System/Library/LaunchDaemons/org.apache.httpd.plist
.
<key>EnvironmentVariables</key>
<dict>
<key>DYLD_LIBRARY_PATH</key>
<string>/opt/shibboleth-sp/lib</string>
</dict>
64 bit builds
The following is offerred as the starting point for a build