Discussion:
[Scons-users] VB: SCons fails to build
Bill Deegan
2018-10-09 16:07:26 UTC
Permalink
Can you provide a sample SConstruct this happens with?
It's possible the error is in some command string you're passing.

And/or you're trying to run a binary which isn't in the default PATH set by
SCons, so you either need to copy the PATH from your shell and/or add the
path to
env['ENV']['PATH'] or use the full path to the tool


On Tue, Oct 9, 2018 at 10:57 AM Kristian Kinderlöv via Scons-users <
Hi all,
When I build I get the error from Scons: “No such file or directory”.
From the debugger I found out that the function exec_subprocess in
SCons/platform/posix.py get an exception from the subprocess.Popen call,
see below. The same build system work fine on an Arch Linux or MSYS. So
something with the combination of Ubuntu and SCons causes this problem.
Has anyone experience the same problem and/or have an solution for this?

.
64 proc = subprocess.Popen(l, env = env, close_fds = True)
65 return proc.wait()


/usr/lib/python2.7/subprocess.py(929)_execute_child()
(Pdb) r
--Return--
/usr/lib/python2.7/subprocess.py(1047)_execute_child()->None
-> raise child_exception
(Pdb) r
OSError: OSError(...rectory')
/usr/lib/python2.7/subprocess.py(394)__init__()
-> errread, errwrite)
v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668,
- Version of Python : Python 2.7.15rc1
- Platform Ubuntu 18.04
The information in this email may be confidential and/or legally
privileged. It has been sent for the sole use of the intended recipient(s).
If you are not an intended recipient, you are strictly prohibited from
reading, disclosing, distributing, copying or using this email or any of
its contents, in any way whatsoever. If you have received this email in
error, please contact the sender by reply email and destroy all copies of
the original message. Please also be advised that emails are not a secure
form for communication, and may contain errors.
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
Mats Wichmann
2018-10-09 19:35:24 UTC
Permalink
Post by Bill Deegan
Can you provide a sample SConstruct this happens with?
It's possible the error is in some command string you're passing.
And/or you're trying to run a binary which isn't in the default PATH set by
SCons, so you either need to copy the PATH from your shell and/or add the
path to
env['ENV']['PATH'] or use the full path to the tool
When I build I get the error from Scons: “No such file or directory”.
From the debugger I found out that the function exec_subprocess in
SCons/platform/posix.py get an exception from the subprocess.Popen call,
see below. The same build system work fine on an Arch Linux or MSYS. So
something with the combination of Ubuntu and SCons causes this problem.
Has anyone experience the same problem and/or have an solution for this?
….
64 proc = subprocess.Popen(l, env = env, close_fds = True)
65 return proc.wait()
near as I can tell, this function is _only_ called from subprocess_spawn
like this:

def subprocess_spawn(sh, escape, cmd, args, env):
return exec_subprocess([sh, '-c', ' '.join(args)], env)


which is in turn set up by default this way:

SHELL: 'sh'
SPAWN: <function subprocess_spawn at 0x7f7fe858c158>


Is there any chance you've reset SHELL in your environment? To something
that is not found on your Ubuntu system? An example would indeed be good.
Mats Wichmann
2018-10-10 13:50:57 UTC
Permalink
Hi,
I've attached an example. Extract the file with "tar -zxvf my_project.tar.gz" and "cd" to my_project.
./build/scons_wrapper.sh CONFIG=config/config-posix-debug.cfg TOOLCHAIN=posix-gcc hello
Funkar inte :)

it seems to expect more setup than you sent along as it gets git errors

fatal: Not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
ll /bin/sh
lrwxrwxrwx 1 root root 9 Oct 3 09:49 /bin/sh -> /bin/dash*
(I tried also to changed "sh" to point to bash instead but that gave the same problem)
Br
Kristian
I didn't mean the system's idea of 'sh' (I know Ubuntu makes that dash),
but scons' idea of the construction variable SHELL. However, I can grep
through what you sent and see nothing touches that.
Bill Deegan
2018-10-10 16:43:26 UTC
Permalink
Ideally you'd send a single SConstruct file to demonstrate, rather than
tyring to extract some subset of your non-trivial build system.
Hi,
I've attached an example. Extract the file with "tar -zxvf
my_project.tar.gz" and "cd" to my_project.
./build/scons_wrapper.sh CONFIG=config/config-posix-debug.cfg
TOOLCHAIN=posix-gcc hello
Funkar inte :)
it seems to expect more setup than you sent along as it gets git errors
fatal: Not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
ll /bin/sh
lrwxrwxrwx 1 root root 9 Oct 3 09:49 /bin/sh -> /bin/dash*
(I tried also to changed "sh" to point to bash instead but that gave the
same problem)
Br
Kristian
I didn't mean the system's idea of 'sh' (I know Ubuntu makes that dash),
but scons' idea of the construction variable SHELL. However, I can grep
through what you sent and see nothing touches that.
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
Bill Deegan
2018-10-11 16:46:59 UTC
Permalink
Doesn't work.
Trying to import project.

Please make a single file to demonstrate the issue. And double check it can
be run outside your build tree.


