#65880 closed defect (worksforme)
gobject-introspection @1.72.0: g-ir-scanner passes unknown option '-c' to llvm-objdump from llvm-14; causes several ports using it to fail
Reported by: | cooljeanius (Eric Gallager) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | cctools | Cc: | dbevans (David B. Evans), mascguy (Christopher Nielsen) |
Port: | webkit2-gtk, gobject-introspection, llvm-14 |
Description
This is probably an upstream issue, but I'm not sure whether it'd be one for gobject-introspection or llvm, so hopefully someone here can help me figure it out... anyways, I noticed this most recently with webkit2-gtk:
[18/999] cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/Source/JavaScriptCore && CC=/usr/bin/clang CFLAGS=-Wno-deprecated-declarations LDFLAGS= DYLD_LIBRARY_PATH="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/lib" /opt/local/bin/g-ir-scanner --quiet --warn-all --symbol-prefix=jsc --identifier-prefix=JSC --namespace=JavaScriptCore --nsversion=4.0 --include=GObject-2.0 --library=javascriptcoregtk-4.0 -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/lib -L/opt/local/lib --no-libtool --pkg=gobject-2.0 --pkg-export=javascriptcoregtk-4.0 --output=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/JavaScriptCore-4.0.gir --c-include="jsc/jsc.h" -DJSC_COMPILATION -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/DerivedSources/JavaScriptCore/javascriptcoregtk -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/DerivedSources/ForwardingHeaders/JavaScriptCore/glib /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/DerivedSources/JavaScriptCore/javascriptcoregtk/jsc/JSCVersion.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCAutocleanups.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCClass.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCContext.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCDefines.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCException.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCOptions.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCValue.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCVirtualMachine.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCWeakValue.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/jsc.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/*.cpp FAILED: JavaScriptCore-4.0.gir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/JavaScriptCore-4.0.gir cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/Source/JavaScriptCore && CC=/usr/bin/clang CFLAGS=-Wno-deprecated-declarations LDFLAGS= DYLD_LIBRARY_PATH="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/lib" /opt/local/bin/g-ir-scanner --quiet --warn-all --symbol-prefix=jsc --identifier-prefix=JSC --namespace=JavaScriptCore --nsversion=4.0 --include=GObject-2.0 --library=javascriptcoregtk-4.0 -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/lib -L/opt/local/lib --no-libtool --pkg=gobject-2.0 --pkg-export=javascriptcoregtk-4.0 --output=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/JavaScriptCore-4.0.gir --c-include="jsc/jsc.h" -DJSC_COMPILATION -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/DerivedSources/JavaScriptCore/javascriptcoregtk -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/DerivedSources/ForwardingHeaders/JavaScriptCore/glib /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/DerivedSources/JavaScriptCore/javascriptcoregtk/jsc/JSCVersion.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCAutocleanups.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCClass.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCContext.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCDefines.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCException.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCOptions.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCValue.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCVirtualMachine.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/JSCWeakValue.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/jsc.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.28.2/Source/JavaScriptCore/API/glib/*.cpp /opt/local/libexec/llvm-14/bin/llvm-objdump: error: unknown argument '-c' Traceback (most recent call last): File "/opt/local/bin/g-ir-scanner", line 99, in <module> sys.exit(scanner_main(sys.argv)) File "/opt/local/lib/gobject-introspection/giscanner/scannermain.py", line 609, in scanner_main shlibs = create_binary(transformer, options, args) File "/opt/local/lib/gobject-introspection/giscanner/scannermain.py", line 434, in create_binary shlibs = resolve_shlibs(options, binary, options.libraries) File "/opt/local/lib/gobject-introspection/giscanner/shlibs.py", line 185, in resolve_shlibs _resolve_non_libtool(options, binary, non_libtool)) File "/opt/local/lib/gobject-introspection/giscanner/shlibs.py", line 105, in _resolve_non_libtool output = subprocess.check_output(args) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 420, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['otool', '-L', '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/build/Source/JavaScriptCore/tmp-introspect3rryv06y/JavaScriptCore-4.0']' returned non-zero exit status 1.
Neither llvm-objdump nor binutils objdump are documented as supporting a lowercase -c
flag so I don't know why g-ir-scanner
would be trying to pass that... also, I'm not quite sure why the llvm-objdump that's getting used is the one from llvm-14, considering that neither gobject-introspection nor webkit2-gtk declare a dependency on it, nor is llvm-14 the one I have selected via port select
:
$ port select llvm Available versions for llvm: mp-llvm-10 mp-llvm-11 mp-llvm-12 mp-llvm-13 mp-llvm-14 mp-llvm-3.3 mp-llvm-3.4 mp-llvm-3.7 mp-llvm-5.0 mp-llvm-6.0 mp-llvm-7.0 mp-llvm-8.0 mp-llvm-9.0 (active) none $ port installed llvm* The following ports are currently installed: llvm-3.3 @3.3_13+ocaml (active) llvm-3.4 @3.4.2_16 (active) llvm-3.7 @3.7.1_7+polly (active) llvm-5.0 @5.0.2_4+debug+ocaml+polly (active) llvm-6.0 @6.0.1_4+debug+ocaml+polly (active) llvm-7.0 @7.1.0_3+debug+emulated_tls+ocaml+polly (active) llvm-8.0 @8.0.1_3+debug+emulated_tls+ocaml+polly (active) llvm-9.0 @9.0.1_3+debug+emulated_tls+ocaml+polly (active) llvm-10 @10.0.1_3+debug+emulated_tls+ocaml+polly (active) llvm-11 @11.1.0_4+debug+emulated_tls+ocaml+polly (active) llvm-12 @12.0.1_3+debug+tests (active) llvm-13 @13.0.1_2 (active) llvm-14 @14.0.6_0+debug+tests (active) llvm_select @2_1 (active)
Oh wait... maybe it's due to having clang-14 selected with port select
?
$ port select clang Available versions for clang: mp-clang-10 mp-clang-11 mp-clang-13 mp-clang-14 (active) mp-clang-9.0 none
The binary is from llvm-14, not clang-14, though:
$ port provides /opt/local/libexec/llvm-14/bin/llvm-objdump /opt/local/libexec/llvm-14/bin/llvm-objdump is provided by: llvm-14
Anyways, this also affects several other ports that use gobject-introspection during their build process, although I don't have a full list of them at the moment... (I'm on Big Sur with Xcode 13 btw)
Change History (7)
comment:1 follow-up: 4 Changed 2 years ago by mascguy (Christopher Nielsen)
comment:2 Changed 2 years ago by mascguy (Christopher Nielsen)
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:3 Changed 2 years ago by mascguy (Christopher Nielsen)
Keywords: | cctools added |
---|
comment:4 follow-up: 5 Changed 2 years ago by cooljeanius (Eric Gallager)
Replying to mascguy:
Well, it probably would be good to unselect defaults for LLVM, Clang, etc. But as for this failure, I suspect you're running
cctools +llvm14
. (See issue:65830 for a recent example of someone else being bitten by this.)
Ah yup, that was it
To avoid issues, run
sudo port install cctools
on each of your macOS installations, to install the preferred/correct version. And rerun that again, when/if you upgrade to a newer Xcode/CLT.
OK that changed it to cctools +xcode
which appears to be working...
comment:5 Changed 2 years ago by cooljeanius (Eric Gallager)
Replying to cooljeanius:
Replying to mascguy:
Well, it probably would be good to unselect defaults for LLVM, Clang, etc. But as for this failure, I suspect you're running
cctools +llvm14
. (See issue:65830 for a recent example of someone else being bitten by this.)Ah yup, that was it
To avoid issues, run
sudo port install cctools
on each of your macOS installations, to install the preferred/correct version. And rerun that again, when/if you upgrade to a newer Xcode/CLT.OK that changed it to
cctools +xcode
which appears to be working...
Given the sheer number of build failures that this is solving for me, I'm wondering if maybe the cctools port should issue warnings whenever any of its non-default variants are selected?
comment:6 follow-up: 7 Changed 2 years ago by kencu (Ken)
I was moving towards removing all variants from cctools and ld64 for reasons such as these.
But now there is a push to add even more.
comment:7 Changed 2 years ago by mascguy (Christopher Nielsen)
Replying to kencu:
I was moving towards removing all variants from cctools and ld64 for reasons such as these.
But now there is a push to add even more.
After fielding two cctools
-related tickets in the past few weeks, I strongly support eliminating the variants once and for all.
And please feel free to loop me in on any ongoing conversations: Given that this is a support nightmare - and one that can easily be eliminated - I will certainly be sharing my opinion!
Well, it probably would be good to unselect defaults for LLVM, Clang, etc. But as for this failure, I suspect you're running
cctools +llvm14
. (See issue:65830 for a recent example of someone else being bitten by this.)To avoid issues, run
sudo port install cctools
on each of your macOS installations, to install the preferred/correct version. And rerun that again, when/if you upgrade to a newer Xcode/CLT.And please please, don't force a specific variant yourself. The preferred choice varies on a combination of macOS and Xcode version, and it's better to simply let the port figure it out for you!