Opened 3 years ago

Closed 3 years ago

Last modified 15 months ago

#63363 closed defect (fixed)

glib2 @2.62.5_0, glib2-devel @2.62.5_0: uses dbus but does not declare a dependency on it

Reported by: TallTed (Ted Thibodeau Jr) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: glib2, glib2-devel

Description

--->  Configuring glib2
Warning: Configuration logfiles contain indications of -Wimplicit-function-declaration; check that features were not accidentally disabled:
  strcmp: found in build-i386/meson-logs/meson-log.txt, build-x86_64/meson-logs/meson-log.txt
  exit: found in build-i386/meson-logs/meson-log.txt, build-x86_64/meson-logs/meson-log.txt
--->  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_release_tarballs_ports_devel_glib2/glib2/main.log for details.

...

:info:build   "_dbus_message_set_serial", referenced from:
:info:build       _test_message_serialize_invalid in gdbus-serialization.c.o
:info:build       _get_and_check_serialization in gdbus-serialization.c.o
:info:build   "_dbus_message_unref", referenced from:
:info:build       _test_message_serialize_invalid in gdbus-serialization.c.o
:info:build       _get_and_check_serialization in gdbus-serialization.c.o
: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 [1057/1122] /usr/bin/clang -Igio/tests/resources.p -Igio/tests -I../glib-2.62.5-i386/gio/tests -I. -I../glib-2.62.5-i386 -Iglib -I../glib-2.62.5-i386/glib -Igmodule -I../glib-2.62.5-i386/gmodule -Igobject -I../glib-2.62.5-i386/gobject -Igio -I../glib-2.62.5-i386/gio -I/opt/local/include -fcolor-diagnostics -std=gnu89 -O2 -g -D_GNU_SOURCE -fno-strict-aliasing -DG_ENABLE_DEBUG -Wall -Wimplicit-fallthrough -Wstrict-prototypes -Wunused -Wno-unused-parameter -Wno-bad-function-cast -Wno-pedantic -Werror=declaration-after-statement -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -pipe -Os -fstrict-aliasing -Wno-deprecated-declarations -arch i386 '-DG_LOG_DOMAIN="GLib-GIO"' '-DTEST_SERVICES="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_glib2/glib2/work/build-i386/gio/tests/services"' '-DGLIB_MKENUMS="gobject/glib-mkenums"' '-DGLIB_COMPILE_SCHEMAS="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_glib2/glib2/work/build-i386/gio/glib-compile-schemas"' -UG_DISABLE_ASSERT -MD -MQ gio/tests/resources.p/resources.c.o -MF gio/tests/resources.p/resources.c.o.d -o gio/tests/resources.p/resources.c.o -c ../glib-2.62.5-i386/gio/tests/resources.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_release_tarballs_ports_devel_glib2/glib2/work/build-i386" && /opt/local/bin/ninja -j8 --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_release_tarballs_ports_devel_glib2/glib2/main.log for details.

Change History (12)

comment:1 Changed 3 years ago by kencu (Ken)

let me see if I can reproduce this on my 10.11 system.

comment:2 Changed 3 years ago by kencu (Ken)

do you have dbus installed as +universal?

comment:3 Changed 3 years ago by TallTed (Ted Thibodeau Jr)

I'm not a macports wizard. What command will tell me that? I found this --

$ sudo port installed | grep dbus
  dbus @1.12.20_0 (active)

I do not believe I manually installed dbus; it probably came to me as a dependency for some other port.

comment:4 Changed 3 years ago by kencu (Ken)

sure, sorry.

Please do this:

sudo port -f uninstall dbus
sudo port -v install dbus +universal

and then please try building glib2 again like this:

sudo port clean glib2
sudo port -f uninstall glib2
sudo port -v install glib2 +universal

no other package managers for Mac support universal building. MacPorts always has, and does. But it adds a bit of complexity, which no doubt is why other package managers don't bother to try to support it.

comment:5 Changed 3 years ago by TallTed (Ted Thibodeau Jr)

That resolved the dbus issue, thanks. Apparently not a defect, but a PEBKAC! (Unless there's a way to make the build script check dependencies for universality, and rebuild them as necessary?) :-)

(I'd close, but I don't see a way to do so.)

comment:6 Changed 3 years ago by kencu (Ken)

I think we need to add dbus as a direct dependency for glib2, and then MacPorts mechanisms for checking universal etc will work properly.

comment:7 Changed 3 years ago by kencu (Ken)

Owner: set to ryandesign
Port: glib2 dbus added
Status: newassigned
Summary: glib2-2.62.5_0+universal+x11.darwin_15.i386-x86_64.tbz2: i386 fat binary does not build on 10.11 El Capitan x86_64glib2-2.62.5_0 uses dbus but does not declare a dependency on it

comment:8 in reply to:  6 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Port: glib2-devel added; dbus removed
Status: assignedaccepted
Summary: glib2-2.62.5_0 uses dbus but does not declare a dependency on itglib2 @2.62.5_0, glib2-devel @2.62.5_0: uses dbus but does not declare a dependency on it

comment:9 Changed 3 years ago by kencu (Ken)

Is dbus only used for building some of the tests on glib2? I think it might be, and if so, we could consider turning the tests off by default:

<https://github.com/GNOME/glib/blob/d6a0e706f0dbf8338094c98f51e75556c78d6fbd/meson_options.txt#L82>

comment:10 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Nothing seems to end up linked to dbus, so yes, that may be the answer.

I'm combining the fix for this issue with a couple other fixups which will take a little more time to finish.

comment:11 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In 72961c7bf8abdbf89fe0e38dc2e4753931c7dc67/macports-ports (master):

glib2, glib2-devel: Update to 2.62.6

Add a patch to disable the optional dbus-based tests.

Closes: #63363

Fix implicit declaration of functions in meson feature tests.

Reduce differences between glib2 and glib2-devel.

comment:12 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

I reported the bug to the developers of glib:

https://gitlab.gnome.org/GNOME/glib/-/issues/2462

Note: See TracTickets for help on using tickets.