Cannot build glib2

Ken Cunningham ken.cunningham.webuse at gmail.com
Mon Apr 17 04:45:26 UTC 2023


if glib2 now links against dbus (and it seems at least one test does) then dbus will need to be added to the build deps of glib2 so that macports can work out the architecture matching needed to prevent this.

I can't see any indication that any of the installed glib2 files link against dbus, so it doesn't need to be a library dependency for glib2.

K

(PS - or alternatively tests can be disabled by default, and dbus added to the test deps, if someone wants that instead for purity. Makes things more complicated somewhat, but also more precise and pure in arch management).



> On Apr 16, 2023, at 4:26 PM, Richard L. Hamilton <rlhamil at smart.net> wrote:
> 
>> 
>> Early MacBook Pro (13", mid 2010), High Sierra 10.13.6 (as far as it will 
>> go).
>> 
>> When doing my weekly port upgrade, it bombs out with:
>> 
>>    --->  Building glib2                                     
>>    Error: Failed to build glib2: command execution failed   
>>    Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_glib2/glib2/main.log for details.
>> 
>> I see a lot of warnings in main.log such as:
>> 
>>    :info:build ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
>> 
>> Is this some insidious attempt by Cupertino to force me to buy an M series?
> 
> Not insidious, Apple doesn't even know about it, and warnings are not errors (although they may be treated as errors if the creator of the build procedure - not necessarily the port maintainer - chooses to).
> 
> A library, almost certainly libdbus-1 (provided by the dbus port) does not support i386 (32-bit) but only x86_64 (64-bit). I verified that with
> 
> sh-3.2$ nm /opt/local/lib/libdbus-1.dylib|grep _dbus_message_set_path
> 000000000001483c T _dbus_message_set_path
> 
> (hex may vary, but " T " should be there indicating the symbol is a defined text (function name, usually)  symbol)
> 
> That may mean you tried to install glib2 with +universal but did not previously install dbus with +universal. Or something like that which has similar results.
> 
> Pretty sure that dbus CAN be installed universal, because I have it that way on my Snow Leopard VM. Apparently I gave up on installing ports with +universal as too much bother on Mojave even though it's the last OS that supports i386, and of course I don't have i386 or universal builds on later OSs that don't support that. (I don't have anything running High Sierra, so that's as close as I can get to your situation)
> 
> Building dbus +universal will likely require that every port it depends on (at least at runtime) is also built +universal, and it depends on quite a few ports. No guarantee that one of them won't be a show-stopper for some reason or other (although since I had it built on that Snow Leopard VM, it should likely be possible, if very slow).
> 
> You really have to look more closely at the log, look for the first line (other than the fetching of the downloads, which can fail on some locations before succeeding on one of them, i.e. http 404 errors don't count) that has the word "error" (case insensitive and followed by a colon to exclude mentions of error handing routines and limit it to error messages). And then look back a bit from there to see what failed.
> 
> In your case (with the "error:" in question and the prior reference to -ldbus-1 highlighted in red):
> 
> :info:build [827/1188] /usr/bin/clang  -o gio/tests/gdbus-serialization gio/tests/gdbus-serialization.p/gdbus-serialization.c.o gio/tests/gdbus-serialization.p/gdbus-tests.c.o -L/opt/local/lib -I/opt/local/include -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -Wl,-headerpad_max_install_names -lresolv -bind_at_load -arch i386 -pipe -Os -Wno-deprecated-declarations -arch i386 -Wl,-rpath, at loader_path/../../glib -Wl,-rpath, at loader_path/../../gmodule -Wl,-rpath, at loader_path/../../gobject -Wl,-rpath, at loader_path/.. -Wl,-rpath,/opt/local/lib glib/libglib-2.0.0.dylib gmodule/libgmodule-2.0.0.dylib gobject/libgobject-2.0.0.dylib gio/libgio-2.0.0.dylib -lintl -L/opt/local/lib -ldbus-1
> :info:build FAILED: gio/tests/gdbus-serialization 
> :info:build /usr/bin/clang  -o gio/tests/gdbus-serialization gio/tests/gdbus-serialization.p/gdbus-serialization.c.o gio/tests/gdbus-serialization.p/gdbus-tests.c.o -L/opt/local/lib -I/opt/local/include -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -Wl,-headerpad_max_install_names -lresolv -bind_at_load -arch i386 -pipe -Os -Wno-deprecated-declarations -arch i386 -Wl,-rpath, at loader_path/../../glib -Wl,-rpath, at loader_path/../../gmodule -Wl,-rpath, at loader_path/../../gobject -Wl,-rpath, at loader_path/.. -Wl,-rpath,/opt/local/lib glib/libglib-2.0.0.dylib gmodule/libgmodule-2.0.0.dylib gobject/libgobject-2.0.0.dylib gio/libgio-2.0.0.dylib -lintl -L/opt/local/lib -ldbus-1
> :info:build ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
> :info:build ld: warning: ignoring file /opt/local/lib/libdbus-1.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libdbus-1.dylib
> :info:build Undefined symbols for architecture i386:
> :info:build   "_dbus_error_free", referenced from:
> :info:build       _get_and_check_serialization in gdbus-serialization.c.o
> [many more undefined symbols omitted here]
> :info:build ld: symbol(s) not found for architecture i386
> :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
> :info:build [828/1188] /usr/bin/clang -Igio/tests/gdbus-server-auth.p -Igio/tests -I../glib-2.72.3-i386/gio/tests -I. -I../glib-2.72.3-i386 -Iglib -I../glib-2.72.3-i386/glib -Igmodule -I../glib-2.72.3-i386/gmodule -Igobject -I../glib-2.72.3-i386/gobject -Igio -I../glib-2.72.3-i386/gio -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include -fcolor-diagnostics -std=gnu99 -O2 -g -D_GNU_SOURCE -fno-strict-aliasing -DG_ENABLE_DEBUG -Wimplicit-fallthrough -Wunused -Wno-unused-parameter -Wno-pedantic -Wno-format-zero-length -Wno-variadic-macros -Werror=format=2 -Werror=init-self -Werror=missing-include-dirs -Werror=pointer-arith -Wstrict-prototypes -Wno-bad-function-cast -Wno-declaration-after-statement -Werror=implicit-function-declaration -Werror=missing-prototypes -pipe -Os -fstrict-aliasing -Wno-deprecated-declarations -arch i386 '-DG_LOG_DOMAIN="GLib-GIO"' '-DGLIB_MKENUMS="gobject/glib-mkenums"' '-DGLIB_COMPILE_SCHEMAS="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_glib2/glib2/work/build-i386/gio/glib-compile-schemas"' -UG_DISABLE_ASSERT -MD -MQ gio/tests/gdbus-server-auth.p/gdbus-server-auth.c.o -MF gio/tests/gdbus-server-auth.p/gdbus-server-auth.c.o.d -o gio/tests/gdbus-server-auth.p/gdbus-server-auth.c.o -c ../glib-2.72.3-i386/gio/tests/gdbus-server-auth.c
> :info:build ninja: build stopped: subcommand failed.
> :info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_glib2/glib2/work/build-i386" && /opt/local/bin/ninja -j2 --verbose -v 
> :info:build Exit code: 1
> :error:build Failed to build glib2: command execution failed
> :debug:build Error code: NONE
> :debug:build Backtrace: command execution failed
> :debug:build     while executing
> :debug:build "$procedure $targetname"
> :error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_glib2/glib2/main.log for details.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20230416/3801ec5e/attachment.htm>


More information about the macports-users mailing list