Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove MACOSX_DEPLOYMENT_TARGET from hints/darwin.sh #12892

Closed
p5pRT opened this issue Apr 1, 2013 · 10 comments
Closed

Remove MACOSX_DEPLOYMENT_TARGET from hints/darwin.sh #12892

p5pRT opened this issue Apr 1, 2013 · 10 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 1, 2013

Migrated from rt.perl.org#117433 (status was 'resolved')

Searchable as RT117433$

@p5pRT
Copy link
Author

p5pRT commented Apr 1, 2013

From @timbunce

Created by @timbunce

hints/darwin.sh sets MACOSX_DEPLOYMENT_TARGET=10.3

OS X 10.3 (Panther) was released in 2003.

per #p5p​:
[6​:44pm] timbunce_​: Is MACOSX_DEPLOYMENT_TARGET still worth setting, I wonder.
[6​:51pm] leont​: If it is, it should be higher. The current value disables modern features (such as -R)
[6​:51pm] ilmari​: but won't that mean the binary might not work on older version?
[6​:53pm] leont​: Probably, but how often is that relevant?
[6​:53pm] leont​: For most people in most situations, it isn't
[6​:54pm] leont​: If you're doing binary distribution it's a different story, but then you'll be thinking about this kind of thing
[6​:55pm] leont​: Neither apple nor homebrewers have this issue

Copying perl installations to different machines is rare.
We should optimize for the common case by default
and provide instructions for the less common use-case.

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.17.11:

Configured by timbo at Wed Mar 27 23:36:04 GMT 2013.

Summary of my perl5 (revision 5 version 17 subversion 11) configuration:
  Derived from: b5de49e55f04e3a6c36012d250a46eb301a2be38
  Platform:
    osname=darwin, osvers=12.3.0, archname=darwin-thread-multi-2level
    uname='darwin timac.local 12.3.0 darwin kernel version 12.3.0: sun jan 6 22:37:10 pst 2013; root:xnu-2050.22.13~1release_x86_64 x86_64 '
    config_args='-des -Doptimize=-g -O1 -DEBUGGING=both -Accflags=-fsanitize=address -fno-omit-frame-pointer -Aldflags=-fsanitize=address -Alddlflags=-fsanitize=address -Dusethreads -Dusemultiplicity -Dusesitecustomize -Dusedevel -Uversiononly -Dprefix=/usr/local/perl5-blead-deb-thr-asan -Dcc=gcc-mp-4.8 -Dld=gcc-mp-4.8'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc-mp-4.8', ccflags ='-fno-common -DPERL_DARWIN -fsanitize=address -fno-omit-frame-pointer -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include',
    optimize='-g -O1',
    cppflags='-fno-common -DPERL_DARWIN -fsanitize=address -fno-omit-frame-pointer -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include'
    ccversion='', gccversion='4.8.0 20130321 (prerelease)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 gcc-mp-4.8', ldflags =' -fsanitize=address -fstack-protector -L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib /opt/local/lib /usr/lib
    libs=-lgdbm -ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    libc=, so=dylib, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -fsanitize=address -L/usr/local/lib -L/opt/local/lib -fstack-protector'

Locally applied patches:
    


@INC for perl 5.17.11:
    /usr/local/perl5-blead-deb-thr-asan/lib/site_perl/5.17.11/darwin-thread-multi-2level
    /usr/local/perl5-blead-deb-thr-asan/lib/site_perl/5.17.11
    /usr/local/perl5-blead-deb-thr-asan/lib/5.17.11/darwin-thread-multi-2level
    /usr/local/perl5-blead-deb-thr-asan/lib/5.17.11
    .


Environment for perl 5.17.11:
    DYLD_LIBRARY_PATH (unset)
    HOME=/Users/timbo
    LANG=en_IE.UTF-8
    LANGUAGE (unset)
    LC_ALL=en_IE.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/perl5-blead-deb-thr-asan/bin:/Users/timbo/perl5/perlbrew/bin:/Users/timbo/perl5/perlbrew/perls/perl-5.12.4/bin:/Users/timbo/bin:/usr/local/perl512-dev/bin:/Users/timbo/perl6/rakudo/parrot_install/bin:/usr/local/mysql/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
    PERLBREW_BASHRC_VERSION=0.44
    PERLBREW_HOME=/Users/timbo/.perlbrew
    PERLBREW_MANPATH=/Users/timbo/perl5/perlbrew/perls/perl-5.12.4/man
    PERLBREW_PATH=/Users/timbo/perl5/perlbrew/bin:/Users/timbo/perl5/perlbrew/perls/perl-5.12.4/bin
    PERLBREW_PERL=perl-5.12.4
    PERLBREW_ROOT=/Users/timbo/perl5/perlbrew
    PERLBREW_VERSION=0.44
    PERLCRITIC=/Users/timbo/.setdev/perlcriticrc
    PERLTIDY=/Users/timbo/.setdev/perltidyrc
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Apr 1, 2013

