Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 221945 - [PATCH] media-sound/peercast-0.1218 does not respect CXX (does not compile with uclibc++ even if specified)
Summary: [PATCH] media-sound/peercast-0.1218 does not respect CXX (does not compile wi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-13 14:15 UTC by Natanael Copa
Modified: 2009-05-08 15:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
peercast-0.1218.ebuild (peercast-0.1218.ebuild,1.36 KB, text/plain)
2008-05-13 14:16 UTC, Natanael Copa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2008-05-13 14:15:16 UTC
The ebuild will always link the program using g++, no matter what you have specified in your CXX. (i bet this cause problems for cross-compilers as well)

Looking at the makefile, it seems that the problem is that LD=g++.

Also, the -pthread should be -lpthread.
Comment 1 Natanael Copa 2008-05-13 14:16:36 UTC
Created attachment 153057 [details]
peercast-0.1218.ebuild

attached ebuild fixes the problem.

--- peercast-0.1218.ebuild.orig	2008-05-13 14:08:02 +0000
+++ peercast-0.1218.ebuild	2008-05-13 14:08:07 +0000
@@ -30,11 +30,11 @@
 }
 
 src_compile() {
-	append-ldflags -pthread
+	append-ldflags -lpthread
 
 	cd "${S}"/ui/linux
 	emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" \
-		LDFLAGS="${LDFLAGS}" || die "emake failed"
+		LDFLAGS="${LDFLAGS}" LD="$(tc-getCXX)" || die "emake failed"
 }
 
 src_install() {
Comment 2 Alexis Ballier gentoo-dev 2008-05-16 13:48:20 UTC
>  src_compile() {
> -       append-ldflags -pthread
> +       append-ldflags -lpthread

This seems wrong to me: linking to a library isn't done by ldflags. Just out of curiosity, what does it serves for vs -pthread ? I though gcc specs were supposed to do the right thing in that case.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2009-05-08 15:38:52 UTC
(In reply to comment #2)
> >  src_compile() {
> > -       append-ldflags -pthread
> > +       append-ldflags -lpthread
> 
> This seems wrong to me: linking to a library isn't done by ldflags. Just out of
> curiosity, what does it serves for vs -pthread ? I though gcc specs were
> supposed to do the right thing in that case.
> 

That's what I was thinking as well..

+  08 May 2009; Samuli Suominen <ssuominen@gentoo.org>
+  peercast-0.1218-r1.ebuild:
+  Fix hardcoded g++ which was used for linking wrt #221945

So closing..