9

The Perl community has relied on MACOSX_DEPLOYMENT_TARGET=10.3 for all builds of Perl for, well, a long time. But now, with the El Capitan beta, it no longer works. It seems as though they should bump it up, but to what? Is there a way to programmatically set it to whatever is the earliest version supported by the release of OS X on which Perl is currently being built? Or is there some other way to set it dynamically? Or must it be static and updated periodically? If the latter, how does it affect builds on older versions of OS X?

2
  • I don't know anyone running MacOS 10.3... do you really want to support an OS released in 2003? Aug 29, 2015 at 6:30
  • @MichaelDautermann People test Perl on all kinds of crazy configurations. Here's someone who tests as far back as OS X 10.4.
    – theory
    Sep 1, 2015 at 18:16

2 Answers 2

3

This should be a fairly simple change in hints/darwin.sh, that checks what OSX version is running and sets MACOSX_DEPLOYMENT_TARGET accordingly.

Perl is an Open Source project, and as such always short on developer time. If you were to make a patch for this and submit it to p5p, I'm sure it would be greatly appreciated.

1
  • Thanks, I've encouraged that solution in the bug report.
    – theory
    Sep 1, 2015 at 18:16
2

Accepted @Calle-Dybedahl's answer, as it's technically correct. Perl 5 Core Hacker Jarkko Hietaniemi pushed this solution, which proved to be a bit more complicated than you might expect at a glance. The basic recipe he came down on was:

For OS X 10.6 or above, do not any more use the MACOSX_DEPLOYMENT_TARGET, the toolchains should work fine without. Until now the deployment target was hardwired to 10.3. This logic comes from RT#117433.

For OS X releases from 10.3 until 10.5, no change, still using the MACOSX_DEPLOYMENT_TARGET=10.3 for linking.

For OS X releases before 10.3, no change, still not using the MACOSX_DEPLOYMENT_TARGET=10.3.

New: always add -mmacosx-version-min to ccflags and ldflags from the env var $MACOSX_DEPLOYMENT_TARGET, if set. If the var is not set, set the min from the OS X version, from sw_vers(1). Setting the var should become handy for people building and packaging Perl for earlier OS X versions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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