Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#64526 closed defect (fixed)

p5-filesys-df 0.920.0: fails with unrecognized "-fstack-protector-strong" on snow leopard 10.6

Reported by: tenzap Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version:
Keywords: snowleopard Cc:
Port: p5-filesys-df

Description

Error message

/usr/bin/gcc-4.2 -c   -fno-common -DPERL_DARWIN -pipe -Os -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV  -isysroot/ -O3   -DVERSION=\"0.92\" -DXS_VERSION=\"0.92\"  "-I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE"   Df.c
cc1: error: unrecognized command line option "-fstack-protector-strong"

Compiler

DEBUG: Preferred compilers: gcc-4.2 llvm-gcc-4.2 clang gcc-4.0 macports-clang-11 macports-clang-10 macports-clang-9.0 macports-clang-8.0 macports-clang-7.0 macports-clang-6.0 macports-clang-5.0 macports-clang-3.7 macports-clang-3.4 macports-gcc-11 macports-gcc-10 macports-gcc-9 macports-gcc-8 macports-gcc-7 macports-gcc-6 macports-gcc-5
DEBUG: Using compiler 'Xcode GCC 4.2'

How to fix this in the portfile?

(There is no problem with macos >= 10.7 as per: https://ports.macports.org/port/p5.28-filesys-df/details/ )

Log:

DEBUG: Changing to port directory: /opt/bblocal/var/buildworker/ports/build/ports/perl/p5-filesys-df
DEBUG: OS darwin/10.8.0 (macOS 10.6.8) arch i386
DEBUG: Re-registering default for configure.universal_args
DEBUG: Sourcing PortGroup perl5 1.0 from /opt/bblocal/var/buildworker/ports/build/ports/_resources/port1.0/group/perl5-1.0.tcl
DEBUG: Re-registering default for livecheck.version
DEBUG: only one arch supported, so not adding the default universal variant
DEBUG: Running callback portconfigure::add_automatic_compiler_dependencies
DEBUG: Finished running callback portconfigure::add_automatic_compiler_dependencies
DEBUG: Running callback portbuild::add_automatic_buildsystem_dependencies
DEBUG: Finished running callback portbuild::add_automatic_buildsystem_dependencies
DEBUG: Running callback portstartupitem::add_notes
DEBUG: Finished running callback portstartupitem::add_notes
DEBUG: Attempting ln -sf /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work /opt/bblocal/var/buildworker/ports/build/ports/perl/p5-filesys-df/work
DEBUG: dropping privileges: euid changed to 502, egid changed to 505.
DEBUG: Starting logging for p5.28-filesys-df @0.920.0_0
DEBUG: Mac OS X 10.6.8 (darwin/10.8.0) arch i386
DEBUG: MacPorts 2.7.1
DEBUG: Xcode 3.2.6
DEBUG: SDK 10.6
DEBUG: MACOSX_DEPLOYMENT_TARGET: 10.6
DEBUG: Executing org.macports.main (p5.28-filesys-df)
DEBUG: dropping privileges: euid changed to 502, egid changed to 505.
DEBUG: fetch phase started at Sun Jan 23 18:56:47 UTC 2022
--->  Fetching distfiles for p5.28-filesys-df
DEBUG: elevating privileges for fetch: euid changed to 0, egid changed to 0.
DEBUG: dropping privileges: euid changed to 502, egid changed to 505.
DEBUG: Executing org.macports.fetch (p5.28-filesys-df)
--->  Filesys-Df-0.92.tar.gz does not exist in /opt/local/var/macports/distfiles/perl5
--->  Attempting to fetch Filesys-Df-0.92.tar.gz from http://distfiles.macports.org/perl5
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

 40  7113   40  2896    0     0   2883      0  0:00:02  0:00:01  0:00:01  2883

100  7113  100  7113    0     0   7071      0  0:00:01  0:00:01 --:--:-- 4118kDEBUG: Changing to port directory: /opt/bblocal/var/buildworker/ports/build/ports/perl/p5-filesys-df
DEBUG: OS darwin/10.8.0 (macOS 10.6.8) arch i386
DEBUG: Re-registering default for configure.universal_args
DEBUG: Sourcing PortGroup perl5 1.0 from /opt/bblocal/var/buildworker/ports/build/ports/_resources/port1.0/group/perl5-1.0.tcl
DEBUG: Re-registering default for livecheck.version
DEBUG: only one arch supported, so not adding the default universal variant
DEBUG: Running callback portconfigure::add_automatic_compiler_dependencies
DEBUG: Finished running callback portconfigure::add_automatic_compiler_dependencies
DEBUG: Running callback portbuild::add_automatic_buildsystem_dependencies
DEBUG: Finished running callback portbuild::add_automatic_buildsystem_dependencies
DEBUG: Running callback portstartupitem::add_notes
DEBUG: Finished running callback portstartupitem::add_notes
DEBUG: dropping privileges: euid changed to 502, egid changed to 505.
DEBUG: Starting logging for p5.28-filesys-df @0.920.0_0
DEBUG: Mac OS X 10.6.8 (darwin/10.8.0) arch i386
DEBUG: MacPorts 2.7.1
DEBUG: Xcode 3.2.6
DEBUG: SDK 10.6
DEBUG: MACOSX_DEPLOYMENT_TARGET: 10.6
--->  Computing dependencies for p5.28-filesys-df
DEBUG: p5.28-filesys-df has no conflicts
DEBUG: Searching for dependency: perl5.28
DEBUG: Found Dependency: receipt exists for perl5.28
DEBUG: Executing org.macports.main (p5.28-filesys-df)
DEBUG: dropping privileges: euid changed to 502, egid changed to 505.
DEBUG: archivefetch phase started at Sun Jan 23 18:56:53 UTC 2022
--->  Fetching archive for p5.28-filesys-df
DEBUG: Executing org.macports.archivefetch (p5.28-filesys-df)
DEBUG: euid/egid changed to: 0/0
DEBUG: chowned /opt/local/var/macports/incoming to macports
DEBUG: euid/egid changed to: 502/505
--->  p5.28-filesys-df-0.920.0_0.darwin_10.noarch.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified
--->  Attempting to fetch p5.28-filesys-df-0.920.0_0.darwin_10.noarch.tbz2 from http://packages-private.internal.macports.net/p5.28-filesys-df

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0DEBUG: Fetching archive failed: The requested URL returned error: 404
--->  Attempting to fetch p5.28-filesys-df-0.920.0_0.darwin_10.noarch.tbz2 from http://packages-private.internal.macports.net/p5.28-filesys-df

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0DEBUG: Fetching archive failed: The requested URL returned error: 404
--->  Attempting to fetch p5.28-filesys-df-0.920.0_0.darwin_10.noarch.tbz2 from http://packages.internal.macports.net/p5.28-filesys-df

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0DEBUG: Fetching archive failed: The requested URL returned error: 404
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.fetch (p5.28-filesys-df)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: checksum phase started at Sun Jan 23 18:56:56 UTC 2022
--->  Verifying checksums for p5.28-filesys-df
DEBUG: Executing org.macports.checksum (p5.28-filesys-df)
--->  Checksumming Filesys-Df-0.92.tar.gz
DEBUG: Calculated (rmd160) is 8baf50df114f3b5af70df8b9c0cb005b5558ee67
DEBUG: Correct (rmd160) checksum for Filesys-Df-0.92.tar.gz
DEBUG: Calculated (sha256) is fe89cbb427e0e05f1cd97c2dd6d3866ac6b21bc7a85734ede159bdc35479552a
DEBUG: Correct (sha256) checksum for Filesys-Df-0.92.tar.gz
DEBUG: Calculated (size) is 7113
DEBUG: Correct (size) checksum for Filesys-Df-0.92.tar.gz
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: extract phase started at Sun Jan 23 18:56:56 UTC 2022
--->  Extracting p5.28-filesys-df
DEBUG: Executing org.macports.extract (p5.28-filesys-df)
--->  Extracting Filesys-Df-0.92.tar.gz
DEBUG: setting option extract.args to '/opt/local/var/macports/distfiles/perl5/Filesys-Df-0.92.tar.gz'
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
DEVELOPER_DIR='/Developer'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
Executing:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/perl5/Filesys-Df-0.92.tar.gz' | /usr/bin/gnutar --no-same-owner -xf - 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/perl5/Filesys-Df-0.92.tar.gz' | /usr/bin/gnutar --no-same-owner -xf - 
DEBUG: euid/egid changed to: 0/0
DEBUG: chowned /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work to macports
DEBUG: euid/egid changed to: 502/505
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: patch phase started at Sun Jan 23 18:56:56 UTC 2022
DEBUG: Executing org.macports.patch (p5.28-filesys-df)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: configure phase started at Sun Jan 23 18:56:56 UTC 2022
--->  Configuring p5.28-filesys-df
DEBUG: Preferred compilers: gcc-4.2 llvm-gcc-4.2 clang gcc-4.0 macports-clang-11 macports-clang-10 macports-clang-9.0 macports-clang-8.0 macports-clang-7.0 macports-clang-6.0 macports-clang-5.0 macports-clang-3.7 macports-clang-3.4 macports-gcc-11 macports-gcc-10 macports-gcc-9 macports-gcc-8 macports-gcc-7 macports-gcc-6 macports-gcc-5
DEBUG: Using compiler 'Xcode GCC 4.2'
DEBUG: Executing org.macports.configure (p5.28-filesys-df)
DEBUG: Environment: 
CC='/usr/bin/gcc-4.2'
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/.CC_PRINT_OPTIONS'
CFLAGS='-pipe -Os'
CPATH='/opt/local/include'
CPPFLAGS='-I/opt/local/include'
CXX='/usr/bin/g++-4.2'
CXXFLAGS='-pipe -Os'
DEVELOPER_DIR='/Developer'
F90FLAGS='-pipe -Os'
FCFLAGS='-pipe -Os'
FFLAGS='-pipe -Os'
INSTALL='/usr/bin/install -c'
LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
OBJC='/usr/bin/gcc-4.2'
OBJCFLAGS='-pipe -Os'
OBJCXX='/usr/bin/g++-4.2'
OBJCXXFLAGS='-pipe -Os'
PERL_AUTOINSTALL='--skipdeps'
Executing:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92" && /opt/local/bin/perl5.28 Makefile.PL INSTALLDIRS=vendor CC="/usr/bin/gcc-4.2" LD="/usr/bin/gcc-4.2" 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92" && /opt/local/bin/perl5.28 Makefile.PL INSTALLDIRS=vendor CC="/usr/bin/gcc-4.2" LD="/usr/bin/gcc-4.2" 
OS = darwin
Checking for statvfs .....
d_statvfs is defined.
i_sysstatvfs is defined.
Building with statvfs ....
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Filesys::Df
Writing MYMETA.yml and MYMETA.json
DEBUG: Executing proc-post-org.macports.configure-configure-0
Fixing flags in Makefile
--->  Patching Makefile: /^CCFLAGS *=/s|$|  -isysroot/|
DEBUG: Executing reinplace: /usr/bin/sed {/^CCFLAGS *=/s|$|  -isysroot/|} </opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92/Makefile >@file10
DEBUG: euid/egid changed to: 0/0
DEBUG: chowned /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92/Makefile to macports
DEBUG: euid/egid changed to: 502/505
DEBUG: euid/egid changed to: 0/0
DEBUG: setting attributes on /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92/Makefile
DEBUG: euid/egid changed to: 502/505
--->  Patching Makefile: /^OTHERLDFLAGS *=/s|$|  -Wl,-syslibroot,/|
DEBUG: Executing reinplace: /usr/bin/sed {/^OTHERLDFLAGS *=/s|$|  -Wl,-syslibroot,/|} </opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92/Makefile >@file10
DEBUG: euid/egid changed to: 0/0
DEBUG: chowned /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92/Makefile to macports
DEBUG: euid/egid changed to: 502/505
DEBUG: euid/egid changed to: 0/0
DEBUG: setting attributes on /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92/Makefile
DEBUG: euid/egid changed to: 502/505
--->  Patching Makefile: s|^(CC *=).*|\1 /usr/bin/gcc-4.2|
DEBUG: Executing reinplace: /usr/bin/sed -E {s|^(CC *=).*|\1 /usr/bin/gcc-4.2|} </opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92/Makefile >@file10
DEBUG: euid/egid changed to: 0/0
DEBUG: chowned /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92/Makefile to macports
DEBUG: euid/egid changed to: 502/505
DEBUG: euid/egid changed to: 0/0
DEBUG: setting attributes on /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92/Makefile
DEBUG: euid/egid changed to: 502/505
DEBUG: Executing portconfigure::configure_finish
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: build phase started at Sun Jan 23 18:56:57 UTC 2022
--->  Building p5.28-filesys-df
DEBUG: Executing org.macports.build (p5.28-filesys-df)
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
DEVELOPER_DIR='/Developer'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
Executing:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92" && /usr/bin/make -j6 -w all 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92" && /usr/bin/make -j6 -w all 
make: Entering directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92'
"/opt/local/bin/perl5.28" "/opt/local/lib/perl5/5.28/ExtUtils/xsubpp" -prototypes -typemap '/opt/local/lib/perl5/5.28/ExtUtils/typemap' -typemap '/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92/typemap'  Df.xs > Df.xsc
Running Mkbootstrap for Df ()
chmod 644 "Df.bs"
"/opt/local/bin/perl5.28" -MExtUtils::Command::MM -e 'cp_nonempty' -- Df.bs blib/arch/auto/Filesys/Df/Df.bs 644
cp Df.pm blib/lib/Filesys/Df.pm
mv Df.xsc Df.c
/usr/bin/gcc-4.2 -c   -fno-common -DPERL_DARWIN -pipe -Os -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV  -isysroot/ -O3   -DVERSION=\"0.92\" -DXS_VERSION=\"0.92\"  "-I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE"   Df.c
cc1: error: unrecognized command line option "-fstack-protector-strong"
make: *** [Df.o] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92'
Command failed:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/work/Filesys-Df-0.92" && /usr/bin/make -j6 -w all 
Exit code: 2
Error: Failed to build p5.28-filesys-df: command execution failed
DEBUG: Error code: CHILDSTATUS 73525 2
DEBUG: Backtrace: command execution failed
    while executing
"system {*}$notty {*}$callback {*}$nice $fullcmdstring"
    invoked from within
"command_exec -callback portprogress::target_progress_callback build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
Error: See /opt/local/var/macports/logs/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-filesys-df/p5.28-filesys-df/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port p5.28-filesys-df failed
Build of 'p5.28-filesys-df' failed.
./mpbb/mpbb: error: `install-port' failed to run successfully

Change History (7)

comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Yeah this problem will probably affect a bunch of perl modules on 10.6. perl itself was built with a newer compiler that supports -fstack-protector-strong so that fact was recorded in perl's config, which then gets used to compile other modules, even though those modules are now being compiled with an older compiler that doesn't support -fstack-protector-strong.

The perl developers expect modules to be compiled with the same compiler that was used to compile perl itself. MacPorts does not enforce that, and I don't think it's reasonable for the perl developers to expect that, so here we are.

You could retry installing this module, and any others where you encounter this problem, with a newer compiler. For example:

sudo port clean p5.28-filesys-df
sudo port install p5.28-filesys-df configure.compiler=macports-clang-9.0

comment:2 Changed 2 years ago by tenzap

Thanks.

How would I have to fix the Portfile, what lines should we add to the Portfile?

Is it better to make an exception for 10.6 only, or to set compiler to macports-clang-9.0 on all macos version?

Also, in comment:ticket:64219:1, it is suggested to use

compiler.cxx_standard 1998
Last edited 2 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 Changed 2 years ago by jmroot (Joshua Root)

Why is this running a compiler in the first place when it's marked as noarch? That's what is preventing a dependency on macports-clang from being added.

comment:4 Changed 2 years ago by jmroot (Joshua Root)

Not the same situation as #64219; this one really does install a mach-o bundle.

comment:5 Changed 2 years ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In e23b310a81c5ec3cc7187d222f76eac3fa2121e9/macports-ports (master):

p5-filesys-df: not noarch

Fixes: #64526

comment:6 Changed 2 years ago by tenzap

Thanks

comment:7 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

In 7f73d9624357ad6b076d4850b40e87ca6d0f3814/macports-ports (master):

p5-filesys-df: Revbump to build for the right arch

Increase revision so that anyone who had it installed for the wrong arch
on macOS 11+ gets it reinstalled for the right arch.

See: #64526

Note: See TracTickets for help on using tickets.