Opened 7 years ago
Closed 7 years ago
#1491 closed enhancement (fixed)
bundleinfo.xml tag for compiling executables
| Reported by: | Eric Pettersen | Owned by: | Conrad Huang |
|---|---|---|---|
| Priority: | blocker | Milestone: | |
| Component: | Build System | Version: | 0.9 |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
Analogous to the CModule tag, I would like a CExecutable flag (or some such) for compiling executables from simple C or C++ sources. This would be used to compile AL2CO.
Change History (10)
comment:1 by , 7 years ago
| Type: | defect → enhancement |
|---|
comment:2 by , 7 years ago
| Status: | assigned → feedback |
|---|
comment:3 by , 7 years ago
I tried to add a compile argument with:
<CompileArgument platform="mac">-Wno-logical-op-parentheses</CompileArgument>
but it didn't seem to "take"; the warnings that should have been suppressed weren't...
comment:4 by , 7 years ago
In a related issue, for a package compiling an executable, should bundle_info.xml set purePython to false? The test bundle doesn't...
comment:5 by , 7 years ago
Did "-Wno-logical-op-parentheses" show up in the compile line when building the bundle?
You should not need to set the purePython flag because bundle_builder knows that bundles with CModule, CLibrary or CExecutable tags are automatically "impure".
comment:6 by , 7 years ago
The code has been changed to use the C++ linker if there are .cpp source files, so you should no longer need the "-lstdc++" lines.
comment:7 by , 7 years ago
I do not see the flag in the generated compile line. In addition there is a new error:
Executing: devel install . user false exit true
C compiler: clang -pipe -I/Users/pett/src/chimerax/build/include -L/Users/pett/src/chimerax/build/lib -DUSE_DYLD_GLOBAL_NAMESPACE -fno-strict-aliasing -Wsign-compare -Wunreachable-code -fno-common -dynamic -F/Users/pett/src/chimerax/build/Library/Frameworks -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
compile options: '-DDYNAMIC_LIBRARY=1 -I/Users/pett/src/chimerax/src/bundles/alignment_hdrs/../../../ChimeraX.app/Contents/include -I/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c'
clang: al2co/al2co.c
clang: warning: argument unused during compilation: '-L/Users/pett/src/chimerax/build/lib' [-Wunused-command-line-argument]
| ' [-Wlogical-op-parentheses] |
| flag==3 && c=='\n'){ |
al2co/al2co.c:568:18: note: place parentheses around the '&&' expression to silence this warning
| flag==3 && c=='\n'){ |
( )
| ' [-Wlogical-op-parentheses] |
| flag==3 && c=='\n'){ |
~
al2co/al2co.c:568:39: note: place parentheses around the '&&' expression to silence this warning
| flag==3 && c=='\n'){ |
( )
2 warnings generated.
Traceback (most recent call last):
File "/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/commands/devel.py", line 151, in _run
unbound_method(bb, *args, kw)
File "/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/bundle_builder/bundle_builder.py", line 85, in make_install
self.make_wheel(test=test, debug=debug)
File "/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/bundle_builder/bundle_builder.py", line 71, in make_wheel
executable.compile(self.logger, self.dependencies, debug=debug)
File "/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/bundle_builder/bundle_builder.py", line 889, in compile
target_lang=self.target_lang,
AttributeError: '_CExecutable' object has no attribute 'target_lang'
comment:8 by , 7 years ago
Can you please pull (bundle_builder.py) and try again?
target_lang was not initialized and did not work for non-C++ (i.e., C) code.
CompileArgument was only used to build Python extensions and not libraries or executables.
Both fixed and changes committed.
comment:10 by , 7 years ago
| Resolution: | → fixed |
|---|---|
| Status: | feedback → closed |
It's more analogous to CLibrary and it should be available in the daily builds tomorrow.
src/bundles/testcontains an example. Let me know of any problems.