! 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 !
orage-4.3.90.2 losts -lpthread when linking with -Wl,--as-needed [PATCH]
Status:
CLOSED: WORKSFORME

Comments

Description Samuli Suominen 2006-07-12 20:58:51 CEST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060709 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060709 Firefox/1.5.0.4

Orage fails with bunch of "undefined reference to 'pthread_*' because it losts -lpthread while linking with -Wl,--as-needed. This patch adds it and allows building.

Reproducible: Always
Comment 1 Samuli Suominen 2006-07-12 20:59:40 CEST
Created attachment 664 
orage-4.3.90.2-asneeded.patch

Here you go. :)
Comment 2 juha editbugs 2006-07-12 21:47:31 CEST
Hi Samuli,
Where di you get the source?
From svn or by downloading the release?

And where do you see this error? Please, paste a few lines including the "undef ref" error.

I can not reproduce this and Makefile.in is actually generated file, so I can
not fix it there.
Comment 3 Samuli Suominen 2006-07-13 12:00:18 CEST
Reproduce: 

1) Set your LDFLAGS to -Wl,--as-needed
2) Download Orage 4.3.90.1 or 4.3.90.2 tarball.
3) Try to build it.

i686-pc-linux-gnu-gcc -O2 -march=athlon-xp -pipe -g -Wl,-O1 -Wl,--as-needed -o orage orage-about-xfcalendar.o orage-appointment.o orage-event-list.o orage-functions.o orage-ical-code.o orage-main.o orage-mainbox.o orage-reminder.o orage-tray_icon.o orage-xfce_trayicon.o  /usr/lib/libxfcegui4.so /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 /usr/lib/libpangocairo-1.0.so /usr/lib/libpangoft2-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libcairo.so /usr/lib/libXrender.so /usr/lib/libpng12.so /usr/lib/libglitz.so /usr/lib/libfontconfig.so /usr/lib/libfreetype.so -lz /usr/lib/libexpat.so -lm /usr/lib/libgmodule-2.0.so /usr/lib/libxfce4mcs-client.so /usr/lib/libstartup-notification-1.so /usr/lib/libSM.so /usr/lib/libICE.so /usr/lib/libX11.so /usr/lib/libXau.so /usr/lib/libXdmcp.so -ldl /usr/lib/libxfce4util.so /usr/lib/libgobject-2.0.so /usr/lib/libglib-2.0.so -lpthread ../libical/src/libical/.libs/libical.a ../libical/src/libicalss/.libs/libicalss.a
../libical/src/libical/.libs/libical.a(icalerror.o): In function `icalerrno_return':
/var/tmp/portage/orage-4.3.90.2/work/orage-4.3.90.2/libical/src/libical/icalerror.c:54: undefined reference to `pthread_once'
/var/tmp/portage/orage-4.3.90.2/work/orage-4.3.90.2/libical/src/libical/icalerror.c:56: undefined reference to `pthread_getspecific'
/var/tmp/portage/orage-4.3.90.2/work/orage-4.3.90.2/libical/src/libical/icalerror.c:61: undefined reference to `pthread_setspecific'
../libical/src/libical/.libs/libical.a(icalerror.o): In function `icalerrno_key_alloc':
/var/tmp/portage/orage-4.3.90.2/work/orage-4.3.90.2/libical/src/libical/icalerror.c:48: undefined reference to `pthread_key_create'
../libical/src/libical/.libs/libical.a(icalerror.o): In function `icalerrno_destroy':
/var/tmp/portage/orage-4.3.90.2/work/orage-4.3.90.2/libical/src/libical/icalerror.c:44: undefined reference to `pthread_setspecific'
../libical/src/libical/.libs/libical.a(icalmemory.o): In function `get_buffer_ring_pthread':
/var/tmp/portage/orage-4.3.90.2/work/orage-4.3.90.2/libical/src/libical/icalmemory.c:125: undefined reference to `pthread_once'
/var/tmp/portage/orage-4.3.90.2/work/orage-4.3.90.2/libical/src/libical/icalmemory.c:127: undefined reference to `pthread_getspecific'
/var/tmp/portage/orage-4.3.90.2/work/orage-4.3.90.2/libical/src/libical/icalmemory.c:131: undefined reference to `pthread_setspecific'
../libical/src/libical/.libs/libical.a(icalmemory.o): In function `ring_destroy':
/var/tmp/portage/orage-4.3.90.2/work/orage-4.3.90.2/libical/src/libical/icalmemory.c:98: undefined reference to `pthread_setspecific'
../libical/src/libical/.libs/libical.a(icalmemory.o): In function `ring_key_alloc':
/var/tmp/portage/orage-4.3.90.2/work/orage-4.3.90.2/libical/src/libical/icalmemory.c:102: undefined reference to `pthread_key_create'
collect2: ld returned 1 exit status
make[2]: *** [orage] Error 1
Comment 4 Samuli Suominen 2006-07-13 12:00:56 CEST
> From svn or by downloading the release?

