GNOME Bugzilla – Bug 785053
build: macOS common_ldflags are incorrect
Last modified: 2017-09-05 10:44:11 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.
Created attachment 355809 [details] [review] macOS meson build patch
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.
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...
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
Oh, that's interesting. I guess we can build that up from the interface and binary age, like we do for the soname.
Created attachment 355813 [details] [review] build: Update the macOS linker flags Use the interface and binary ages to define the current version.
Created attachment 355814 [details] [review] build: Update the macOS linker flags Use the interface and binary ages to define the current version.
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.
-- 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.