#68589 closed defect (fixed)
gpac @2.2.1: Undefined symbols: _memrchr referenced from _gf_props_parse_value in filter_props.o
Reported by: | cdeschryver (Christian De Schryver) | Owned by: | mohd-akram (Mohamed Akram) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | sonoma, arm64 | Cc: | |
Port: | gpac |
Description
The build fails on Sonoma 14.0 and 14.1 Apple Silicon machine with the following errors:
:info:build ld: warning: ignoring duplicate libraries: '-lcrypto', '-logg', '-lssl', '-lz' :info:build ld: Undefined symbols: :info:build _memrchr, referenced from: :info:build _gf_props_parse_value in filter_props.o :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build make[1]: *** [../bin/gcc/libgpac.dylib] Error 1 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_gpac/gpac/work/gpac-2.2.1/src' :info:build make: *** [all] Error 2 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_gpac/gpac/work/gpac-2.2.1' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_gpac/gpac/work/gpac-2.2.1" && /usr/bin/make -j1 -w all :info:build Exit code: 2 :error:build Failed to build gpac: command execution failed :debug:build Error code: CHILDSTATUS 37860 2 :debug:build Backtrace: command execution failed :debug:build while executing :debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring" :debug:build invoked from within :debug:build "command_exec -callback portprogress::target_progress_callback build" :debug:build (procedure "portbuild::build_main" line 8) :debug:build invoked from within :debug:build "$procedure $targetname" :error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_gpac/gpac/main.log for details.
Tried cleaning, un- and reinstalling multiple times. Thanks for checking! Best Christian
Attachments (1)
Change History (11)
Changed 13 months ago by cdeschryver (Christian De Schryver)
comment:1 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to mohd-akram |
---|---|
Status: | new → assigned |
Summary: | Build error on MacOS Sonoma arm64: _memrchr referenced from _gf_props_parse_value in filter_props.o → gpac @2.2.1: Undefined symbols: _memrchr referenced from _gf_props_parse_value in filter_props.o |
macOS doesn't have memrchr
so gpac shouldn't be trying to use it.
I don't find any occurrences of memrchr
in the gpac source code so I don't know where it's coming from.
We had successful builds of this port on our automated builders on Yosemite through Ventura and it built fine for me just now on my Monterey x86_64 machine. We haven't tried to build it on Sonoma yet.
Do you have anything in /usr/local that might be interfering?
comment:2 Changed 13 months ago by mohd-akram (Mohamed Akram)
This is due to a Clang bug that is fixed upstream and was fixed recently in Apple's fork. I imagine it would be released in the next macOS update.
comment:3 Changed 13 months ago by cdeschryver (Christian De Schryver)
Thanks for checking so quickly! Makes a lot of sense, although I'm still wondering why gpac built without problems on the same machine for Ventura as well. I will wait for the next macOS update. Best Christian
comment:4 Changed 11 months ago by cdeschryver (Christian De Schryver)
Problem still persists on macOS Ventura 14.2 with Xcode 15.1 and Apple clang version 15.0.0 (clang-1500.1.0.2.5)
comment:5 Changed 11 months ago by mohd-akram (Mohamed Akram)
Thanks for checking. I've left a comment on Apple's PR to make them aware of it. To work around this we could use MacPorts' clang for Sonoma, but I'm not quite sure how that's done in the Portfile.
comment:6 Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)
The compiler_blacklist_versions portgroup is used to indicate ranges of compiler versions that are not suitable for a port.
If it is a general problem that should be solved in MacPorts base so that a particular range of clang versions is never used to build any port, then the functionality of the compiler_blacklist_versions portgroup should be integrated into MacPorts base and it should be used to influence compiler selection. It was always intended that this functionality migrate from portgroup to base but it never happened.
comment:7 Changed 11 months ago by cdeschryver (Christian De Schryver)
Build still fails with the same message with XCode 15.2 and Apple clang version 15.0.0 (clang-1500.1.0.2.5) on Apple M1 Max with Sonoma 14.2.1 - obviously clang was not updated with XCode 15.2
comment:8 Changed 11 months ago by mohd-akram (Mohamed Akram)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:9 Changed 11 months ago by mohd-akram (Mohamed Akram)
Sorry about that, thanks for checking again. I found a simple fix for it (using -fno-builtin-strrchr
) that I pushed. This issue has also been fixed upstream so the flag won't be required in the next version.
build log