Summary: | dev-util/scons does not PATH from environment, hard-codes it instead | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Asfand Yar Qazi <ayqazi> |
Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | ebuild patch to add prefix paths to hardcoded search path |
Not at all! It looks like the right thing to do to me. Would obsolete bug #361089 though, right? 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. Created attachment 272051 [details, diff]
ebuild patch to add prefix paths to hardcoded search path
(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 hmm, a bit delayed, but I just added your patch, thanks! |
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