From @timj

On Mon, Apr 1, 2013 at 2​:21 PM, Tim Bunce <perlbug-followup@​perl.org> wrote​:

# New Ticket Created by Tim Bunce
# Please include the string​: [perl #117433]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=117433 >

This is a bug report for perl from Tim.Bunce@​pobox.com,
generated with the help of perlbug 1.39 running under perl 5.17.11.

-----------------------------------------------------------------
[Please describe your issue here]

hints/darwin.sh sets MACOSX_DEPLOYMENT_TARGET=10.3

OS X 10.3 (Panther) was released in 2003.

per #p5p​:
[6​:44pm] timbunce_​: Is MACOSX_DEPLOYMENT_TARGET still worth setting, I
wonder.
[6​:51pm] leont​: If it is, it should be higher. The current value disables
modern features (such as -R)
[6​:51pm] ilmari​: but won't that mean the binary might not work on older
version?
[6​:53pm] leont​: Probably, but how often is that relevant?
[6​:53pm] leont​: For most people in most situations, it isn't
[6​:54pm] leont​: If you're doing binary distribution it's a different
story, but then you'll be thinking about this kind of thing
[6​:55pm] leont​: Neither apple nor homebrewers have this issue

Copying perl installations to different machines is rare.
We should optimize for the common case by default
and provide instructions for the less common use-case.

This seems like a good idea to me so long as it's documented how to change
the value in the build system. I actually have to ship a perl that I build
on Mountain Lion to run on Lion but I understand that's not generally
relevant.

Apple compilers have -mmacosx-version-min=?? which is equivalent and
presumably easy to set as a Configure option.

--
Tim Jenness

@p5pRT
Copy link
Author

p5pRT commented Apr 1, 2013

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Apr 1, 2013

From @Leont

On Mon, Apr 1, 2013 at 11​:25 PM, Tim Jenness <tim.jenness@​gmail.com> wrote​:

This seems like a good idea to me so long as it's documented how to change
the value in the build system. I actually have to ship a perl that I build
on Mountain Lion to run on Lion but I understand that's not generally
relevant.

Apple compilers have -mmacosx-version-min=?? which is equivalent and
presumably easy to set as a Configure option.

Well volunteered!

Leon

@p5pRT
Copy link
Author

p5pRT commented Apr 4, 2013

From @markdootson

Hi,

MACOSX_DEPLOYMENT_TARGET is not always a mere alias for
-mmacosx-version-min and it's precise application changes across SDK
versions.

In MacOSX 10.1 through 10.4 the default deployment target is always 10.1
so, for example, building on 10.4 (osvers 8) you probably want
MACOSX_DEPLOYMENT_TARGET=10.4, although as Perl never had that setting
it would seem prudent to leave it at 10.3

By MacOSX 10.6 the effect of MACOSX_DEPLOYMENT_TARGET would appear to be
the same as setting -mmacosx-version-min but Apple docs are silent on this.

I'm not sure about 10.5 (osvers 9) but seeing as that worked OK before
my bash scripting is sketchy but I think if you want 5.18 to support
older OSX versions then in hints/darwin.sh you need something like

case "$osvers" in
1.[0-3].*)
  lddlflags="${ldflags} -bundle -undefined suppress"
  ;;
1.*)
  ldflags="${ldflags} -flat_namespace"
  lddlflags="${ldflags} -bundle -undefined suppress"
  ;;
[2-6].*)
  ldflags="${ldflags} -flat_namespace"
  lddlflags="${ldflags} -bundle -undefined suppress"
  ;;
[7-9].*)
  lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
  case "$ld" in
  *MACOSX_DEVELOPMENT_TARGET*) ;;
  *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
  esac
  ;;
*)
  lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
  ;;
esac

On 01/04/2013 22​:21, Tim Bunce wrote​:

# New Ticket Created by Tim Bunce
# Please include the string​: [perl #117433]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=117433 >

This is a bug report for perl from Tim.Bunce@​pobox.com,
generated with the help of perlbug 1.39 running under perl 5.17.11.

-----------------------------------------------------------------
[Please describe your issue here]

hints/darwin.sh sets MACOSX_DEPLOYMENT_TARGET=10.3

OS X 10.3 (Panther) was released in 2003.

per #p5p​:
[6​:44pm] timbunce_​: Is MACOSX_DEPLOYMENT_TARGET still worth setting, I wonder.
[6​:51pm] leont​: If it is, it should be higher. The current value disables modern features (such as -R)
[6​:51pm] ilmari​: but won't that mean the binary might not work on older version?
[6​:53pm] leont​: Probably, but how often is that relevant?
[6​:53pm] leont​: For most people in most situations, it isn't
[6​:54pm] leont​: If you're doing binary distribution it's a different story, but then you'll be thinking about this kind of thing
[6​:55pm] leont​: Neither apple nor homebrewers have this issue

Copying perl installations to different machines is rare.
We should optimize for the common case by default
and provide instructions for the less common use-case.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=core
severity=low
---
Site configuration information for perl 5.17.11​:

Configured by timbo at Wed Mar 27 23​:36​:04 GMT 2013.

Summary of my perl5 (revision 5 version 17 subversion 11) configuration​:
Derived from​: b5de49e
Platform​:
osname=darwin, osvers=12.3.0, archname=darwin-thread-multi-2level
uname='darwin timac.local 12.3.0 darwin kernel version 12.3.0​: sun jan 6 22​:37​:10 pst 2013; root​:xnu-2050.22.13~1release_x86_64 x86_64 '
config_args='-des -Doptimize=-g -O1 -DEBUGGING=both -Accflags=-fsanitize=address -fno-omit-frame-pointer -Aldflags=-fsanitize=address -Alddlflags=-fsanitize=address -Dusethreads -Dusemultiplicity -Dusesitecustomize -Dusedevel -Uversiononly -Dprefix=/usr/local/perl5-blead-deb-thr-asan -Dcc=gcc-mp-4.8 -Dld=gcc-mp-4.8'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler​:
cc='gcc-mp-4.8', ccflags ='-fno-common -DPERL_DARWIN -fsanitize=address -fno-omit-frame-pointer -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include',
optimize='-g -O1',
cppflags='-fno-common -DPERL_DARWIN -fsanitize=address -fno-omit-frame-pointer -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include'
ccversion='', gccversion='4.8.0 20130321 (prerelease)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries​:
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 gcc-mp-4.8', ldflags =' -fsanitize=address -fstack-protector -L/usr/local/lib -L/opt/local/lib'
libpth=/usr/local/lib /opt/local/lib /usr/lib
libs=-lgdbm -ldbm -ldl -lm -lutil -lc
perllibs=-ldl -lm -lutil -lc
libc=, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking​:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -fsanitize=address -L/usr/local/lib -L/opt/local/lib -fstack-protector'

Locally applied patches​:

---
@​INC for perl 5.17.11​:
/usr/local/perl5-blead-deb-thr-asan/lib/site_perl/5.17.11/darwin-thread-multi-2level
/usr/local/perl5-blead-deb-thr-asan/lib/site_perl/5.17.11
/usr/local/perl5-blead-deb-thr-asan/lib/5.17.11/darwin-thread-multi-2level
/usr/local/perl5-blead-deb-thr-asan/lib/5.17.11
.

---
Environment for perl 5.17.11​:
DYLD_LIBRARY_PATH (unset)
HOME=/Users/timbo
LANG=en_IE.UTF-8
LANGUAGE (unset)
LC_ALL=en_IE.UTF-8
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/usr/local/perl5-blead-deb-thr-asan/bin​:/Users/timbo/perl5/perlbrew/bin​:/Users/timbo/perl5/perlbrew/perls/perl-5.12.4/bin​:/Users/timbo/bin​:/usr/local/perl512-dev/bin​:/Users/timbo/perl6/rakudo/parrot_install/bin​:/usr/local/mysql/bin​:/usr/local/bin​:/opt/local/bin​:/opt/local/sbin​:/usr/bin​:/bin​:/usr/sbin​:/sbin​:/usr/local/bin
PERLBREW_BASHRC_VERSION=0.44
PERLBREW_HOME=/Users/timbo/.perlbrew
PERLBREW_MANPATH=/Users/timbo/perl5/perlbrew/perls/perl-5.12.4/man
PERLBREW_PATH=/Users/timbo/perl5/perlbrew/bin​:/Users/timbo/perl5/perlbrew/perls/perl-5.12.4/bin
PERLBREW_PERL=perl-5.12.4
PERLBREW_ROOT=/Users/timbo/perl5/perlbrew
PERLBREW_VERSION=0.44
PERLCRITIC=/Users/timbo/.setdev/perlcriticrc
PERLTIDY=/Users/timbo/.setdev/perltidyrc
PERL_BADLANG (unset)
SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Jan 7, 2015

