[MacPorts] #62449: libffi @3.3_1: not building universal on arm64

MacPorts noreply at macports.org
Tue Apr 13 19:46:24 UTC 2021


#62449: libffi @3.3_1: not building universal on arm64
---------------------+-----------------------
  Reporter:  kencu   |      Owner:  (none)
      Type:  defect  |     Status:  new
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:
Resolution:          |   Keywords:  universal
      Port:  libffi  |
---------------------+-----------------------

Comment (by jrjsmrtn):

 I was following https://github.com/libffi/libffi/issues/571 so I quickly
 patched the `libffi` portfile to build and test the git master with
 +universal:

 {{{
 in ~/Repositories/macports-ports
 $ git diff
 diff --git a/devel/libffi/Portfile b/devel/libffi/Portfile
 index aea69e87cd3..b6a4368b3fd 100644
 --- a/devel/libffi/Portfile
 +++ b/devel/libffi/Portfile
 @@ -4,9 +4,9 @@ PortSystem          1.0
  PortGroup           muniversal 1.0
  PortGroup           github 1.0

 -github.setup        libffi libffi 3.3 v
 -revision            1
 -github.tarball_from releases
 +github.setup        libffi libffi
 eafab2356e8dcf5f01d2bcfa311cafba3b395a7e
 +version             20210324
 +
  categories          devel
  platforms           darwin
  license             MIT
 @@ -21,12 +21,9 @@ long_description    The libffi library provides a
 portable, high level \

  homepage            https://www.sourceware.org/libffi/

 -checksums           rmd160  2cd43b66d792f1bad76df2e19a8411beacfcb8e0 \
 -                    sha256
 72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056 \
 -                    size    1305466
 -
 -# committed upstream, see https://github.com/libffi/libffi/pull/583
 -patchfiles          patch-libffi-darwin-powerpc-no-go-closures.diff
 +checksums           rmd160  e31a0e50acf68f4b202e4fa9cfddaccd46ffa74b \
 +                    sha256
 6b84af773859a8823aa609bd31fa2e777bdcaa2dbffeac7339689d8d9d3df0e8 \
 +                    size    539046

  if {${os.platform} eq "darwin" && ${os.major} < 10 && ![string match
 *clang* ${configure.compiler}]} {
      # https://trac.macports.org/ticket/61170
 }}}

 AFAICT, all tests are successful except for `testsuite/libffi.go/go.exp`:

 {{{
 $ sudo port -ds build libffi +universal && sudo port -ds test libffi
 +universal
 [...]

 in /opt/local/var/macports/build/_Users_gm_Repositories_macports-
 ports_devel_libffi/libffi/work/libffi-
 eafab2356e8dcf5f01d2bcfa311cafba3b395a7e-arm64
 $ less aarch64-apple-darwin20.3.0/testsuite/libffi.log
 [...]
 Running ../../testsuite/libffi.go/go.exp ...
 set_ld_library_path_env_vars:
 ld_library_path=:/opt/local/var/macports/build
 /_Users_gm_Repositories_macports-ports_devel_libffi/libffi/work/libffi-
 eafab2356e8dcf5f01d2bcfa311cafb
 a3b395a7e-arm64/aarch64-apple-
 darwin20.3.0/testsuite/../.libs:/opt/local/var/macports/build
 /_Users_gm_Repositories_macports-ports_devel_libffi/libffi/work/libffi-
 eafab2356e8dcf5f
 01d2bcfa311cafba3b395a7e-arm64/aarch64-apple-
 darwin20.3.0/testsuite/../.libs:/opt/local/var/macports/build
 /_Users_gm_Repositories_macports-ports_devel_libffi/libffi/work/libffi-e
 afab2356e8dcf5f01d2bcfa311cafba3b395a7e-arm64/aarch64-apple-
 darwin20.3.0/testsuite/../.libs:/opt/local/var/macports/build
 /_Users_gm_Repositories_macports-ports_devel_libffi/libff
 i/work/libffi-eafab2356e8dcf5f01d2bcfa311cafba3b395a7e-arm64/aarch64
 -apple-darwin20.3.0/testsuite/../.libs:/opt/local/var/macports/build
 /_Users_gm_Repositories_macports-ports_dev
 el_libffi/libffi/work/libffi-eafab2356e8dcf5f01d2bcfa311cafba3b395a7e-
 arm64/aarch64-apple-darwin20.3.0/testsuite/../.libs
 Executing on host: /usr/bin/clang ffitest9457.c
 -I/opt/local/var/macports/build/_Users_gm_Repositories_macports-
 ports_devel_libffi/libffi/work/libffi-eafab2356e8dcf5f01d2bcfa31
 1cafba3b395a7e-arm64/aarch64-apple-darwin20.3.0/testsuite/../include
 -I../../testsuite/../include  -I/opt/local/var/macports/build
 /_Users_gm_Repositories_macports-ports_devel_lib
 ffi/libffi/work/libffi-eafab2356e8dcf5f01d2bcfa311cafba3b395a7e-
 arm64/aarch64-apple-darwin20.3.0/testsuite/../include/..
 -L/opt/local/var/macports/build/_Users_gm_Repositories_ma
 cports-ports_devel_libffi/libffi/work/libffi-
 eafab2356e8dcf5f01d2bcfa311cafba3b395a7e-arm64/aarch64-apple-
 darwin20.3.0/testsuite/../.libs -Wl,-allow_stack_execute -S -o /dev/null
     (timeout = 300)
 spawn -ignore SIGHUP /usr/bin/clang ffitest9457.c
 -I/opt/local/var/macports/build/_Users_gm_Repositories_macports-
 ports_devel_libffi/libffi/work/libffi-eafab2356e8dcf5f01d2bcfa31
 1cafba3b395a7e-arm64/aarch64-apple-darwin20.3.0/testsuite/../include
 -I../../testsuite/../include -I/opt/local/var/macports/build
 /_Users_gm_Repositories_macports-ports_devel_libf
 fi/libffi/work/libffi-eafab2356e8dcf5f01d2bcfa311cafba3b395a7e-
 arm64/aarch64-apple-darwin20.3.0/testsuite/../include/..
 -L/opt/local/var/macports/build/_Users_gm_Repositories_mac
 ports-ports_devel_libffi/libffi/work/libffi-
 eafab2356e8dcf5f01d2bcfa311cafba3b395a7e-arm64/aarch64-apple-
 darwin20.3.0/testsuite/../.libs -Wl,-allow_stack_execute -S -o /dev/null
 clang: warning: -Wl,-allow_stack_execute: 'linker' input unused [-Wunused-
 command-line-argument]
 clang: warning: argument unused during compilation:
 '-L/opt/local/var/macports/build/_Users_gm_Repositories_macports-
 ports_devel_libffi/libffi/work/libffi-eafab2356e8dcf5f01d2bcf
 a311cafba3b395a7e-arm64/aarch64-apple-darwin20.3.0/testsuite/../.libs'
 [-Wunused-command-line-argument]
 ffitest9457.c:5:3: error: Failed #ifdef FFI_GO_CLOSURES
 # error Failed #ifdef FFI_GO_CLOSURES
   ^
 1 error generated.
 compiler exited with status 1
 UNSUPPORTED: ../../testsuite/libffi.go/aa-direct.c
 UNSUPPORTED: ../../testsuite/libffi.go/closure1.c
 testcase ../../testsuite/libffi.go/go.exp completed in 0 seconds

                 === libffi Summary ===

 # of expected passes            547
 # of unexpected failures        1
 # of unsupported tests          204
 runtest completed at Tue Apr 13 12:15:21 2021
 }}}

 As, according to https://github.com/libffi/libffi/issues/571, there is
 still work to do with `libffi` on M1, I was thinking of adding a `libffi-
 devel` subport to ease testing, at least until `libffi` 3.4 is released.
 What do you think ?

-- 
Ticket URL: <https://trac.macports.org/ticket/62449#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list