! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Missing library path for X libraries
Status:
CLOSED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Enrico Tröger editbugs 2006-07-04 14:23:46 CEST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4

When compiling xfdesktop as usual, since the last two SVN commits I get the following error:

make[2]: Entering directory `/misc/down/xfce4-goodies/xfce/xfdesktop/panel-plugin'
/bin/sh ../libtool --tag=CC --mode=link gcc  -Wall -O2 -pipe -march=athlon-xp   -o xfce4-popup-menu  xfce4_popup_menu-xfce4-popup-menu.o -lSM -lICE -lX11 -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
gcc -Wall -O2 -pipe -march=athlon-xp -o xfce4-popup-menu xfce4_popup_menu-xfce4-popup-menu.o -Wl,--export-dynamic  -lSM -lICE -lX11 /usr/lib/libgtk-x11-2.0.so /usr/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so /usr/lib/libgdk_pixbuf-2.0.so -lm /usr/lib/libpangoxft-1.0.so /usr/lib/libpangox-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so -ldl /usr/lib/libglib-2.0.so
/usr/bin/ld: cannot find -lSM
collect2: ld returned 1 exit status
make[2]: *** [xfce4-popup-menu] Fehler 1
make[2]: Leaving directory `/misc/down/xfce4-goodies/xfce/xfdesktop/panel-plugin'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/misc/down/xfce4-goodies/xfce/xfdesktop'
make: *** [all] Fehler 2

If I replace -lSM by /usr/X11R6/lib/libSM.so and so on, then it works.
This happens on Debian Sarge.

I guess, there is something is configure.ac missing, so that the linker search also in /usr/X11R6/lib for the libraries.

Reproducible: Always

Steps to Reproduce:
Comment 1 Enrico Tröger editbugs 2006-07-04 14:30:16 CEST
(added Olivier to CC, since it was his commit)
Comment 2 Brian J. Tarricone (not reading bugmail) 2006-07-05 03:57:57 CEST
Benny's our autotools expert...
Comment 3 Olivier Fourdan editbugs 2006-07-05 18:44:41 CEST
Can you try with revision 22272?
Comment 4 Enrico Tröger editbugs 2006-07-05 19:14:39 CEST
No change. The X11 includes are correct, but the -L/usr/X11R6/lib entry is missing in LIBADD.

By the way, in the corresponding commit you modified modules/menu/Makefile.am, but the error I described above is in panel-plugin/Makefile.am. Or am I wrong?
Comment 5 Olivier Fourdan editbugs 2006-07-05 19:20:09 CEST
heh! yes; indeed. My bad.
Comment 6 Olivier Fourdan editbugs 2006-07-05 19:22:43 CEST
Things is... that everything looks fine in panel-plugin
Comment 7 Benedikt Meurer editbugs 2006-07-05 19:23:01 CEST
Created attachment 646 
Suggested fix

This should do the trick.
Comment 8 Olivier Fourdan editbugs 2006-07-05 19:24:41 CEST
Benny, can you elaborate on why that could fix it? I noticed that some modules use that syntax and others dont. Should we move all modules to that syntax?
Comment 9 Benedikt Meurer editbugs 2006-07-05 19:26:12 CEST
The syntax doesn't fix this bug, but the missing $(LIBX11_LDFLAGS).

The $(...) should be preferred over @...@, as $(...) is handled by make, while @...@ is blindly substituted by sed.
Comment 10 Enrico Tröger editbugs 2006-07-05 19:31:33 CEST
Benny's fix solves it. Thanks.
Comment 11 Enrico Tröger editbugs 2006-07-05 19:38:45 CEST
I was too fast.
Benny's fix solves it, but the commit in r22274, hasn't the decisive line.
	$(LIBX11_LDFLAGS) \
in
 xfce4_popup_menu_LDADD
is missing.
Comment 12 Enrico Tröger editbugs 2006-07-05 20:19:15 CEST
Now it is fixed and xfdesktop compiles fine on my system.
Comment 13 Olivier Fourdan editbugs 2006-07-05 20:26:36 CEST
Pfewww... ;)

Bug #1984

Reported by:
Enrico Tröger
Reported on: 2006-07-04
Last modified on: 2009-07-14

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
2 users

Version

Attachments

Suggested fix (1.07 KB, patch)
2006-07-05 19:23 CEST , Benedikt Meurer
no flags

Additional information