-
Notifications
You must be signed in to change notification settings - Fork 594
Description
Module:
Description
The Perl 5.41.11 Configure script fails to create a Makefile under MacOS. The problem appears to be a syntax error in hints/darwin.sh:
Which of these apply, if any? [darwin] ```
Adding -mmacosx-version-min=13.7 to ccflags
Adding -mmacosx-version-min=13.7 to ldflags
./hints/darwin.sh: line 376: syntax error near unexpected token `('
./hints/darwin.sh: line 376: `if [ "$darwin_major" -ge 24 && "$perl_revision" -ge 5 -a ( "$perl_version" -ge 42 -o ( "$perl_version" -eq 41 -a "$perl_subversion" -ge 11 ) ) ]; then'
When I correct the syntax errors (under the assumption that the intended functionality is "if building perl 5.41.11 or later under Darwin 24 or later"), the Makefile is generated, and builds a Perl which passes all tests.
I am preparing a pull request for this. In case I drop the ball, here is the diff -u
for the proposed change:
--- perl-5.41.11/hints/darwin.sh 2025-04-20 21:25:39
+++ perl-5.41.11-patched/hints/darwin.sh 2025-04-21 10:36:16
@@ -373,7 +373,7 @@
# Get: "Assertion failed: (p->val == key), function lookup_substsearch, file
# collate.c, line 596."
-if [ "$darwin_major" -ge 24 && "$perl_revision" -ge 5 -a ( "$perl_version" -ge 42 -o ( "$perl_version" -eq 41 -a "$perl_subversion" -ge 11 ) ) ]; then
+if [ "$darwin_major" -ge 24 -a "$perl_revision" -ge 5 -a \( "$perl_version" -ge 42 -o \( "$perl_version" -eq 41 -a "$perl_subversion" -ge 11 \) \) ]; then
ccflags="$ccflags -DNO_LOCALE_COLLATE"
fi
Basicly I have replaced a &&
with -a
, and escaped all the parentheses.
Steps to Reproduce
Extract perl-5.41.11.tar.xz
CD to the directory thus created and run the Configure script.
Execute the Configure script. The specific command I used (since macOS defaults to zsh these days) was:
$ bash Configure -Dprefix=/trw/local/perl/5.41.11 -Dcf_email=wyant@cpan.org -Uinstallusrbinperl -e -d -Dusedevel -Uversiononly 2>&1 | tee config.log
Expected behavior
The Configure script should generate file Makefile
.
Perl configuration
I am not sure this is relevant, since I am reporting a bug inConfigure
. This output is from a Perl built with a patched hints/darwin.sh
.
Summary of my perl5 (revision 5 version 41 subversion 11) configuration:
Platform:
osname=darwin
osvers=22.6.0
archname=darwin-2level
uname='darwin samwise.local 22.6.0 darwin kernel version 22.6.0: thu mar 6 21:52:09 pst 2025; root:xnu-8796.141.3.711.5~1release_x86_64 x86_64 '
config_args='-Dprefix=/trw/local/perl/5.41.11 -Dcf_email=wyant@cpan.org -Uinstallusrbinperl -e -d -Dusedevel -Uversiononly'
hint=recommended
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
Compiler:
cc='cc'
ccflags ='-fno-common -DPERL_DARWIN -mmacosx-version-min=13.7 -DNO_THREAD_SAFE_QUERYLOCALE -DNO_POSIX_2008_LOCALE -DHAS_BROKEN_LANGINFO_CODESET -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -I/opt/local/include'
optimize='-O3'
cppflags='-fno-common -DPERL_DARWIN -mmacosx-version-min=13.7 -DNO_THREAD_SAFE_QUERYLOCALE -DNO_POSIX_2008_LOCALE -DHAS_BROKEN_LANGINFO_CODESET -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -I/opt/local/include'
ccversion=''
gccversion='Apple LLVM 15.0.0 (clang-1500.1.0.2.5)'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='cc'
ldflags =' -mmacosx-version-min=13.7 -fstack-protector-strong -L/usr/local/lib -L/opt/local/lib'
libpth=/usr/local/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/lib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib /opt/local/lib /usr/lib
libs=-lgdbm
perllibs=
libc=
so=dylib
useshrplib=false
libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=bundle
d_dlsymun=undef
ccdlflags=' '
cccdlflags=' '
lddlflags=' -mmacosx-version-min=13.7 -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector-strong'
Characteristics of this binary (from libperl):
Compile-time options:
HAS_LONG_DOUBLE
HAS_STRTOLD
HAS_TIMES
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_SIPHASH13
PERL_HASH_USE_SBOX32
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
PERL_USE_DEVEL
PERL_USE_SAFE_PUTENV
USE_64_BIT_ALL
USE_64_BIT_INT
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 Apr 21 2025 10:42:03
@INC:
/trw/local/perl/5.41.11/lib/site_perl/5.41.11/darwin-2level
/trw/local/perl/5.41.11/lib/site_perl/5.41.11
/trw/local/perl/5.41.11/lib/5.41.11/darwin-2level
/trw/local/perl/5.41.11/lib/5.41.11
And just so you have it, this is the uname -a
output:
Darwin Censored.local 22.6.0 Darwin Kernel Version 22.6.0: Thu Mar 6 21:52:09 PST 2025; root:xnu-8796.141.3.711.5~1/RELEASE_X86_64 x86_64
Yes, this is a couple OS releases behind.