On Thu, Oct 11, 2018 at 9:21 AM Kristian Kinderlöv via Scons-users <
Hi again,
I’ve removed the git repo check in the attached file, so hopefully it works now for you. I agree that a more simple example would be better and I’ve tried that but without getting the error/problem. Maybe the “spawn” wasn’t called in that example.
*Skickat:* den 10 oktober 2018 18:43
*Ämne:* Re: [Scons-users] VB: SCons fails to build
Ideally you'd send a single SConstruct file to demonstrate, rather than
tyring to extract some subset of your non-trivial build system.
Hi,
I've attached an example. Extract the file with "tar -zxvf
my_project.tar.gz" and "cd" to my_project.
./build/scons_wrapper.sh CONFIG=config/config-posix-debug.cfg
TOOLCHAIN=posix-gcc hello
Funkar inte :)
it seems to expect more setup than you sent along as it gets git errors
fatal: Not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
ll /bin/sh
lrwxrwxrwx 1 root root 9 Oct 3 09:49 /bin/sh -> /bin/dash*
(I tried also to changed "sh" to point to bash instead but that gave the
same problem)
Br
Kristian
I didn't mean the system's idea of 'sh' (I know Ubuntu makes that dash),
but scons' idea of the construction variable SHELL. However, I can grep
through what you sent and see nothing touches that.
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
The information in this email may be confidential and/or legally
privileged. It has been sent for the sole use of the intended recipient(s).
If you are not an intended recipient, you are strictly prohibited from
reading, disclosing, distributing, copying or using this email or any of
its contents, in any way whatsoever. If you have received this email in
error, please contact the sender by reply email and destroy all copies of
the original message. Please also be advised that emails are not a secure
form for communication, and may contain errors.
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
Bill Deegan
2018-10-12 13:48:26 UTC
Permalink
You have
import project
in your top level SConstruct.

That's not a scons or python module.
You either have it in your site_scons, or in your python tree.
Thus we cannot use your example.

-Bill

On Fri, Oct 12, 2018 at 2:55 AM Kristian Kinderlöv <
Strange that it doesn’t work. I’ve double check and for me it run outside
my build tree. There are some prerequisites: gcc, scons, python, linux. Did
you get any debug/error logs? As I mentioned before I haven’t managed to
get the problem with a simple example, but I can give that one more try.
./build/scons_wrapper.sh CONFIG=config/config-posix-debug.cfg
TOOLCHAIN=posix-gcc hello
NOTE: Compiling with gcc 7 found in /usr/bin
gcc
_output/hello/host/config-posix-debug/posix-gcc/applications/hello/hello_main.o
scons: ***
[_output/hello/host/config-posix-debug/posix-gcc/applications/hello/hello_main.o]
No such file or directory
./build/scons_wrapper.sh CONFIG=config/config-posix-debug.cfg
TOOLCHAIN=posix-gcc hello NOTE: Compiling with gcc 7.2.1 found in /usr/bin
gcc
_output/hello/host/config-posix-debug/posix-gcc/applications/hello/hello_main.o
gcc
_output/hello/host/config-posix-debug/posix-gcc/applications/hello/hello
size
_output/hello/host/config-posix-debug/posix-gcc/applications/hello/hello >
_output/hello/host/config-posix-debug/posix-gcc/applications/hello/hello.size
objdump -d
_output/hello/host/config-posix-debug/posix-gcc/applications/hello/hello >
_output/hello/host/config-posix-debug/posix-gcc/applications/hello/hello.lst
"_output/hello/host/config-posix-debug/posix-gcc/applications/hello/hello.size"
as "_output/hello/host/config-posix-debug/posix-gcc/hello.size"
"_output/hello/host/config-posix-debug/posix-gcc/applications/hello/hello.lst"
as "_output/hello/host/config-posix-debug/posix-gcc/hello.lst"
"_output/hello/host/config-posix-debug/posix-gcc/applications/hello/hello"
as "_output/hello/host/config-posix-debug/posix-gcc/bin/hello"
*Skickat:* den 11 oktober 2018 18:47
*Ämne:* Re: [Scons-users] VB: SCons fails to build
Doesn't work.
Trying to import project.
Please make a single file to demonstrate the issue. And double check it
can be run outside your build tree.
On Thu, Oct 11, 2018 at 9:21 AM Kristian Kinderlöv via Scons-users <
Hi again,
I’ve removed the git repo check in the attached file, so hopefully it works now for you. I agree that a more simple example would be better and I’ve tried that but without getting the error/problem. Maybe the “spawn” wasn’t called in that example.
*Skickat:* den 10 oktober 2018 18:43
*Ämne:* Re: [Scons-users] VB: SCons fails to build
Ideally you'd send a single SConstruct file to demonstrate, rather than
tyring to extract some subset of your non-trivial build system.
Hi,
I've attached an example. Extract the file with "tar -zxvf
my_project.tar.gz" and "cd" to my_project.
./build/scons_wrapper.sh CONFIG=config/config-posix-debug.cfg
TOOLCHAIN=posix-gcc hello
Funkar inte :)
it seems to expect more setup than you sent along as it gets git errors
fatal: Not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
ll /bin/sh
lrwxrwxrwx 1 root root 9 Oct 3 09:49 /bin/sh -> /bin/dash*
(I tried also to changed "sh" to point to bash instead but that gave the
same problem)
Br
Kristian
I didn't mean the system's idea of 'sh' (I know Ubuntu makes that dash),
but scons' idea of the construction variable SHELL. However, I can grep
through what you sent and see nothing touches that.
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
The information in this email may be confidential and/or legally
privileged. It has been sent for the sole use of the intended recipient(s).
If you are not an intended recipient, you are strictly prohibited from
reading, disclosing, distributing, copying or using this email or any of
its contents, in any way whatsoever. If you have received this email in
error, please contact the sender by reply email and destroy all copies of
the original message. Please also be advised that emails are not a secure
form for communication, and may contain errors.
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
The information in this email may be confidential and/or legally
privileged. It has been sent for the sole use of the intended recipient(s).
If you are not an intended recipient, you are strictly prohibited from
reading, disclosing, distributing, copying or using this email or any of
its contents, in any way whatsoever. If you have received this email in
error, please contact the sender by reply email and destroy all copies of
the original message. Please also be advised that emails are not a secure
form for communication, and may contain errors.
Loading...