Merge lp:~lool/timezonemap/link-with-libm into lp:timezonemap

Proposed by Loïc Minier
Status: Merged
Merged at revision: 18
Proposed branch: lp:~lool/timezonemap/link-with-libm
Merge into: lp:timezonemap
Diff against target: 14 lines (+3/-0)
1 file modified
configure.ac (+3/-0)
To merge this branch: bzr merge lp:~lool/timezonemap/link-with-libm
Reviewer Review Type Date Requested Status
Timezone Map Team Pending
Review via email: mp+84124@code.launchpad.net

Description of the change

Hi,

This fixes a FTBFS seen on armhf https://launchpadlibrarian.net/86196928/buildlog_ubuntu-precise-armhf.libtimezonemap_0.2_FAILEDTOBUILD.txt.gzbut present on all arches:
libtool: link: gcc -shared -fPIC -DPIC .libs/cc-timezone-map.o .libs/tz.o -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 /usr/lib/arm-linux-gnueabihf/libcairo-gobject.so /usr/lib/arm-linux-gnueabihf/libcairo.so -lpango-1.0 /usr/lib/arm-linux-gnueabihf/libfreetype.so -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -O2 -O2 -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,--as-needed -pthread -pthread -Wl,-soname -Wl,libtimezonemap.so.1 -Wl,-version-script -Wl,.libs/libtimezonemap.ver -o .libs/libtimezonemap.so.1.0.0
.libs/cc-timezone-map.o: In function `convert_latitude_to_y':
/build/buildd/libtimezonemap-0.2/./src/cc-timezone-map.c:724: undefined reference to `tan'
/build/buildd/libtimezonemap-0.2/./src/cc-timezone-map.c:724: undefined reference to `log'
.libs/tz.o: In function `convert_pos':
/build/buildd/libtimezonemap-0.2/./src/tz.c:519: undefined reference to `pow'
/build/buildd/libtimezonemap-0.2/./src/tz.c:518: undefined reference to `pow'
collect2: ld returned 1 exit status

this is due to recent changes in gtk+ which stopped pulling -lm via pkg-config.

Cheers,

To post a comment you must log in.
Revision history for this message
Loïc Minier (lool) wrote :

I see -lm was added in src/Makefile.am in r16:
http://bazaar.launchpad.net/~timezonemap-team/timezonemap/trunk/revision/16

using AC_CHECK_LIBM seems a bit nicer though; you could use $LIBM in src/Makefile.am instead of -lm

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2011-07-29 08:36:49 +0000
3+++ configure.ac 2011-12-01 16:06:35 +0000
4@@ -51,8 +51,11 @@
5 GTK3_REQUIRED_VERSION=3.1.4
6 GIO_REQUIRED_VERSION=2.5.11
7
8+AC_CHECK_LIBM
9+
10 PKG_CHECK_MODULES(LIBTIMEZONEMAP, gio-2.0 >= $GIO_REQUIRED_VERSION
11 gtk+-3.0 >= $GTK3_REQUIRED_VERSION)
12+LIBTIMEZONEMAP_LIBS="$LIBTIMEZONEMAP_LIBS $LIBM"
13
14 GOBJECT_INTROSPECTION_CHECK([0.6.7])
15

Subscribers

People subscribed via source and target branches