After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785053 - build: macOS common_ldflags are incorrect
build: macOS common_ldflags are incorrect
Status: RESOLVED OBSOLETE
Product: json-glib
Classification: Core
Component: general
git master
Other Mac OS
: Normal normal
: ---
Assigned To: json-glib-maint
json-glib-maint
Depends on:
Blocks:
 
 
Reported: 2017-07-18 09:36 UTC by Tom Schoonjans
Modified: 2017-09-05 10:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
macOS meson build patch (796 bytes, patch)
2017-07-18 09:37 UTC, Tom Schoonjans
none Details | Review
build: Update the macOS linker flags (871 bytes, patch)
2017-07-18 10:05 UTC, Emmanuele Bassi (:ebassi)
none Details | Review
build: Update the macOS linker flags (892 bytes, patch)
2017-07-18 10:05 UTC, Emmanuele Bassi (:ebassi)
none Details | Review

Description Tom Schoonjans 2017-07-18 09:36:09 UTC
Just as in https://github.com/anholt/libepoxy/pull/128, the common_ldflags are incorrect for macOS and lead to the build aborting.

Patch is attached.
Comment 1 Tom Schoonjans 2017-07-18 09:37:15 UTC
Created attachment 355809 [details] [review]
macOS meson build patch
Comment 2 Emmanuele Bassi (:ebassi) 2017-07-18 09:45:06 UTC
This problem has already been fixed in the unstable branch:

https://gitlab.gnome.org/GNOME/json-glib/commit/0c474b495a2c1b12a6b0c33d112f2b86460998fc

The fix will be available in the next release.
Comment 3 Tom Schoonjans 2017-07-18 09:47:23 UTC
Actually the problem is bigger than I originally thought:

in this case it is wrong to set the version numbers to 1 as the libtool version numbers are already at 200...
Comment 4 Tom Schoonjans 2017-07-18 09:48:22 UTC
For example when running corebird after rebuilding json-glib with meson:

dyld: Library not loaded: /usr/local/opt/json-glib/lib/libjson-glib-1.0.0.dylib
  Referenced from: /usr/local/bin/corebird
  Reason: Incompatible library version: corebird requires version 201.0.0 or later, but libjson-glib-1.0.0.dylib provides version 1.0.0
Abort trap: 6
Comment 5 Emmanuele Bassi (:ebassi) 2017-07-18 10:03:14 UTC
Oh, that's interesting.

I guess we can build that up from the interface and binary age, like we do for the soname.
Comment 6 Emmanuele Bassi (:ebassi) 2017-07-18 10:05:20 UTC
Created attachment 355813 [details] [review]
build: Update the macOS linker flags

Use the interface and binary ages to define the current version.
Comment 7 Emmanuele Bassi (:ebassi) 2017-07-18 10:05:56 UTC
Created attachment 355814 [details] [review]
build: Update the macOS linker flags

Use the interface and binary ages to define the current version.
Comment 8 Tom Schoonjans 2017-07-18 10:09:32 UTC
We had a discussion about this problem before when I brought this to your attention regarding version numbering on macOS for libepoxy, and you ended up opening an issue about this on the meson GitHub repository (https://github.com/mesonbuild/meson/issues/1451), but it seems like it hasn't been developed further there.

Thanks for your patch, but I think you will need to +1 those numbers to maintain compatibility with libtool conventions on macOS.
Comment 9 Emmanuele Bassi (:ebassi) 2017-09-05 10:44:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/json-glib/issues/22.