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
=== modified file 'configure.in'
--- configure.in 2010-10-05 17:54:42 +0000
+++ configure.in 2011-01-03 12:14:54 +0000
@@ -52,14 +52,20 @@
52AC_SUBST(DBUS_GLIB_BIN)52AC_SUBST(DBUS_GLIB_BIN)
5353
54#54#
55# libX11
56#
57
58#
55# Gnome/GTK checks59# Gnome/GTK checks
56#60#
5761
62PKG_CHECK_MODULES([X], [x11])
63AC_SUBST(X_CFLAGS)
64AC_SUBST(X_LIBS)
65
58AM_PATH_GTK_2_066AM_PATH_GTK_2_0
5967
6068PKG_CHECK_MODULES([NOTIFY_OSD], [pixman-1 gtk+-2.0 >= 2.22])
61PKG_CHECK_MODULES(notify_osd,
62 gtk+-2.0 >= 2.22)
63AC_SUBST(NOTIFY_OSD_CFLAGS)69AC_SUBST(NOTIFY_OSD_CFLAGS)
64AC_SUBST(NOTIFY_OSD_LIBS)70AC_SUBST(NOTIFY_OSD_LIBS)
6571
6672
=== modified file 'tests/Makefile.am'
--- tests/Makefile.am 2009-10-19 17:59:53 +0000
+++ tests/Makefile.am 2011-01-03 12:14:54 +0000
@@ -66,10 +66,12 @@
66 -I$(top_srcdir)/66 -I$(top_srcdir)/
6767
68test_modules_LDADD = \68test_modules_LDADD = \
69 $(X_LIBS) \
69 $(GLIB_LIBS) \70 $(GLIB_LIBS) \
70 $(WNCK_LIBS) \71 $(WNCK_LIBS) \
71 $(DBUS_LIBS) \72 $(DBUS_LIBS) \
72 $(LIBNOTIFY_LIBS) \73 $(LIBNOTIFY_LIBS) \
74 $(NOTIFY_OSD_LIBS) \
73 $(GTK_LIBS) \75 $(GTK_LIBS) \
74 -lnotify76 -lnotify
7577
@@ -126,6 +128,7 @@
126 -I$(top_srcdir)/128 -I$(top_srcdir)/
127129
128test_raico_LDADD = \130test_raico_LDADD = \
131 $(NOTIFY_OSD_LIBS) \
129 $(GTK_LIBS)132 $(GTK_LIBS)
130133
131TILE_MODULES = \134TILE_MODULES = \
@@ -144,6 +147,8 @@
144 -I$(top_srcdir)147 -I$(top_srcdir)
145148
146test_tile_LDADD = \149test_tile_LDADD = \
150 $(X_LIBS) \
151 $(NOTIFY_OSD_LIBS) \
147 $(GTK_LIBS)152 $(GTK_LIBS)
148153
149GROW_BUBBLE_MODULES = \154GROW_BUBBLE_MODULES = \
@@ -161,6 +166,8 @@
161 -I$(top_srcdir)166 -I$(top_srcdir)
162167
163test_grow_bubble_LDADD = \168test_grow_bubble_LDADD = \
169 $(X_LIBS) \
170 $(NOTIFY_OSD_LIBS) \
164 $(GTK_LIBS)171 $(GTK_LIBS)
165172
166SCROLL_TEXT_MODULES = \173SCROLL_TEXT_MODULES = \
@@ -178,6 +185,8 @@
178 -I$(top_srcdir)/185 -I$(top_srcdir)/
179186
180test_scroll_text_LDADD = \187test_scroll_text_LDADD = \
188 $(X_LIBS) \
189 $(NOTIFY_OSD_LIBS) \
181 $(GTK_LIBS)190 $(GTK_LIBS)
182191
183check-valgrind:192check-valgrind:

Subscribers

People subscribed via source and target branches

to all changes: