-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BuildInfoCollector.py does not gather any information and fails #44
Comments
A clarification to my command line. It contains a target: |
Hi, Could you please describe your development environment regarding the used compiler, version, etc.? Then, could you please add a break point like follows and inspect the
It seams to be Best regards, |
Hi, I changed the default "get_start_nodes": def get_start_nodes():
return (SCons.Script.Alias(SCons.Script.BUILD_TARGETS)
if has_build_targets() else [SCons.Script.Dir('.')]) to this version: def get_start_nodes():
return (SCons.Script.Alias(SCons.Script.File(SCons.Script.BUILD_TARGETS))
if has_build_targets() else [SCons.Script.Dir('.')]) As I understand, it fixed the issue. At least, there is no failure and script prints some info about my project. The build_target in my case is a file. I am not sure that my solution is general. Regarding your comment. Can you specify where exactly I need to put your code? Regards, |
In addition, can you say where BuildInfoCollector.py is located? I would like to change it in order to use in Eclipse. |
Hi, any updates? |
Hi, Please excuse my late answer. The place to put the break point is here: You can just copy that file to your project directory and then execute
Hope that helps. Best regards, |
Hi Michael, The node.has_builder() return False in my case, as you can see from the prints in my first message. Therefore, the breakpoint has to be set a line above you specified (I set it before the line 206, e.g., before has_builder() check). My command line is: /usr/bin/scons/2.5.0/bin/scons project_folder/binary_name COMP=gcc -u -f SConstruct -f BuildInfoCollector.py The environment is Null (Pdb) print (environ)
Null(0x011535D0)
(Pdb) type (environ)
<class 'SCons.Executor.NullEnvironment'>
(Pdb) print(node)
project_folder/binary_name
(Pdb) p node
<SCons.Node.Alias.Alias object at 0x7823680>
(Pdb) print(snode)
project_folder/binary_name
(Pdb) p snode
<SCons.Node.Alias.Alias object at 0x7823680>
(Pdb) continue and then the script fails, as the next node is Null and collect_build_infos returns Null results. If I change the method get_start_nodes() to: def get_start_nodes():
return (SCons.Script.Alias(SCons.Script.File(SCons.Script.BUILD_TARGETS))
if has_build_targets() else [SCons.Script.Dir('.')]) The inspection will show the following: Pdb) print (environ)
Null(0x011535D0)
(Pdb) print (node)
project_folder/subfolder/cpp_file.cc
(Pdb) p node
<SCons.Node.FS.File object at 0x5c73470>
(Pdb) print (snode)
project_folder/binary_name
(Pdb) p snode
<SCons.Node.FS.File object at 0x5dd9da0>
(Pdb) continue
-> import pdb; pdb.set_trace()
(Pdb) print (environ)
<SCons.Script.SConscript.SConsEnvironment object at 0x5b57110>
(Pdb) print (node)
project_folder/subfolder/cpp_file.o
(Pdb) p node
<SCons.Node.FS.Entry object at 0x5bfc770>
(Pdb) print (snode)
project_folder/binary_name
(Pdb) p snode
<SCons.Node.FS.File object at 0x5dd9da0> ...and so on, for all the files of the target. |
Hi, Regards, |
Hi,
Adding
BuildInfoCollector.py
to my scons command line leads to a failure.Without
BuildInfoCollector.py
everything works well.As I understand the problem is in the method
collect_build_infos
(prints were added by me):
The output of my prints:
I do not familiar with SCons too much, so I do not know what exactly is going on here.
As I understand, the nodes were not parsed correctly.
Can you please look at this issue?
Regards,
Alexander
The text was updated successfully, but these errors were encountered: