GNOME Bugzilla – Bug 775597
Add -L flags set in LDFLAGS to g-ir-scanner command line
Last modified: 2016-12-06 11:14:45 UTC
Unlike glibc used in most GNU/Linux distributions, FreeBSD libc doesn't have gettext functions. Libraries that need gettext functions, such as GLib, have to explicitly links with -L/usr/local/lib -lintl. -L/usr/local/lib is usually set in LDFLAGS, and -lintl is provided by pkg-config. However, we unset LDFLAGS when running g-ir-scanner to avoid -L ordering problems, so we have to manually add these flags to g-ir-scanner command line. [ 33%] Generating Camel-1.2.gir (several python exceptions ...) /usr/bin/ld: cannot find -lintl clang: error: linker command failed with exit code 1 (use -v to see invocation) I reported and fixed the same problem for WebKit two years ago, but I forgot to do this for evolution-data-server because JHBuild installed an extra copy of gettext in my prefix. I think it is likely for JHBuild to stop building its own copy of gettext after Ubuntu 16.04 becomes too old to be used for GNOME development, so this problem still has to be fixed. I will attach a patch here. It is based on code written for WebKit. https://bugs.webkit.org/show_bug.cgi?id=138832
Created attachment 341347 [details] [review] Bug 775597 - Add -L flags set in LDFLAGS to g-ir-scanner command line
Thanks for a bug report and patch. It looks fine, thus: Created commit 6c50dbc in eds master (3.23.3+)