* [gentoo-devhelp] How do I make scons use correct CFLAGS/CXXFLAGS/LDFLAGS?
@ 2011-05-17 3:48 Nikos Chantziaras
2011-05-17 4:49 ` [gentoo-devhelp] " Nikos Chantziaras
0 siblings, 1 reply; 10+ messages in thread
From: Nikos Chantziaras @ 2011-05-17 3:48 UTC (permalink / raw
To: gentoo-devhelp
I wrote an ebuild for a software that uses SCons as its build system. My
guide was scons-utils.eclass and some other ebuilds that were using it.
It pretty much boils down to:
src_compile()
{
tc-export CC CXX
append-cflags -Wno-error
append-cxxflags -Wno-error
escons PREFIX=/usr DESTDIR="${D}" || die
}
src_install()
{
escons PREFIX=/usr DESTDIR="${D}" install || die
}
But it ignores the CFLAGS/CXXFLAGS/LDFLAGS set in make.conf, and
append-cflags and append-cxxflags does nothing (-Wno-error is not used
in the resulting build.)
I'm not sure where to go from here.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-devhelp] Re: How do I make scons use correct CFLAGS/CXXFLAGS/LDFLAGS?
2011-05-17 3:48 [gentoo-devhelp] How do I make scons use correct CFLAGS/CXXFLAGS/LDFLAGS? Nikos Chantziaras
@ 2011-05-17 4:49 ` Nikos Chantziaras
2011-05-17 5:14 ` Nathan Phillip Brink
0 siblings, 1 reply; 10+ messages in thread
From: Nikos Chantziaras @ 2011-05-17 4:49 UTC (permalink / raw
To: gentoo-devhelp
On 05/17/2011 06:48 AM, Nikos Chantziaras wrote:
> But it ignores the CFLAGS/CXXFLAGS/LDFLAGS set in make.conf, and
> append-cflags and append-cxxflags does nothing (-Wno-error is not used
> in the resulting build.)
OK, I have worse problems than just the above :-/
First:
g++ -o .release_build/OcelotConfig -L/usr/lib64/llvm -lpthread -lffi
-ldl -lm .release_build/ocelot/tools/OcelotConfig.o -L/usr/lib
-L/usr/lib64/llvm -L. -locelot
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../x86_64-pc-linux-gnu/bin/ld:
cannot find -locelot
collect2: ld returned 1 exit status
If I ignore the above error and proceed with "scons install" anyway:
ACCESS DENIED open_wr: /usr/lib/libocelot.so
scons: *** [/usr/lib/libocelot.so] /usr/lib/libocelot.so: Permission denied
SCons does not seem to play nicely with the package sandboxing that
Gentoo uses. It tries to access /usr directly.
What should I do here?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-devhelp] Re: How do I make scons use correct CFLAGS/CXXFLAGS/LDFLAGS?
2011-05-17 4:49 ` [gentoo-devhelp] " Nikos Chantziaras
@ 2011-05-17 5:14 ` Nathan Phillip Brink
2011-05-17 5:23 ` Nikos Chantziaras
0 siblings, 1 reply; 10+ messages in thread
From: Nathan Phillip Brink @ 2011-05-17 5:14 UTC (permalink / raw
To: Nikos Chantziaras; +Cc: gentoo-devhelp
[-- Attachment #1: Type: text/plain, Size: 1482 bytes --]
On Tue, May 17, 2011 at 07:49:23AM +0300, Nikos Chantziaras wrote:
> On 05/17/2011 06:48 AM, Nikos Chantziaras wrote:
> > But it ignores the CFLAGS/CXXFLAGS/LDFLAGS set in make.conf, and
> > append-cflags and append-cxxflags does nothing (-Wno-error is not used
> > in the resulting build.)
>
> OK, I have worse problems than just the above :-/
>
> First:
>
> g++ -o .release_build/OcelotConfig -L/usr/lib64/llvm -lpthread -lffi
> -ldl -lm .release_build/ocelot/tools/OcelotConfig.o -L/usr/lib
> -L/usr/lib64/llvm -L. -locelot
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../x86_64-pc-linux-gnu/bin/ld:
> cannot find -locelot
> collect2: ld returned 1 exit status
>
> If I ignore the above error and proceed with "scons install" anyway:
>
> ACCESS DENIED open_wr: /usr/lib/libocelot.so
> scons: *** [/usr/lib/libocelot.so] /usr/lib/libocelot.so: Permission denied
>
> SCons does not seem to play nicely with the package sandboxing that
> Gentoo uses. It tries to access /usr directly.
>
> What should I do here?
Try replacing DESTDIR="${D}" with install_path="${D}"/usr perhaps?
That's just a guess from examining
http://code.google.com/p/gpuocelot/source/browse/trunk/ocelot/SConscript
.
And for your first problem with CXXFLAGS, try
export OCELOT_CONFIG_FLAGS="${CXXFLAGS}"
That probably still leaves LDFLAGS which should probably be set in LINKFLAGS.
--
binki
Look out for missing or extraneous apostrophes!
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-devhelp] Re: How do I make scons use correct CFLAGS/CXXFLAGS/LDFLAGS?
2011-05-17 5:14 ` Nathan Phillip Brink
@ 2011-05-17 5:23 ` Nikos Chantziaras
2011-05-17 6:45 ` Peter Volkov
0 siblings, 1 reply; 10+ messages in thread
From: Nikos Chantziaras @ 2011-05-17 5:23 UTC (permalink / raw
To: gentoo-devhelp
On 05/17/2011 08:14 AM, Nathan Phillip Brink wrote:
>> [...]
>> OK, I have worse problems than just the above :-/
>>
>> First:
>>
>> g++ -o .release_build/OcelotConfig -L/usr/lib64/llvm -lpthread -lffi
>> -ldl -lm .release_build/ocelot/tools/OcelotConfig.o -L/usr/lib
>> -L/usr/lib64/llvm -L. -locelot
>> /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../x86_64-pc-linux-gnu/bin/ld:
>> cannot find -locelot
>> collect2: ld returned 1 exit status
>>
>> If I ignore the above error and proceed with "scons install" anyway:
>>
>> ACCESS DENIED open_wr: /usr/lib/libocelot.so
>> scons: *** [/usr/lib/libocelot.so] /usr/lib/libocelot.so: Permission denied
>> [...]
>
> Try replacing DESTDIR="${D}" with install_path="${D}"/usr perhaps?
Unfortunately, it didn't help. Tried both "${D}" as well as "${D}"/usr:
scons: *** Path for option install_path does not exist:
/var/tmp/portage/dev-util/gpuocelot-9999/image
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-devhelp] Re: How do I make scons use correct CFLAGS/CXXFLAGS/LDFLAGS?
2011-05-17 5:23 ` Nikos Chantziaras
@ 2011-05-17 6:45 ` Peter Volkov
2011-05-17 7:18 ` Nikos Chantziaras
0 siblings, 1 reply; 10+ messages in thread
From: Peter Volkov @ 2011-05-17 6:45 UTC (permalink / raw
To: Nikos Chantziaras; +Cc: gentoo-devhelp
В Втр, 17/05/2011 в 08:23 +0300, Nikos Chantziaras пишет:
> Unfortunately, it didn't help. Tried both "${D}" as well as "${D}"/usr:
>
> scons: *** Path for option install_path does not exist:
> /var/tmp/portage/dev-util/gpuocelot-9999/image
Please, post full ebuild.
--
Peter.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-devhelp] Re: How do I make scons use correct CFLAGS/CXXFLAGS/LDFLAGS?
2011-05-17 6:45 ` Peter Volkov
@ 2011-05-17 7:18 ` Nikos Chantziaras
2011-05-17 8:57 ` Peter Volkov
0 siblings, 1 reply; 10+ messages in thread
From: Nikos Chantziaras @ 2011-05-17 7:18 UTC (permalink / raw
To: gentoo-devhelp
On 05/17/2011 09:45 AM, Peter Volkov wrote:
> В Втр, 17/05/2011 в 08:23 +0300, Nikos Chantziaras пишет:
>> Unfortunately, it didn't help. Tried both "${D}" as well as "${D}"/usr:
>>
>> scons: *** Path for option install_path does not exist:
>> /var/tmp/portage/dev-util/gpuocelot-9999/image
>
> Please, post full ebuild.
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=3
inherit subversion flag-o-matic scons-utils toolchain-funcs
DESCRIPTION="A dynamic compilation framework for PTX"
HOMEPAGE="http://code.google.com/p/gpuocelot"
SRC_URI=""
ESVN_REPO_URI="http://gpuocelot.googlecode.com/svn/trunk/ocelot/"
KEYWORDS=""
LICENSE="BSD"
SLOT="0"
DEPEND=">=dev-libs/boost-1.45.0
dev-util/nvidia-cuda-toolkit
media-libs/glew"
RDEPEND="${DEPEND}"
src_compile() {
tc-export CC CXX
escons install_path="${D}"/usr test_level=none || die
}
src_install() {
escons install_path="${D}"/usr test_level=none install || die
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-devhelp] Re: How do I make scons use correct CFLAGS/CXXFLAGS/LDFLAGS?
2011-05-17 7:18 ` Nikos Chantziaras
@ 2011-05-17 8:57 ` Peter Volkov
2011-05-17 15:40 ` Nikos Chantziaras
0 siblings, 1 reply; 10+ messages in thread
From: Peter Volkov @ 2011-05-17 8:57 UTC (permalink / raw
To: Nikos Chantziaras; +Cc: gentoo-devhelp
В Втр, 17/05/2011 в 10:18 +0300, Nikos Chantziaras пишет:
> On 05/17/2011 09:45 AM, Peter Volkov wrote:
> > В Втр, 17/05/2011 в 08:23 +0300, Nikos Chantziaras пишет:
> >> scons: *** Path for option install_path does not exist:
> >> /var/tmp/portage/dev-util/gpuocelot-9999/image
> >
> > Please, post full ebuild.
> src_compile() {
> tc-export CC CXX
> escons install_path="${D}"/usr test_level=none || die
You don't need install_path here, only in src_install().
As for CC, CXX, CFLAGS and etc, you'll have to patch
scripts/build_environment.py for that as it drops all environment in
importEnvironment(). May be it's good idea to contact upstream on this
issue.
--
Peter.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-devhelp] Re: How do I make scons use correct CFLAGS/CXXFLAGS/LDFLAGS?
2011-05-17 8:57 ` Peter Volkov
@ 2011-05-17 15:40 ` Nikos Chantziaras
2011-05-17 18:58 ` Peter Volkov
0 siblings, 1 reply; 10+ messages in thread
From: Nikos Chantziaras @ 2011-05-17 15:40 UTC (permalink / raw
To: gentoo-devhelp
On 05/17/2011 11:57 AM, Peter Volkov wrote:
> В Втр, 17/05/2011 в 10:18 +0300, Nikos Chantziaras пишет:
>> On 05/17/2011 09:45 AM, Peter Volkov wrote:
>>> В Втр, 17/05/2011 в 08:23 +0300, Nikos Chantziaras пишет:
>>>> scons: *** Path for option install_path does not exist:
>>>> /var/tmp/portage/dev-util/gpuocelot-9999/image
>>>
>>> Please, post full ebuild.
>
>> src_compile() {
>> tc-export CC CXX
>> escons install_path="${D}"/usr test_level=none || die
>
> You don't need install_path here, only in src_install().
Removing it brings us back to the original problem:
g++ -o .release_build/OcelotConfig -L/usr/lib64/llvm -lpthread -lffi
-ldl -lm .release_build/ocelot/tools/OcelotConfig.o -L/usr/lib
-L/usr/lib64/llvm -L. -locelot
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../x86_64-pc-linux-gnu/bin/ld:
cannot find -locelot
collect2: ld returned 1 exit status
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-devhelp] Re: How do I make scons use correct CFLAGS/CXXFLAGS/LDFLAGS?
2011-05-17 15:40 ` Nikos Chantziaras
@ 2011-05-17 18:58 ` Peter Volkov
2011-05-17 19:12 ` Nikos Chantziaras
0 siblings, 1 reply; 10+ messages in thread
From: Peter Volkov @ 2011-05-17 18:58 UTC (permalink / raw
To: Nikos Chantziaras; +Cc: gentoo-devhelp
В Втр, 17/05/2011 в 18:40 +0300, Nikos Chantziaras пишет:
> On 05/17/2011 11:57 AM, Peter Volkov wrote:
> > В Втр, 17/05/2011 в 10:18 +0300, Nikos Chantziaras пишет:
> >> On 05/17/2011 09:45 AM, Peter Volkov wrote:
> >>> В Втр, 17/05/2011 в 08:23 +0300, Nikos Chantziaras пишет:
> >>>> scons: *** Path for option install_path does not exist:
> >>>> /var/tmp/portage/dev-util/gpuocelot-9999/image
> >>>
> >>> Please, post full ebuild.
> >
> >> src_compile() {
> >> tc-export CC CXX
> >> escons install_path="${D}"/usr test_level=none || die
> >
> > You don't need install_path here, only in src_install().
>
> Removing it brings us back to the original problem:
>
> g++ -o .release_build/OcelotConfig -L/usr/lib64/llvm -lpthread -lffi
> -ldl -lm .release_build/ocelot/tools/OcelotConfig.o -L/usr/lib
> -L/usr/lib64/llvm -L. -locelot
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../x86_64-pc-linux-gnu/bin/ld:
> cannot find -locelot
> collect2: ld returned 1 exit status
Looks like this is bug in build system not in ebuild. Try to build
manually and if that fails then either fix it or report upstream.
--
Peter.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-devhelp] Re: How do I make scons use correct CFLAGS/CXXFLAGS/LDFLAGS?
2011-05-17 18:58 ` Peter Volkov
@ 2011-05-17 19:12 ` Nikos Chantziaras
0 siblings, 0 replies; 10+ messages in thread
From: Nikos Chantziaras @ 2011-05-17 19:12 UTC (permalink / raw
To: gentoo-devhelp
On 05/17/2011 09:58 PM, Peter Volkov wrote:
> В Втр, 17/05/2011 в 18:40 +0300, Nikos Chantziaras пишет:
>> On 05/17/2011 11:57 AM, Peter Volkov wrote:
>>> В Втр, 17/05/2011 в 10:18 +0300, Nikos Chantziaras пишет:
>>>> On 05/17/2011 09:45 AM, Peter Volkov wrote:
>>>>> В Втр, 17/05/2011 в 08:23 +0300, Nikos Chantziaras пишет:
>>>>>> scons: *** Path for option install_path does not exist:
>>>>>> /var/tmp/portage/dev-util/gpuocelot-9999/image
>>>>>
>>>>> Please, post full ebuild.
>>>
>>>> src_compile() {
>>>> tc-export CC CXX
>>>> escons install_path="${D}"/usr test_level=none || die
>>>
>>> You don't need install_path here, only in src_install().
>>
>> Removing it brings us back to the original problem:
>>
>> g++ -o .release_build/OcelotConfig -L/usr/lib64/llvm -lpthread -lffi
>> -ldl -lm .release_build/ocelot/tools/OcelotConfig.o -L/usr/lib
>> -L/usr/lib64/llvm -L. -locelot
>> /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../x86_64-pc-linux-gnu/bin/ld:
>> cannot find -locelot
>> collect2: ld returned 1 exit status
>
> Looks like this is bug in build system not in ebuild. Try to build
> manually and if that fails then either fix it or report upstream.
Building manually (using the exact same commands as used in the ebuild)
works correctly. Only with the ebuild does it fail.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-05-17 19:13 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-17 3:48 [gentoo-devhelp] How do I make scons use correct CFLAGS/CXXFLAGS/LDFLAGS? Nikos Chantziaras
2011-05-17 4:49 ` [gentoo-devhelp] " Nikos Chantziaras
2011-05-17 5:14 ` Nathan Phillip Brink
2011-05-17 5:23 ` Nikos Chantziaras
2011-05-17 6:45 ` Peter Volkov
2011-05-17 7:18 ` Nikos Chantziaras
2011-05-17 8:57 ` Peter Volkov
2011-05-17 15:40 ` Nikos Chantziaras
2011-05-17 18:58 ` Peter Volkov
2011-05-17 19:12 ` Nikos Chantziaras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox