Ends in Scratchbox: can't find g ++

I use sbox with Make-based codebase without any problems. Now I am using a scons based database and getting some odd problems.

It seems that in scratchbox, scons cannot find g ++. For example, it tries to accomplish things like:

o hello hello.c

When should this be done:

g ++ -o hello hello.c

So its g ++ string variable is supposedly empty. g ++ is also present in PATH - β€œwhich g ++” creates / scratchbox / compilers / bin / g ++.

The same source builds fine outside the field from scratch, so it should not be a problem with scons or codebase. There are no special environment variables set outside the Reset field when it is running.

If I symbolically associate / usr / bin / g ++ with / scratchbox / compilers / bin / g ++, it gets a little more (creates the correct g ++ commands), but after execution they produce:

sb_gcc_wrapper (g ++): / Scratchbox / Compilers / link Linux-cs2007q3-51sb3 / bin / Sbox-link Linux-gnueabi-g ++: No such file or directory

Presented file is present.

PATH contains / scratchbox / compilers / bin, SBOX_REDIRECT_FROM_DIRS contains / usr / bin and SBOX_REDIRECT_TO_DIRS contains / scratchbox / compilers / bin, so I think he can find it.

Any suggestions would be appreciated! Thanks Ray

Edit: possibly related - it also cannot find pkg-config unless I add the full path to the scons file

+4
source share
1 answer

scons does not distribute the PATH environment variable, so testing, for example, 'g ++' does not help much.

Either set the compilers directly, eg env['CXX'] = '/scratchbox/compilers/bin/g++' 

Create your own explicit PATH

 path = ['/scratchbox/compilers/bin/','/bin', '/usr/bin', '/sbin','/usr/sbin'] env = Environment(ENV = {'PATH' : path}) 

Or use the env PATH variable from your shell

 import os env = Environment(ENV = {'PATH' : os.environ['PATH']}) 
+7
source

All Articles