Merge lp:~pitti/notify-osd/link-gcc-4.5 into lp:notify-osd/lucid

Proposed by Martin Pitt
Status: Merged
Approved by: Mirco Müller
Approved revision: 428
Merged at revision: 428
Proposed branch: lp:~pitti/notify-osd/link-gcc-4.5
Merge into: lp:notify-osd/lucid
Diff against target: 79 lines (+18/-3)
2 files modified
configure.in (+9/-3)
tests/Makefile.am (+9/-0)
To merge this branch: bzr merge lp:~pitti/notify-osd/link-gcc-4.5
Reviewer Review Type Date Requested Status
Mirco Müller (community) Approve
Review via email: mp+45025@code.launchpad.net

Description of the change

When building current trunk on natty, I get a lot of errors like

  CCLD notify-osd
/usr/bin/ld.bfd.real: notify_osd-bubble.o: undefined reference to symbol 'XDeleteProperty'
/usr/bin/ld.bfd.real: note: 'XDeleteProperty' is defined in DSO /usr/lib64/libX11.so.6 so try adding it to the linker command line
/usr/lib64/libX11.so.6: could not read symbols: Invalid operation

/usr/bin/ld.bfd.real: notify_osd-gaussian-blur.o: undefined reference to symbol 'pixman_image_composite'
/usr/bin/ld.bfd.real: note: 'pixman_image_composite' is defined in DSO /usr/lib64/libpixman-1.so.0 so try adding it to the linker command line
/usr/lib64/libpixman-1.so.0: could not read symbols: Invalid operation

  CCLD test-modules
/usr/bin/ld.bfd.real: test_modules-bubble.o: undefined reference to symbol 'XDeleteProperty'
/usr/bin/ld.bfd.real: note: 'XDeleteProperty' is defined in DSO /usr/lib64/libX11.so.6 so try adding it to the linker command line

gcc 4.5 with --as-needed has a stricter linking behaviour which requires explicit linking with all necessary libraries. Some programs use direct libX11 or libpixman functions, and thus need to link to them explicitly.

To post a comment you must log in.
Revision history for this message
Mirco Müller (macslow) wrote :

Approved. Thakns for the fix pitti!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.in'
2--- configure.in 2010-10-05 17:54:42 +0000
3+++ configure.in 2011-01-03 12:14:54 +0000
4@@ -52,14 +52,20 @@
5 AC_SUBST(DBUS_GLIB_BIN)
6
7 #
8+# libX11
9+#
10+
11+#
12 # Gnome/GTK checks
13 #
14
15+PKG_CHECK_MODULES([X], [x11])
16+AC_SUBST(X_CFLAGS)
17+AC_SUBST(X_LIBS)
18+
19 AM_PATH_GTK_2_0
20
21-
22-PKG_CHECK_MODULES(notify_osd,
23- gtk+-2.0 >= 2.22)
24+PKG_CHECK_MODULES([NOTIFY_OSD], [pixman-1 gtk+-2.0 >= 2.22])
25 AC_SUBST(NOTIFY_OSD_CFLAGS)
26 AC_SUBST(NOTIFY_OSD_LIBS)
27
28
29=== modified file 'tests/Makefile.am'
30--- tests/Makefile.am 2009-10-19 17:59:53 +0000
31+++ tests/Makefile.am 2011-01-03 12:14:54 +0000
32@@ -66,10 +66,12 @@
33 -I$(top_srcdir)/
34
35 test_modules_LDADD = \
36+ $(X_LIBS) \
37 $(GLIB_LIBS) \
38 $(WNCK_LIBS) \
39 $(DBUS_LIBS) \
40 $(LIBNOTIFY_LIBS) \
41+ $(NOTIFY_OSD_LIBS) \
42 $(GTK_LIBS) \
43 -lnotify
44
45@@ -126,6 +128,7 @@
46 -I$(top_srcdir)/
47
48 test_raico_LDADD = \
49+ $(NOTIFY_OSD_LIBS) \
50 $(GTK_LIBS)
51
52 TILE_MODULES = \
53@@ -144,6 +147,8 @@
54 -I$(top_srcdir)
55
56 test_tile_LDADD = \
57+ $(X_LIBS) \
58+ $(NOTIFY_OSD_LIBS) \
59 $(GTK_LIBS)
60
61 GROW_BUBBLE_MODULES = \
62@@ -161,6 +166,8 @@
63 -I$(top_srcdir)
64
65 test_grow_bubble_LDADD = \
66+ $(X_LIBS) \
67+ $(NOTIFY_OSD_LIBS) \
68 $(GTK_LIBS)
69
70 SCROLL_TEXT_MODULES = \
71@@ -178,6 +185,8 @@
72 -I$(top_srcdir)/
73
74 test_scroll_text_LDADD = \
75+ $(X_LIBS) \
76+ $(NOTIFY_OSD_LIBS) \
77 $(GTK_LIBS)
78
79 check-valgrind:

Subscribers

People subscribed via source and target branches

to all changes: