Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 459846

Summary: net-voip/homer does not respect CXX
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: New packagesAssignee: Marcel Pennewiß <gentoo>
Status: RESOLVED FIXED    
Severity: normal CC: proxy-maint
Priority: Normal Keywords: InVCS, PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 243502    
Attachments: Patch for 0.24.1-ebuild
Patch for 0.25-ebuild
Patch for 9999-ebuild

Description Agostino Sarubbo gentoo-dev 2013-03-01 09:40:27 UTC
You receive this bug because this package does not respect my system's CXX ( x86_64-pc-linux-gnu-g++ - /usr/bin/x86_64-pc-linux-gnu-g++ ) and calls directly g++ -/usr/bin/g++
The possible solutions to fix this issue are:
1)Fix the buildsystem, if you can
2)inherit toolchain-funcs and use tc-export CXX
3)inherit toolchain-funcs and use emake CXX="$(tc-getCXX)"


/usr/bin/c++  -fPIC -march=native -O2 -pipe  -D_GNU_SOURCE -m64 -W -Wall -Wno-overloaded-virtual -Wno-switch -Wno-unused -Wno-long-long -Wno-deprecated-declarations 
-Wno-format -Wno-uninitialized -Wno-unused-parameter -DRELEASE_VERSION  -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -shared -Wl,-soname,libHomerBase.so.0 -o 
/var/tmp/portage/net-voip/homer-0.24.1/work/Homer-Conferencing-0.24.1/HomerBuild/bin/lib/libHomerBase.so.0.24.1 CMakeFiles/HomerBase.dir/__/src/HBMutex.cpp.o 
CMakeFiles/HomerBase.dir/__/src/HBCondition.cpp.o CMakeFiles/HomerBase.dir/__/src/HBRandom.cpp.o CMakeFiles/HomerBase.dir/__/src/HBReflection.cpp.o 
CMakeFiles/HomerBase.dir/__/src/HBSocket.cpp.o CMakeFiles/HomerBase.dir/__/src/HBSocketControlService.cpp.o CMakeFiles/HomerBase.dir/__/src/HBSystem.cpp.o 
CMakeFiles/HomerBase.dir/__/src/HBThread.cpp.o CMakeFiles/HomerBase.dir/__/src/HBTime.cpp.o CMakeFiles/HomerBase.dir/__/src/Logging/Logger.cpp.o 
CMakeFiles/HomerBase.dir/__/src/Logging/LogSink.cpp.o CMakeFiles/HomerBase.dir/__/src/Logging/LogSinkFile.cpp.o CMakeFiles/HomerBase.dir/__/src/Logging/LogSinkConsole.cpp.o 
CMakeFiles/HomerBase.dir/__/src/Logging/LogSinkNet.cpp.o -L/usr/local/lib 
-L/var/tmp/portage/net-voip/homer-0.24.1/work/Homer-Conferencing-0.24.1/HomerBase/libHomerBase/../../HomerBuild/bin/lib 
-L/var/tmp/portage/net-voip/homer-0.24.1/work/Homer-Conferencing-0.24.1/HomerBase/libHomerBase/../../HomerBuild/bin -lrt -Wl,-Bstatic -Wl,-Bsymbolic -Wl,-Bdynamic 
-Wl,-rpath,/usr/local/lib:/var/tmp/portage/net-voip/homer-0.24.1/work/Homer-Conferencing-0.24.1/HomerBase/libHomerBase/../../HomerBuild/bin/lib:/var/tmp/portage/net-voip/homer-0.24.1/work/Homer-Conferencing-0.24.1/HomerBase/libHomerBase/../../HomerBuild/bin
Comment 1 Marcel Pennewiß 2013-03-09 18:32:12 UTC
If setting CXX="/usr/bin/x86_64-pc-linux-gnu-g++" in make.conf is set, buildsystem uses /usr/bin/x86_64-pc-linux-gnu-g++ instead of /usr/bin/c++.

