-
Notifications
You must be signed in to change notification settings - Fork 123
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
Build artificial samples with scons instead of make #16
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks much better than the old makefile!
But when running scons I get an error
scons: Reading SConscript files ...
Building for architecture x64
AttributeError: 'module' object has no attribute 'which':
File "[...]/cwe_checker/test/artificial_samples/SConstruct", line 71:
build_c(arch)
File "[...]/cwe_checker/test/artificial_samples/SConstruct", line 42:
if shutil.which(c_compilers[arch]) is not None:
so right now scons doesn't build anything on my computer.
test/artificial_samples/SConstruct
Outdated
env = Environment(CC = c_compilers[arch], | ||
CCFLAGS = c_flags[arch] + optimize(str(p))) | ||
env.Program('build/%s_%s.out' % (str(p).split('.')[0], arch), 'build/%s' % str(p)) | ||
# TODO: call execstack -s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a test right now that depends on the call of execstack?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe none, I do not know why it was there in the first place.
Scons3 does not work properly on Ubuntu 16.04/18.04, but on current Fedora. So switching to scons2 (pip install --user scons). Now it should compile all binaries. |
This PR exchanges make with scons. This makes building the artificial samples painless!!!