From @sevan

On Wed Apr 03 21​:58​:19 2013, mark.dootson@​znix.com wrote​:

Hi,

MACOSX_DEPLOYMENT_TARGET is not always a mere alias for
-mmacosx-version-min and it's precise application changes across SDK
versions.

In MacOSX 10.1 through 10.4 the default deployment target is always
10.1
so, for example, building on 10.4 (osvers 8) you probably want
MACOSX_DEPLOYMENT_TARGET=10.4, although as Perl never had that setting
it would seem prudent to leave it at 10.3

By MacOSX 10.6 the effect of MACOSX_DEPLOYMENT_TARGET would appear to
be
the same as setting -mmacosx-version-min but Apple docs are silent on
this.

I'm not sure about 10.5 (osvers 9) but seeing as that worked OK before
my bash scripting is sketchy but I think if you want 5.18 to support
older OSX versions then in hints/darwin.sh you need something like

case "$osvers" in
1.[0-3].*)
lddlflags="${ldflags} -bundle -undefined suppress"
;;
1.*)
ldflags="${ldflags} -flat_namespace"
lddlflags="${ldflags} -bundle -undefined suppress"
;;
[2-6].*)
ldflags="${ldflags} -flat_namespace"
lddlflags="${ldflags} -bundle -undefined suppress"
;;
[7-9].*)
lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
case "$ld" in
*MACOSX_DEVELOPMENT_TARGET*) ;;
*) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
esac
;;
*)
lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
;;
esac

This is the approach pkgsrc now takes when building on OS X
http​://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/lang/perl5/patches/patch-hints_darwin.sh?rev=1.5&content-type=text/x-cvsweb-markup&only_with_tag=MAIN

@p5pRT
Copy link
Author

p5pRT commented Oct 16, 2015

From @jhi

Resolved, somewhat similarly, somewhat differently, in https://rt-archive.perl.org/perl5/Ticket/Display.html?id=126360

@p5pRT
Copy link
Author

p5pRT commented Oct 16, 2015

@jhi - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Oct 16, 2015
@p5pRT
Copy link
Author

p5pRT commented Oct 17, 2015

From @jkeenan

A build summary attached.
--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Oct 17, 2015

From @jkeenan

$ ./perl -Ilib -V
Summary of my perl5 (revision 5 version 23 subversion 4) configuration​:
  Commit id​: 53d1d41
  Platform​:
  osname=darwin, osvers=8.11.0, archname=darwin-2level
  uname='darwin macintosh-9.local 8.11.0 darwin kernel version 8.11.0​: wed oct 10 18​:26​:00 pdt 2007; root​:xnu-792.24.17~1release_ppc power macintosh powerpc '
  config_args='-des -Dusedevel'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=undef, usemultiplicity=undef
  use64bitint=undef, use64bitall=undef, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include -D_FORTIFY_SOURCE=2',
  optimize='-O3',
  cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include'
  ccversion='', gccversion='4.0.1 (Apple Computer, Inc. build 5250)', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321, doublekind=4
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=6
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -L/usr/local/lib -L/opt/local/lib'
  libpth=/usr/local/lib /usr/lib /opt/local/lib
  libs=-lpthread -ldbm -ldl -lm -lc
  perllibs=-lpthread -ldl -lm -lc
  libc=, so=dylib, useshrplib=false, libperl=libperl.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
  cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib'

Characteristics of this binary (from libperl)​:
  Compile-time options​: HAS_TIMES PERLIO_LAYERS PERL_COPY_ON_WRITE
  PERL_DONT_CREATE_GVSV
  PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
  PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_LARGE_FILES
  USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO
  USE_PERL_ATOF
  Built under darwin
  Compiled at Oct 16 2015 18​:46​:24
  %ENV​:
  PERLBREW_BASHRC_VERSION="0.59"
  PERLBREW_HOME="/Users/jimk/.perlbrew"
  PERLBREW_ROOT="/Users/jimk/perl5/perlbrew"
  PERL_WORKDIR="gitwork/perl"
  @​INC​:
  lib
  /usr/local/lib/perl5/site_perl/5.23.4/darwin-2level
  /usr/local/lib/perl5/site_perl/5.23.4
  /usr/local/lib/perl5/5.23.4/darwin-2level
  /usr/local/lib/perl5/5.23.4
  /usr/local/lib/perl5/site_perl
  .

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

No branches or pull requests

1 participant