Created attachment 199689 [details] patch Building with GCC7 (which is necessary on GCC platforms) currently fails with: g++7 -o gexiv2/libgexiv2.so.2.0.0 'gexiv2/gexiv2@@gexiv2@sha/meson-generated_.._gexiv2-enums.cpp.o' 'gexiv2/gexiv2@@gexiv2@sha/gexiv2-metadata.cpp.o ' 'gexiv2/gexiv2@@gexiv2@sha/gexiv2-metadata-exif.cpp.o' 'gexiv2/gexiv2@@gexiv2@sha/gexiv2-metadata-gps.cpp.o' 'gexiv2/gexiv2@@gexiv2@sha/gexiv2-metadata-iptc.cpp.o' 'gexiv2/gexiv2@@gexiv2@sha/gexiv2-metadata-xmp.cpp.o' 'gexiv2/gexiv2@@gexiv2@sha/gexiv2-stream-io.cpp.o' 'gexiv2/gexiv2@@gexiv2@sha/gexiv2-preview-properties.cpp.o' 'gexiv2/gexiv2@@gexiv2@sha/gexiv2-preview-image.cpp.o' 'gexiv2/gexiv2@@gexiv2@sha/gexiv2-log.cpp.o' 'gexiv2/gexiv2@@gexiv2@sha/gexiv2-startup.cpp.o' -L/usr/local/lib/gcc7 -Wl,--no-undefined -Wl,--as-needed -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,libgexiv2.so.2 -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc7 -Wl,-rpath=/usr/local/lib/gcc7 -Wl,-rpath=/usr/local/lib/gcc7 '' /usr/local/lib/libgobject-2.0.so /usr/local/lib/libglib-2.0.so /usr/local/lib/libintl.so /usr/local/lib/libexiv2.so -Wl,--end-group g++7: error: : No such file or directory Our local patch, introduced in the last update, causes this issue. I attach the patch to apply our local patch conditionally only when using Clang. Tested on powerpc64 and amd64. Hardware sponsored by IntegriCloud.
That patch is there because without it some consumers - I use gnome-photos as the reference - crash. See bug #230505 . In fact, the patch in question here is the patch from over there adapted for meson. - Was gexiv2 already broken before the update? - Does gnome-photos work when building gexiv2 with gcc and without the patch? (if it doesn't work, it crashes on startup - no need to import photos) If yes, I'd rather not do conditional patching, but use meson's capabilities to pick the right options based on the compiler (we can query the compiler like this: https://mesonbuild.com/Reference-tables.html#compiler-ids ) and submit that upstream.
The problem with the patch from the other bug is that it adds an empty argument, which gcc balks at, for obvious reasons. Maybe LLVM can handle an empty argument, but most utilities treat an empty argument just like any other argument. What's needed, to satisfy all FreeBSD targets, is to prune the empty argument. I don't know how to do that in meson, maybe someone else does.
(In reply to Justin Hibbits from comment #2) Oh, empty argument, I see. Let me check how to fix that. And again: does anybody know if the gcc-compiled gexiv2 _with_ the version script (that is, with the patch from above) is actually useful? Or did that fix the build by breaking the lib?
Created attachment 199718 [details] fix empty argument when linking Just RTFM :) The meson manual has the answer: https://mesonbuild.com/howtox.html#use-an-argument-only-with-a-specific-compiler Can you re-check with the attached patch? In my test build, the extranous argument '' is now gone.
(In reply to Christoph Moench-Tegeder from comment #4) Yes, this patch is ok.
A commit references this bug: Author: cmt Date: Thu Dec 6 14:52:16 UTC 2018 New revision: 486763 URL: https://svnweb.freebsd.org/changeset/ports/486763 Log: gexiv2: fix build with non-clang compilers clang silently ignores empty arguments, others do complain. Set up conditional arguments like the meson documentation recommends. PR: 233668 Reported by: Piotr Kubaj, jhibbits@ Changes: head/graphics/gexiv2/files/patch-gexiv2_meson.build
committed as ports r486763 - thanks for reporting and testing.