Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 361061 - dev-util/scons does not PATH from environment, hard-codes it instead
Summary: dev-util/scons does not PATH from environment, hard-codes it instead
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-29 08:49 UTC by Asfand Yar Qazi
Modified: 2011-08-29 18:21 UTC (History)
0 users

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


Attachments
ebuild patch to add prefix paths to hardcoded search path (scons-2.0.1-prefix-paths.patch,480 bytes, patch)
2011-05-04 10:09 UTC, Asfand Yar Qazi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Asfand Yar Qazi 2011-03-29 08:49:35 UTC
Hi,

I had a bit of an argument with the scons people about this 'design decision' - they hard-code the PATH variable and ignore what is in the environment by default.  Rather than telling each package using SCons to inherit PATH from the environment, I suggest we patch SCons when it is built to add the Gentoo prefixes path to its hardcoded list.

This came up when I tried to build the dev-lang/v8 javascript engine for chromium and it could not find i686-pc-linux-gnu-g++:

>>> Compiling source in /software/team87/gentoo/var/tmp/portage/dev-lang/v8-3.1.8.3/work/v8-3.1.8.3 ...
scons library=shared soname=on sample=shell importenv="LINKFLAGS" console=readline arch=ia32 .
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
i686-pc-linux-gnu-g++ -o obj/release/accessors.os -c -O2 -pipe -march=i686 -fno-strict-aliasing -Wall -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -m32 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -fno-rtti -fno-exceptions -fvisibility=hidden -Wall -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -m32 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -fPIC -DV8_TARGET_ARCH_IA32 -DV8_SHARED -DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -Isrc src/accessors.cc
sh: i686-pc-linux-gnu-g++: command not found
scons: *** [obj/release/accessors.os] Error 127
scons: building terminated because of errors.



Unless anyone has any objections to this, I will work on it later.

Regards,
      Asfand
Comment 1 Fabian Groffen gentoo-dev 2011-04-23 14:56:38 UTC
Not at all!  It looks like the right thing to do to me.  Would obsolete bug #361089 though, right?
Comment 2 Asfand Yar Qazi 2011-05-01 17:14:05 UTC
Hi, sorry for the lateness of my reply.

I hope it does indeed obsolete it, but it may not because Gentoo puts other things into the PATH, like some GCC-version specific paths.  This is mainly so people using SCons on Gentoo Prefix find all the Prefixed compilers/linkers/etc.
Comment 3 Asfand Yar Qazi 2011-05-04 10:09:17 UTC
Created attachment 272051 [details, diff]
ebuild patch to add prefix paths to hardcoded search path
Comment 4 Asfand Yar Qazi 2011-05-04 10:11:57 UTC
(In reply to comment #3)
> Created attachment 272051 [details, diff]
> ebuild patch to add prefix paths to hardcoded search path

I cannot think of another way of doing this; please let me know if there is.  Also, I cannot figure out an easy way of checking if the lines being edited with sed are present.  Please advise on that front as well.

I tested this with the following SConstruct file, and it seems to work:

env = Environment(CC = 'i686-pc-linux-gnu-gcc')
env.Program('hello.c')

(My distro does not have i686-pc-linux-gnu-gcc anywhere in its default path, hence this made sure that the Prefix path was being searched by default).

Thanks.

Regards,
     Asfand Qazi
Comment 5 Fabian Groffen gentoo-dev 2011-08-29 18:21:32 UTC
hmm, a bit delayed, but I just added your patch, thanks!