Opened 2 years ago
Closed 18 months ago
#66151 closed defect (fixed)
vte-0.56.4 fails to compile on macOS 13 arm64
Reported by: | miklosakos (Miklós Ákos) | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | greyhare, fabianwenk (Fabian Wenk), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) | |
Port: | vte |
Description
sudo port install vte fails with the following error: Error: Failed to build vte: command execution failed
Examining the logs reveals the following:
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_vte/vte/work/vte-0.56.4" && /usr/bin/make -j8 -w all CFLAGS="-Os -fstrict-aliasing -pipe -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch arm64" LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch arm64" :info:build Exit code: 2
Running the command manually will produce the following error:
vtetypebuiltins.cc:11:7: error: cannot initialize a parameter of type 'unsigned long *' with an rvalue of type 'typename std::remove_reference<decltype(*(&g_define_type_id__volatile))>::type *' (aka 'volatile unsigned long *') if (g_once_init_enter (&g_define_type_id__volatile)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gatomic.h:113:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ vtetypebuiltins.cc:31:7: error: cannot initialize a parameter of type 'unsigned long *' with an rvalue of type 'typename std::remove_reference<decltype(*(&g_define_type_id__volatile))>::type *' (aka 'volatile unsigned long *') if (g_once_init_enter (&g_define_type_id__volatile)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gatomic.h:113:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ vtetypebuiltins.cc:51:7: error: cannot initialize a parameter of type 'unsigned long *' with an rvalue of type 'typename std::remove_reference<decltype(*(&g_define_type_id__volatile))>::type *' (aka 'volatile unsigned long *') if (g_once_init_enter (&g_define_type_id__volatile)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gatomic.h:113:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ vtetypebuiltins.cc:72:7: error: cannot initialize a parameter of type 'unsigned long *' with an rvalue of type 'typename std::remove_reference<decltype(*(&g_define_type_id__volatile))>::type *' (aka 'volatile unsigned long *') if (g_once_init_enter (&g_define_type_id__volatile)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gatomic.h:113:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ vtetypebuiltins.cc:94:7: error: cannot initialize a parameter of type 'unsigned long *' with an rvalue of type 'typename std::remove_reference<decltype(*(&g_define_type_id__volatile))>::type *' (aka 'volatile unsigned long *') if (g_once_init_enter (&g_define_type_id__volatile)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gatomic.h:113:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ vtetypebuiltins.cc:113:7: error: cannot initialize a parameter of type 'unsigned long *' with an rvalue of type 'typename std::remove_reference<decltype(*(&g_define_type_id__volatile))>::type *' (aka 'volatile unsigned long *') if (g_once_init_enter (&g_define_type_id__volatile)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gatomic.h:113:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ vtetypebuiltins.cc:136:7: error: cannot initialize a parameter of type 'unsigned long *' with an rvalue of type 'typename std::remove_reference<decltype(*(&g_define_type_id__volatile))>::type *' (aka 'volatile unsigned long *') if (g_once_init_enter (&g_define_type_id__volatile)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gatomic.h:113:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ vtetypebuiltins.cc:154:7: error: cannot initialize a parameter of type 'unsigned long *' with an rvalue of type 'typename std::remove_reference<decltype(*(&g_define_type_id__volatile))>::type *' (aka 'volatile unsigned long *') if (g_once_init_enter (&g_define_type_id__volatile)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gatomic.h:113:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ vtetypebuiltins.cc:173:7: error: cannot initialize a parameter of type 'unsigned long *' with an rvalue of type 'typename std::remove_reference<decltype(*(&g_define_type_id__volatile))>::type *' (aka 'volatile unsigned long *') if (g_once_init_enter (&g_define_type_id__volatile)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/local/include/glib-2.0/glib/gatomic.h:113:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~
I have tried cleaning, updating macports and it didn't fix the issue. I just need vte as a dependency for virt-manager and would like to use it, not a developer so I'm asking for help here.
Attachments (2)
Change History (15)
Changed 2 years ago by miklosakos (Miklós Ákos)
Attachment: | vte-cd.log added |
---|
Changed 2 years ago by miklosakos (Miklós Ákos)
Attachment: | vte-main.log added |
---|
comment:1 Changed 2 years ago by jmroot (Joshua Root)
Owner: | set to dbevans |
---|---|
Status: | new → assigned |
comment:2 Changed 2 years ago by greyhare
comment:3 Changed 2 years ago by greyhare
Cc: | greyhare added |
---|
comment:5 follow-up: 6 Changed 23 months ago by jvnknvlgl (Jasper Vinkenvleugel)
I'm having the same issue. VTE also seems to be quite out of date, would updating to a newer version solve this problem? I tried building 0.68, but I'm getting a "ERROR: Assert failed: -Wl,-Bsymbolic-functions is required but not supported is required but not supported".
comment:6 Changed 22 months ago by Gandoon (Erik Hedlund)
Replying to jvnknvlgl:
I'm having the same issue. VTE also seems to be quite out of date, would updating to a newer version solve this problem? I tried building 0.68, but I'm getting a "ERROR: Assert failed: -Wl,-Bsymbolic-functions is required but not supported is required but not supported".
I also want to have the virt-manager, and I have tried cloning the current version from https://gitlab.gnome.org/GNOME/vte to see if I could build the "latest and greatest" version of vte, but it fails with the same ERROR: Assert failed: -Wl,-Bsymbolic-functions is required but not supported is required but not supported
.
The port-file has the configure.args --disable-Bsymbolic
statement. I don´t know if this has something to do with it. If that statement doesn't work as intended maybe?
comment:7 Changed 21 months ago by fabianwenk (Fabian Wenk)
Cc: | fabianwenk added |
---|
comment:8 Changed 21 months ago by fabianwenk (Fabian Wenk)
I did upgrade on one x86_64 system from macOS 12.6.2 (Monterey) to 13.3 (Ventura). Built new MacPorts 2.8.1 from source and then removed and reinstalled all ports, but vte fails (here as well needed for virt-manager).
The build/installation before on Monterey 12.6.2 worked, based on file date (from another not yet upgraded system) it was done on 17th Nov 2021. This was probably from the binary pkg, as I did upgrade to macOS 12.2.1 (Monterey) on 7th March 2022. So I am wondering what had changed so significantly in macOS since then, that now the build fails.
Over all the upgrade to Ventura went really easy, just like a regular macOS minor Update. :)
comment:9 Changed 21 months ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Cc: | MarcusCalhoun-Lopez added |
---|
comment:10 follow-up: 11 Changed 21 months ago by hexane360 (Colin Gilgenbach)
I've found a solution. The following patch fixes the problem in src/vtetypebuiltins.cc.template:
--- src/vtetypebuiltins.cc.template.orig 2023-02-13 03:28:48 +++ src/vtetypebuiltins.cc.template 2023-02-13 03:29:03 @@ -11,7 +11,7 @@ GType @enum_name@_get_type (void) { - static volatile gsize g_define_type_id__volatile = 0; + static gsize g_define_type_id__volatile = 0; if (g_once_init_enter (&g_define_type_id__volatile)) { static const G@Type@Value values[] = {
All it needs is logic to patch only on Ventura and higher, and then it can be merged.
The root cause is Apple changed the calling convention of atomic_load. Gstreamer had the same problem with the Ventura update.
comment:11 Changed 21 months ago by fabianwenk (Fabian Wenk)
Replying to hexane360:
I've found a solution. The following patch fixes the problem in src/vtetypebuiltins.cc.template:
Thanks, that solved it also on my system. virt-manager is working again, but the behavior with mouse clicks in the menus option works only randomly. But as soon as e.g. "File" is selected, the cursor keys can be used to scroll through the menu option and enter to select.
All it needs is logic to patch only on Ventura and higher, and then it can be merged.
I tried this based on https://guide.macports.org/#reference and it seems to work. Maybe it could be done nicer without duplicating the patch files list.
--- Portfile.orig 2022-08-04 15:43:02 +++ Portfile 2023-02-13 13:21:04 @@ -45,9 +45,17 @@ gobject_introspection yes +if {${macos_version_major} < 13} { patchfiles patch-src-pty.cc.diff \ patch-src-vteutils.cc.diff \ patch-vte-gsize.diff +} +if {${macos_version_major} == 13} { +patchfiles patch-src-pty.cc.diff \ + patch-src-vtetypebuiltins.cc.template.diff \ + patch-src-vteutils.cc.diff \ + patch-vte-gsize.diff +} # reconfigure using upstream autogen.sh for intltool 0.51 compatibility
comment:12 Changed 18 months ago by mascguy (Christopher Nielsen)
Owner: | changed from dbevans to mascguy |
---|
comment:13 Changed 18 months ago by mascguy (Christopher Nielsen)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I believe the failures were likely due to fixes needed, per the follow ticket: issue:64746. Those have now been resolved, and indeed, this port now builds successfully for 13_arm64.
Let us know if you're still having issues!
I'm seeing the same thing on x86_64 Ventura.