Bug 119286 - audio/pulseaudio (pulseaudio-0.9.6_4) (linker error)
Summary: audio/pulseaudio (pulseaudio-0.9.6_4) (linker error)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-03 02:20 UTC by JImmie James
Modified: 2008-01-09 02:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JImmie James 2008-01-03 02:20:00 UTC
.libs/libpulse_la-client-conf-x11.o(.text+0x42): In function `pa_client_conf_from_x11':
: undefined reference to `__assert'
.libs/libpulse_la-client-conf-x11.o(.text+0x55): In function `pa_client_conf_from_x11':
: undefined reference to `getenv'
.libs/libpulse_la-client-conf-x11.o(.text+0x1b1): In function `pa_client_conf_from_x11':
: undefined reference to `memcpy'
.libs/libpulse_la-x11prop.o(.text+0x109): In function `pa_x11_get_prop':
: undefined reference to `memcpy'
gmake[3]: *** [libpulse.la] Error 1


(plus a few hundred other similar) http://fortytwo.zapto.org/pulseaudio.txt for full log.)

How-To-Repeat: update audio/pulseaudio
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-01-03 02:20:06 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gnome

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Jeremy Messenger freebsd_committer freebsd_triage 2008-01-03 23:35:36 UTC
State Changed
From-To: open->feedback

Can you test this patch to see if it helps? Thanks. 

http://people.freebsd.org/~mezz/diff/pulseaudio.diff
Comment 3 Christoph Moench-Tegeder freebsd_committer freebsd_triage 2008-01-04 00:20:00 UTC
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
Comment 4 Joe Marcus Clarke freebsd_committer freebsd_triage 2008-01-05 15:02:41 UTC
State Changed
From-To: feedback->closed

This has now been fixed.
Comment 5 dfilter service freebsd_committer freebsd_triage 2008-01-05 15:02:43 UTC
marcus      2008-01-05 15:02:37 UTC

  FreeBSD ports repository

  Modified files:
    audio/pulseaudio     Makefile 
  Log:
  Remove -Wl,-no-undefined from the LDFLAGS to allow pulse to build on
  FreeBSD < 7.X.
  
  PR:             119286
  
  Revision  Changes    Path
  1.19      +4 -0      ports/audio/pulseaudio/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Romain Tartière 2008-01-05 16:34:38 UTC
Hi

On Sat, Jan 05, 2008 at 03:10:02PM +0000, dfilter service wrote :
> The following reply was made to PR ports/119286; it has been noted by GNATS.
> 
>    Modified files:
>      audio/pulseaudio     Makefile 
>    Log:
>    Remove -Wl,-no-undefined from the LDFLAGS to allow pulse to build on
>    FreeBSD < 7.X.


This last commit does not fix build on my machine (FreeBSD 6.2-STABLE).
Patching the Makefile in /src instead of the one in / solve the issue (patch
bellow).

--- Makefile.patch begins here ---
diff -Nur pulseaudio.orig/Makefile pulseaudio/Makefile
--- pulseaudio.orig/Makefile	2008-01-05 17:23:03.000000000 +0100
+++ pulseaudio/Makefile	2008-01-05 17:20:44.000000000 +0100
@@ -86,7 +86,7 @@
 		${WRKSRC}/src/daemon/default.pa.in
 .if ${OSVERSION} < 700042
 	@${REINPLACE_CMD} -e 's|-Wl,-no-undefined||' \
-	    	${WRKSRC}/Makefile.in
+	    	${WRKSRC}/src/Makefile.in
 .endif
 
 post-install:
--- Makefile.patch ends here ---

Regards,
Romain

-- 
Romain Tartiere <romain@blogreen.org>        http://romain.blogreen.org/
pgp: 8DAB A124 0DA4 7024 F82A  E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43)
(plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated)
Comment 7 gnats freebsd_committer freebsd_triage 2008-01-05 20:58:09 UTC
State Changed
From-To: closed->open

Reopening due to the following data from misfiled PR ports/119363: 

Date: Sat, 5 Jan 2008 14:40:37 -0200 
Comment 8 Jeremy Messenger freebsd_committer freebsd_triage 2008-01-09 02:50:51 UTC
State Changed
From-To: open->closed

Reclose this, marcus has already committed a fix.