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 775597 - Add -L flags set in LDFLAGS to g-ir-scanner command line
Add -L flags set in LDFLAGS to g-ir-scanner command line
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
3.23.x (obsolete)
Other FreeBSD
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2016-12-04 12:49 UTC by Ting-Wei Lan
Modified: 2016-12-06 11:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bug 775597 - Add -L flags set in LDFLAGS to g-ir-scanner command line (1.32 KB, patch)
2016-12-04 12:51 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2016-12-04 12:49:42 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
Comment 1 Ting-Wei Lan 2016-12-04 12:51:26 UTC
Created attachment 341347 [details] [review]
Bug 775597 - Add -L flags set in LDFLAGS to g-ir-scanner command line
Comment 2 Milan Crha 2016-12-06 11:14:30 UTC
Thanks for a bug report and patch. It looks fine, thus:

Created commit 6c50dbc in eds master (3.23.3+)