[MacPorts] #62867: ncarg: sh: -Wno-error=implicit-function-declaration: command not found

MacPorts noreply at macports.org
Tue May 11 14:53:24 UTC 2021


#62867: ncarg: sh: -Wno-error=implicit-function-declaration: command not found
------------------------+----------------------
 Reporter:  ryandesign  |      Owner:  tenomoto
     Type:  defect      |     Status:  assigned
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:  2.6.4
 Keywords:              |       Port:  ncarg
------------------------+----------------------
 https://build.macports.org/builders/ports-
 11_arm64-builder/builds/20191/steps/install-port/logs/stdio
 {{{
 DEBUG: system -W
 /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_ncarg/ncarg/work/ncl-6.6.2/config:
 CC=/opt/local/bin/h5cc  CFLAGS=-Os -Wno-error=implicit-function-
 declaration -isysroot
 /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk  make -f
 Makefile.ini;  ./ymake -config `pwd`
 sh: -Wno-error=implicit-function-declaration: command not found
 /dev/tty: Device not configured.
 }}}

 So there are two problems:

 First, when you pass CFLAGS to ymake you need to enclose them in quotation
 marks:

 {{{
 #!diff
 --- Portfile.orig
 +++ Portfile
 @@ -169,7 +169,7 @@
      # run ymake
      system -W ${worksrcpath}/config \
          "CC=${configure.cc} \
 -        CFLAGS=${configure.cflags} \
 +        CFLAGS=\"${configure.cflags}\" \
          make -f Makefile.ini; \
          ./ymake -config `pwd`"
 }}}

 Second, `-Wno-error=implicit-function-declaration` needs to be removed
 because masking implicit function declaration errors will most likely just
 result in a build on Apple Silicon systems that does not work correctly:

 {{{
 #!diff
 --- Portfile.orig
 +++ Portfile
 @@ -106,7 +106,6 @@
      }
  }

 -configure.cflags-append     -Wno-error=implicit-function-declaration
  if {${configure.sdkroot} ne ""} {
      configure.cflags-append     -isysroot ${configure.sdkroot}
      configure.fflags-append     -isysroot ${configure.sdkroot}
 }}}

 After removing this flag, the build should fail with Xcode 12 and later
 with some implicit declaration of function errors as originally reported
 in #61275. They will need to be fixed properly, by declaring functions
 before calling them, e.g. by including the appropriate headers. You don't
 need to do it yourself; you can report the problem to the developers and
 have them do it. If they won't do it and you don't want to, then using
 `-Wno-error=implicit-function-declaration` is acceptable for Intel systems
 but you should then remove arm64 from supported_archs.

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


More information about the macports-tickets mailing list