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
Created attachment 664 orage-4.3.90.2-asneeded.patch Here you go. :)
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.
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
> From svn or by downloading the release? Release.
You might find this page intresting, http://www.gentoo.org/proj/en/qa/asneeded.xml
ok. interesting. I will do some testing.
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.
(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
Where did you find libical-0.26?
(In reply to comment #9) > Where did you find libical-0.26? > From libical homepage, http://www.aurore.net/projects/libical/
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
don't get the failure
Moving all bugs to new Orage product.
(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