Release.
Comment 5 Samuli Suominen 2006-07-13 12:03:33 CEST
You might find this page intresting, http://www.gentoo.org/proj/en/qa/asneeded.xml
Comment 6 juha editbugs 2006-07-13 13:59:58 CEST
ok. interesting. I will do some testing.
Comment 7 Jasper Huijsmans editbugs 2006-07-14 07:44:59 CEST
IMO the patch is not the correct fix. I don't think it is right to explicitly add the missing library. We are not using autoconf magic for nothing. 

Ideally the fix can be made somewhere in configure.ac, but I don't know what the exact cause is for these problems. Maybe Benedikt can help, he usually has the best knowledge of the autostuff.
Comment 8 Samuli Suominen 2006-07-14 20:13:05 CEST
(In reply to comment #7)
> IMO the patch is not the correct fix. I don't think it is right to explicitly
> add the missing library. We are not using autoconf magic for nothing. 
> 

I agree. It's only a demonstration, a temporary solution for release package at the most. Apparently you got it right with xfce4-panel, as it now works in svn.

Did also some testing, build libical-0.24 and 0.26 from upstrema package and they worked fine. I will have a closer look at this asap
Comment 9 juha editbugs 2006-07-14 21:12:24 CEST
Where did you find libical-0.26?
Comment 10 Samuli Suominen 2006-07-14 22:04:22 CEST
(In reply to comment #9)
> Where did you find libical-0.26?
> 

From libical homepage, http://www.aurore.net/projects/libical/
Comment 11 juha editbugs 2006-07-29 08:19:42 CEST
I can't reproduce this. I tried several ways, but it always builds without problems.

gcc -g -O2 -Wl,--as-needed -o orage orage-about-xfcalendar.o orage-appointment.o orage-event-list.o orage-functions.o orage-ical-code.o orage-main.o orage-mainbox.o orage-reminder.o orage-tray_icon.o orage-xfce_trayicon.o  -L/usr/X11R6/lib -L/usr/local/xfce/lib /usr/local/xfce/lib/libxfcegui4.so /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 /usr/lib/libpangocairo-1.0.so /usr/lib/libpangoft2-1.0.so -lXinerama -lXi -lXrandr -lXext -lXcursor -lXfixes /usr/lib/libpango-1.0.so /usr/lib/libcairo.so -lpng12 -lfontconfig /usr/lib/libfreetype.so -lz -lm -lXrender /usr/lib/libgmodule-2.0.so -ldl /usr/local/xfce/lib/libxfce4mcs-client.so -lSM -lICE -lX11 /usr/local/xfce/lib/libxfce4util.so /usr/lib/libgobject-2.0.so /usr/lib/libglib-2.0.so -lpthread ../libical/src/libical/.libs/libical.a ../libical/src/libicalss/.libs/libicalss.a -Wl,--rpath -Wl,/usr/local/xfce/lib -Wl,--rpath -Wl,/usr/local/xfce/lib


Comment 12 juha editbugs 2006-11-06 13:35:56 CET
don't get the failure
Comment 13 Brian J. Tarricone (not reading bugmail) 2007-01-26 18:58:44 CET
Moving all bugs to new Orage product.
Comment 14 Samuli Suominen 2007-01-30 14:14:58 CET
(In reply to comment #12)
> don't get the failure
> 

I couldn't reproduce this one anymore with 4.4.0 but somewhere between I also reinstalled my system and built everything with -Wl,--as-needed again.

WORKSFORMETOO

Bug #2023

Reported by:
Samuli Suominen
Reported on: 2006-07-12
Last modified on: 2007-01-30

People

CC List:
0 users

Version

Version:
unspecified

Attachments

orage-4.3.90.2-asneeded.patch (579 bytes, patch)
2006-07-12 20:59 CEST , Samuli Suominen
no flags

Additional information