[MacPorts] #64219: p5-alien-gmp: cc1: error: unrecognized command line option "-fstack-protector-strong"

MacPorts noreply at macports.org
Wed Dec 15 05:28:05 UTC 2021


#64219: p5-alien-gmp: cc1: error: unrecognized command line option "-fstack-
protector-strong"
------------------------+--------------------------
 Reporter:  ryandesign  |      Owner:  dbevans
     Type:  defect      |     Status:  assigned
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:  2.7.1
 Keywords:              |       Port:  p5-alien-gmp
------------------------+--------------------------
 On 10.6 only:

 https://build.macports.org/builders/ports-10.6_x86_64-builder/builds/83020/steps
 /install-port/logs/stdio

 {{{
 Alien::Build::Plugin::Probe::CBuilder> trying: cflags= libs=-lgmp
 Alien::Build::Plugin::Probe::CBuilder> compile failed: error building
 mytest.o from 'mytest.c' at
 /opt/local/lib/perl5/vendor_perl/5.28/ExtUtils/CBuilder/Base.pm line 186.
 Alien::Build::Plugin::Probe::CBuilder> compile failed: /usr/bin/gcc-4.2
 -I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE -c -fno-common
 -DPERL_DARWIN -pipe -Os -fno-strict-aliasing -fstack-protector-strong
 -I/opt/local/include -DPERL_USE_SAFE_PUTENV -pipe -Os -Wno-error=implicit-
 function-declaration -O3 -o mytest.o mytest.c
 Alien::Build::Plugin::Probe::CBuilder> cc1: error: unrecognized command
 line option "-fstack-protector-strong"
 Alien::Build::Plugin::Probe::CBuilder> trying: cflags=-I/usr/include/gmp
 libs=-lgmp
 Warning: prerequisite Alien::m4 0.08 not found.
 Warning: prerequisite IO::Socket::SSL 1.56 not found.
 Warning: prerequisite Mojo::DOM58 1.00 not found.
 Warning: prerequisite Net::SSLeay 1.49 not found.
 Warning: prerequisite Sort::Versions 0 not found.
 Warning: prerequisite URI 0 not found.
 Warning: prerequisite URI::Escape 0 not found.
 Alien::Build::Plugin::Probe::CBuilder> compile failed: error building
 mytest.o from 'mytest.c' at
 /opt/local/lib/perl5/vendor_perl/5.28/ExtUtils/CBuilder/Base.pm line 186.
 Alien::Build::Plugin::Probe::CBuilder> compile failed: /usr/bin/gcc-4.2
 -I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE
 -I/usr/include/gmp -c -fno-common -DPERL_DARWIN -pipe -Os -fno-strict-
 aliasing -fstack-protector-strong -I/opt/local/include
 -DPERL_USE_SAFE_PUTENV -pipe -Os -Wno-error=implicit-function-declaration
 -O3 -o mytest.o mytest.c
 Alien::Build::Plugin::Probe::CBuilder> cc1: error: unrecognized command
 line option "-fstack-protector-strong"
 Alien::Build> error in probe (will do a share install): Died at
 /opt/local/lib/perl5/vendor_perl/5.28/Alien/Build/Plugin/Probe/CBuilder.pm
 line 99.
 }}}
 {{{
 Can't locate Sort/Versions.pm in @INC (you may need to install the
 Sort::Versions module) (@INC contains: /opt/local/lib/perl5/site_perl/5.28
 /darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28
 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level
 /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-
 thread-multi-2level /opt/local/lib/perl5/5.28) at
 /opt/local/lib/perl5/vendor_perl/5.28/Alien/Build.pm line 316.
 }}}

 https://build.macports.org/builders/ports-10.6_i386-builder/builds/47718/steps
 /install-port/logs/stdio

 {{{
 Alien::Build::Plugin::Probe::CBuilder> compile failed: error building
 mytest.o from 'mytest.c' at
 /opt/local/lib/perl5/vendor_perl/5.28/ExtUtils/CBuilder/Base.pm line 186.
 Alien::Build::Plugin::Probe::CBuilder> compile failed: /usr/bin/gcc-4.2
 -I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE -c -fno-common
 -DPERL_DARWIN -pipe -Os -fno-strict-aliasing -fstack-protector-strong
 -I/opt/local/include -DPERL_USE_SAFE_PUTENV -pipe -Os -Wno-error=implicit-
 function-declaration -O3 -o mytest.o mytest.c
 Alien::Build::Plugin::Probe::CBuilder> cc1: error: unrecognized command
 line option "-fstack-protector-strong"
 Alien::Build::Plugin::Probe::CBuilder> trying: cflags=-I/usr/include/gmp
 libs=-lgmp
 Warning: prerequisite Alien::m4 0.08 not found.
 Warning: prerequisite IO::Socket::SSL 1.56 not found.
 Warning: prerequisite Mojo::DOM58 1.00 not found.
 Warning: prerequisite Net::SSLeay 1.49 not found.
 Warning: prerequisite Sort::Versions 0 not found.
 Warning: prerequisite URI 0 not found.
 Warning: prerequisite URI::Escape 0 not found.
 Alien::Build::Plugin::Probe::CBuilder> compile failed: error building
 mytest.o from 'mytest.c' at
 /opt/local/lib/perl5/vendor_perl/5.28/ExtUtils/CBuilder/Base.pm line 186.
 Alien::Build::Plugin::Probe::CBuilder> compile failed: /usr/bin/gcc-4.2
 -I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE
 -I/usr/include/gmp -c -fno-common -DPERL_DARWIN -pipe -Os -fno-strict-
 aliasing -fstack-protector-strong -I/opt/local/include
 -DPERL_USE_SAFE_PUTENV -pipe -Os -Wno-error=implicit-function-declaration
 -O3 -o mytest.o mytest.c
 Alien::Build::Plugin::Probe::CBuilder> cc1: error: unrecognized command
 line option "-fstack-protector-strong"
 Alien::Build> error in probe (will do a share install): Died at
 /opt/local/lib/perl5/vendor_perl/5.28/Alien/Build/Plugin/Probe/CBuilder.pm
 line 99.
 }}}
 {{{
 "/opt/local/bin/perl5.28" -MAlien::Build::MM=cmd -e prefix vendor
 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level
 /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level
 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level
 Can't locate Mojo/DOM58.pm in @INC (you may need to install the
 Mojo::DOM58 module) (@INC contains: /opt/local/lib/perl5/site_perl/5.28
 /darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28
 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level
 /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-
 thread-multi-2level /opt/local/lib/perl5/5.28) at
 /opt/local/lib/perl5/vendor_perl/5.28/Alien/Build.pm line 316.
 }}}

 I think the issue is that perl gets built with a newer clang, so it sees
 that `-fstack-protector-strong` works and that fact gets baked into the
 perl configuration files that get installed. Then it tries to use this
 flag when building perl modules, even if the perl module is built with an
 older compiler that doesn't understand that flag.

 Josh tried to address some of this problem in
 [f35a2c53331234cc730b090b1b866d4b1702a747/macports-ports] but it only
 covered specific flags, and didn't include this one. I'm not sure what the
 right solution is, other than explaining to the perl developers yet again
 the folly of their assumption that the compiler that's used to compile
 perl will be the same compiler used to compile all modules.

-- 
Ticket URL: <https://trac.macports.org/ticket/64219>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list