So, how can i reproduce your issue?
Comment 2 Sergey Popov gentoo-dev 2013-03-10 09:47:54 UTC
(In reply to comment #1)
> If setting CXX="/usr/bin/x86_64-pc-linux-gnu-g++" in make.conf is set,
> buildsystem uses /usr/bin/x86_64-pc-linux-gnu-g++ instead of /usr/bin/c++.
> 
> So, how can i reproduce your issue?

CXX and CC should not be set in make.conf only CHOST should be.

But this variables should be exported by ebuild at buildtime(if it's needed), through toolchain-funcs eclass...
Comment 3 Marcel Pennewiß 2013-03-10 10:40:34 UTC
Created attachment 341506 [details, diff]
Patch for 0.24.1-ebuild
Comment 4 Marcel Pennewiß 2013-03-10 10:40:52 UTC
Created attachment 341508 [details, diff]
Patch for 0.25-ebuild
Comment 5 Marcel Pennewiß 2013-03-10 10:41:23 UTC
Created attachment 341510 [details, diff]
Patch for 9999-ebuild
Comment 6 Marcel Pennewiß 2013-03-10 10:43:43 UTC
(In reply to comment #2)
> CXX and CC should not be set in make.conf only CHOST should be.
> 
> But this variables should be exported by ebuild at buildtime(if it's
> needed), through toolchain-funcs eclass...

Thanks for the report and the comments. Patch attached should fix this issue. Reported upstream, maybe there's an fix in buildsystem in future releases.
Comment 7 Markos Chandras (RETIRED) gentoo-dev 2013-03-10 11:05:54 UTC
(In reply to comment #1)
> If setting CXX="/usr/bin/x86_64-pc-linux-gnu-g++" in make.conf is set,
> buildsystem uses /usr/bin/x86_64-pc-linux-gnu-g++ instead of /usr/bin/c++.
> 
> So, how can i reproduce your issue?

What you need to do is to make sure that the build system files do not hardcode "g++" to CXX anywhere. If you are having problems dealing with this, I can create a patch to demonstrate you how to deal with these problems in the future.
Comment 8 Markos Chandras (RETIRED) gentoo-dev 2013-03-10 12:29:04 UTC
(In reply to comment #6)
> (In reply to comment #2)
> > CXX and CC should not be set in make.conf only CHOST should be.
> > 
> > But this variables should be exported by ebuild at buildtime(if it's
> > needed), through toolchain-funcs eclass...
> 
> Thanks for the report and the comments. Patch attached should fix this
> issue. Reported upstream, maybe there's an fix in buildsystem in future
> releases.

The patches look good to me. Did they actually fix the problem though? Do you see your expanded gcc tuple in your build.log?
Comment 9 Marcel Pennewiß 2013-03-10 15:54:09 UTC
(In reply to comment #8)
> The patches look good to me. Did they actually fix the problem though? Do
> you see your expanded gcc tuple in your build.log?

Before Patch:
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
...
cd /var/tmp/portage/net-voip/homer-0.25/work/Homer-Conferencing-0.25/HomerBuild/Build/Default/HomerBase/libHomerBase && /usr/bin/c++   -DHomerBase_EXPORTS .../HBRandom.cpp

After Patch:
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ -- works
...
cd /var/tmp/portage/net-voip/homer-0.25/work/Homer-Conferencing-0.25/HomerBuild/Build/Default/HomerBase/libHomerBase && /usr/bin/x86_64-pc-linux-gnu-g++   -DHomerBase_EXPORTS .../HBRandom.cpp
Comment 10 Markos Chandras (RETIRED) gentoo-dev 2013-03-17 19:33:35 UTC
+  17 Mar 2013; Markos Chandras <hwoarang@gentoo.org> homer-0.24.1.ebuild,
+  homer-0.25.ebuild, homer-9999.ebuild:
+  Respect CXX. Thanks to Marcel Pennewiß <gentoo@pennewiss.de>. Bug #459846
+