Date: Fri, 4 Jan 2008 00:50:03 GMT From: Christoph Moench-Tegeder <cmt@burggraben.net> To: gnome@FreeBSD.org Subject: Re: ports/119286: audio/pulseaudio (pulseaudio-0.9.6_4) (linker error) Message-ID: <200801040050.m040o3Sw057038@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/119286; it has been noted by GNATS. From: Christoph Moench-Tegeder <cmt@burggraben.net> To: bug-followup@freebsd.org Cc: Subject: Re: ports/119286: audio/pulseaudio (pulseaudio-0.9.6_4) (linker error) Date: Fri, 4 Jan 2008 01:20:00 +0100 Hi, The linker error is caused by "-Wl,-no-undefined" from src/Makefile.in which is used when linking shared libraries (as far as I understand, shared object are allowed to have unresolved symbols). The author of pulseaudio claims that -no-undefined is used on at least some platforms (see comment in src/Makefile.am). Below is a patch which just removes -no-undefined from the linker options, this works for me (FreeBSD 6.3RC2, i386). As I were on that, I fixed some other problems, too: - patch-src_Makefile.am, patch-src_Makefile.in fixes the afore mentioned linker problem - patch-src_pulse_introspect.c There were compiler warnings about redundant redeclarations of memset in src/pulse/introspect.c. Obviously, string.h was not #include'd. - patch-src_tests_rtpoll-test.c The compailer failed complaining about undefined SIGRTMIN and SIGRTMAX. These are not present in 6-STABLE (see standards/99517), so this test does nothing if SIGRTMIN is not #define'd. Additionally, there should be a script or at least an UPDATING entry explaning the renaming of group 557 (ex realtime, now pulse-rt) for those upgrading from polypaudio. The patch below fixes these problems in pulseaudio-0.9.8. If the mail system garbles it, get it at http://www.burggraben.net/hacks/audio_pulseaudio.patch.gz Be aware that I did not run extensive tests with my patches. diff -Nru pulseaudio.orig/Makefile pulseaudio/Makefile --- pulseaudio.orig/Makefile 2008-01-01 23:35:54.000000000 +0100 +++ pulseaudio/Makefile 2008-01-03 23:40:25.000000000 +0100 @@ -8,6 +8,7 @@ PORTNAME= pulseaudio PORTVERSION= 0.9.8 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= http://0pointer.de/lennart/projects/${PORTNAME}/ diff -Nru pulseaudio.orig/files/patch-src_Makefile.am pulseaudio/files/patch-src_Makefile.am --- pulseaudio.orig/files/patch-src_Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ pulseaudio/files/patch-src_Makefile.am 2008-01-03 23:38:48.000000000 +0100 @@ -0,0 +1,11 @@ +--- src/Makefile.am.orig 2008-01-03 22:48:43.000000000 +0100 ++++ src/Makefile.am 2008-01-03 23:36:58.000000000 +0100 +@@ -64,7 +64,7 @@ + AM_LDADD = $(PTHREAD_LIBS) + + # Only required on some platforms but defined for all to avoid errors +-AM_LDFLAGS = -Wl,-no-undefined -ffunction-sections -fdata-sections -Wl,--gc-sections ++AM_LDFLAGS = -ffunction-sections -fdata-sections -Wl,--gc-sections + + if STATIC_BINS + BINLDFLAGS = -static diff -Nru pulseaudio.orig/files/patch-src_Makefile.in pulseaudio/files/patch-src_Makefile.in --- pulseaudio.orig/files/patch-src_Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ pulseaudio/files/patch-src_Makefile.in 2008-01-03 23:38:32.000000000 +0100 @@ -0,0 +1,12 @@ +--- src/Makefile.in.orig 2008-01-03 22:52:31.000000000 +0100 ++++ src/Makefile.in 2008-01-03 23:37:48.000000000 +0100 +@@ -1657,8 +1657,7 @@ + AM_LDADD = $(PTHREAD_LIBS) + + # Only required on some platforms but defined for all to avoid errors +-AM_LDFLAGS = -Wl,-no-undefined -ffunction-sections -fdata-sections \ +- -Wl,--gc-sections $(am__append_1) ++AM_LDFLAGS = -ffunction-sections -fdata-sections -Wl,--gc-sections $(am__append_1) + @STATIC_BINS_TRUE@BINLDFLAGS = -static + @OS_IS_WIN32_TRUE@WINSOCK_LIBS = -lwsock32 -lws2_32 -lwininet + @OS_IS_WIN32_FALSE@PA_THREAD_OBJS = \ diff -Nru pulseaudio.orig/files/patch-src_pulse_introspect.c pulseaudio/files/patch-src_pulse_introspect.c --- pulseaudio.orig/files/patch-src_pulse_introspect.c 1970-01-01 01:00:00.000000000 +0100 +++ pulseaudio/files/patch-src_pulse_introspect.c 2008-01-03 22:57:12.000000000 +0100 @@ -0,0 +1,11 @@ +--- src/pulse/introspect.c.orig 2008-01-03 22:49:50.000000000 +0100 ++++ src/pulse/introspect.c 2008-01-03 22:50:51.000000000 +0100 +@@ -22,6 +22,8 @@ + USA. + ***/ + ++#include <string.h> ++ + #ifdef HAVE_CONFIG_H + #include <config.h> + #endif diff -Nru pulseaudio.orig/files/patch-src_tests_rtpoll-test.c pulseaudio/files/patch-src_tests_rtpoll-test.c --- pulseaudio.orig/files/patch-src_tests_rtpoll-test.c 1970-01-01 01:00:00.000000000 +0100 +++ pulseaudio/files/patch-src_tests_rtpoll-test.c 2008-01-03 23:12:11.000000000 +0100 @@ -0,0 +1,18 @@ +--- src/tests/rtpoll-test.c.orig 2008-01-03 23:09:05.000000000 +0100 ++++ src/tests/rtpoll-test.c 2008-01-03 23:09:32.000000000 +0100 +@@ -45,6 +45,7 @@ + } + + int main(int argc, char *argv[]) { ++#ifdef SIGRTMIN + pa_rtpoll *p; + pa_rtpoll_item *i, *w; + struct pollfd *pollfd; +@@ -86,6 +87,7 @@ + pa_rtpoll_item_free(w); + + pa_rtpoll_free(p); ++#endif /* SIGRTMIN */ + + return 0; + } Regards Christoph -- Spare Space
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801040050.m040o3Sw057038>