! 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 !
Fails to build with --as-needed
Status:
RESOLVED: FIXED
Product:
Xfce4-panel
Component:
Window Buttons

Comments

Description Lionel Le Folgoc 2010-05-23 16:40:48 CEST
Hi,

With LDFLAGS+=-Wl,-z,defs -Wl,--as-needed, tasklist fails to build with the following error:
  CCLD   libtasklist.la
.libs/libtasklist_la-tasklist-widget.o: In function `xfce_tasklist_wireframe_update':
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.1/plugins/tasklist/tasklist-widget.c:1858: undefined reference to `XCreateWindow'
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.1/plugins/tasklist/tasklist-widget.c:1873: undefined reference to `XShapeCombineRectangles'
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.1/plugins/tasklist/tasklist-widget.c:1877: undefined reference to `XMapWindow'
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.1/plugins/tasklist/tasklist-widget.c:1880: undefined reference to `XCreateGC'
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.1/plugins/tasklist/tasklist-widget.c:1881: undefined reference to `XSetForeground'
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.1/plugins/tasklist/tasklist-widget.c:1884: undefined reference to `XDrawRectangle'
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.1/plugins/tasklist/tasklist-widget.c:1888: undefined reference to `XDrawRectangle'
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.1/plugins/tasklist/tasklist-widget.c:1893: undefined reference to `XFreeGC'
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.1/plugins/tasklist/tasklist-widget.c:1839: undefined reference to `XMoveResizeWindow'
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.1/plugins/tasklist/tasklist-widget.c:1848: undefined reference to `XShapeCombineRectangles'
.libs/libtasklist_la-tasklist-widget.o: In function `xfce_tasklist_wireframe_destroy':
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.1/plugins/tasklist/tasklist-widget.c:1806: undefined reference to `XUnmapWindow'
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.1/plugins/tasklist/tasklist-widget.c:1807: undefined reference to `XDestroyWindow'
.libs/libtasklist_la-tasklist-widget.o: In function `xfce_tasklist_wireframe_hide':
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.1/plugins/tasklist/tasklist-widget.c:1789: undefined reference to `XUnmapWindow'
collect2: ld returned 1 exit status
make[5]: *** [libtasklist.la] Error 1

I think it lacks the x11 lib in libtasklist_la_LIBADD?

Thanks.
Comment 1 Nick Schermer editbugs 2010-05-24 10:07:30 CEST
Indeed, fixed in 1d95e87.
Comment 2 Lionel Le Folgoc 2010-07-18 10:59:32 CEST
Hi,

I just retried with the new 4.7.2 (sorry, I didn't have time to test the git version earlier), and the issue is only partly fixed; it still fails to link with --as-needed:

  CCLD   libtasklist.la
.libs/libtasklist_la-tasklist-widget.o: In function `xfce_tasklist_wireframe_update':
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.2/plugins/tasklist/tasklist-widget.c:1873: undefined reference to `XShapeCombineRectangles'
/home/mrpouit/Packaging/packages/pkg-xfce/desktop/branches/experimental/build-area/xfce4-panel-4.7.2/plugins/tasklist/tasklist-widget.c:1848: undefined reference to `XShapeCombineRectangles'

Not sure why, maybe "XShapeCombineRectangles" is in a different lib?

Thanks.
Comment 3 Nick Schermer editbugs 2010-07-18 11:24:47 CEST
In that case f92ba56 should fix it.

Bug #6471

Reported by:
Lionel Le Folgoc
Reported on: 2010-05-23
Last modified on: 2010-07-18

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Version:
4.7 (master)

Attachments

Additional information