-
Notifications
You must be signed in to change notification settings - Fork 35
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
Futures: Fix SWIG compilation #17
Comments
without -g (debug) flag it compiles but does not link (lot of member is not an ELF obj errors) |
I've got some more information about this issue, but it pertains to adding back the Note that I have not tested that this solution works, but I have tested to make sure that it will compile and link successfully. Code ApproachThe first approach I took was to try and update the Hack ApproachWhen compiling the In order to test adequately, I copied the breaking compile arguments so I could execute the compile directly. For my machine, it was this:
The idea is that I would be able to redirect the output into the Because the above is somewhat difficult to explain, here's a short video of the process: Capturing the SWIG Compile Output Once I had this output, I attempted to run the next step on it:
This generated the following errors:
The line at the first error looks like this:
When I searched for uses of The next error was a lot more obvious. The beginning of the With a successfully generated
Note that this new build step just omits the Then I ran
I returned back to the
to this:
Then I used
Then I replaced the broken This time, the swig build made it all the way to the end:
AftermathLike I said before, I have no idea if this is a solution at all. In fact, I'd probably guess that there's about a 90% chance it will fail. Mostly, because when the The real solution is fixing the SWIG code generation such that it actually compiles. This hack approach I took was simply to expose potential solutions. However, I'm out of ideas right now concerning the "correct" way to move forward. My experience with Clang, LLVM, and SWIG is limited. File AttachmentsAll of the files I've referenced in this comment are zipped and located here: swig_as3_out.zip
|
Thanks for the post, I have a few ideas to try out:
|
clang version 3.2 (tags/RELEASE_32/final)
Target: avm2-unknown-freebsd8
Thread model: posix
"/cygdrive/f/crossbridge/sdk/usr/platform/cygwin/bin/clang++" -cc1 -triple avm2-unknown-freebsd8 -S
-disable-free -disable-llvm-verifier -main-file-name as3.cxx -mrelocation-model static -mdisable-fp
-elim -fmath-errno -momit-leaf-frame-pointer -v -g -coverage-file /tmp/as3-XJf3sY.s -resource-dir /c
ygdrive/f/crossbridge/sdk/usr/platform/cygwin/bin/../lib/clang/3.2 -dependency-file Modules/.deps/as
3.Tpo -sys-header-deps -MP -MT Modules/as3.o -D HAVE_CONFIG_H -D PCRE_STATIC -D __STDC_LIMIT_MACROS
-D __STDC_CONSTANT_MACROS -I ../Source/Include -I ../Source/CParse -I /cygdrive/f/crossbridge/swig-3
.0.0/Source/Include -I /cygdrive/f/crossbridge/swig-3.0.0/Source/DOH -I /cygdrive/f/crossbridge/swig
-3.0.0/Source/CParse -I /cygdrive/f/crossbridge/swig-3.0.0/Source/Preprocessor -I /cygdrive/f/crossb
ridge/swig-3.0.0/Source/Swig -I /cygdrive/f/crossbridge/swig-3.0.0/Source/Modules -I /cygdrive/f/cro
ssbridge/build/win/swig/pcre/pcre-swig-install/include -I /cygdrive/f/crossbridge/avm2_env/misc/ -I
/cygdrive/f/crossbridge/llvm-3.2/include -I /cygdrive/f/crossbridge/build/win/llvm-debug/include -I
/cygdrive/f/crossbridge/llvm-3.2/tools/clang/include -I /cygdrive/f/crossbridge/build/win/llvm-debug
/tools/clang/include -I /cygdrive/f/crossbridge/llvm-3.2/tools/clang/lib -isysroot /cygdrive/f/cross
bridge/sdk/usr/bin/../.. -fmodule-cache-path /var/tmp/clang-module-cache -Wno-long-long -fdeprecated
-macro -fno-dwarf-directory-asm -fdebug-compilation-dir /cygdrive/f/crossbridge/build/win/swig/Sourc
e -ferror-limit 19 -fmessage-length 100 -mstackrealign -fno-rtti -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fsjlj-exceptions -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/as3-XJf3sY.s -
x c++ /cygdrive/f/crossbridge/swig-3.0.0/Source/Modules/as3.cxx
clang -cc1 version 3.2 based upon LLVM 3.2svn default target avm2-unknown-freebsd8
include "..." search starts here:
include <...> search starts here:
../Source/Include
../Source/CParse
/cygdrive/f/crossbridge/swig-3.0.0/Source/Include
/cygdrive/f/crossbridge/swig-3.0.0/Source/DOH
/cygdrive/f/crossbridge/swig-3.0.0/Source/CParse
/cygdrive/f/crossbridge/swig-3.0.0/Source/Preprocessor
/cygdrive/f/crossbridge/swig-3.0.0/Source/Swig
/cygdrive/f/crossbridge/swig-3.0.0/Source/Modules
/cygdrive/f/crossbridge/build/win/swig/pcre/pcre-swig-install/include
/cygdrive/f/crossbridge/avm2_env/misc
/cygdrive/f/crossbridge/llvm-3.2/include
/cygdrive/f/crossbridge/build/win/llvm-debug/include
/cygdrive/f/crossbridge/llvm-3.2/tools/clang/include
/cygdrive/f/crossbridge/build/win/llvm-debug/tools/clang/include
/cygdrive/f/crossbridge/llvm-3.2/tools/clang/lib
/cygdrive/f/crossbridge/sdk/usr/bin/../../usr/include/c++/v1
/cygdrive/f/crossbridge/sdk/usr/platform/cygwin/bin/../lib/clang/3.2/include
/cygdrive/f/crossbridge/sdk/usr/bin/../../usr/include
End of search list.
Stack dump:
0. Program arguments: /cygdrive/f/crossbridge/sdk/usr/platform/cygwin/bin/clang++ -cc1 -triple
avm2-unknown-freebsd8 -S -disable-free -disable-llvm-verifier -main-file-name as3.cxx -mrelocation-m
odel static -mdisable-fp-elim -fmath-errno -momit-leaf-frame-pointer -v -g -coverage-file /tmp/as3-X
Jf3sY.s -resource-dir /cygdrive/f/crossbridge/sdk/usr/platform/cygwin/bin/../lib/clang/3.2 -dependen
cy-file Modules/.deps/as3.Tpo -sys-header-deps -MP -MT Modules/as3.o -D HAVE_CONFIG_H -D PCRE_STATIC
-D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -I ../Source/Include -I ../Source/CParse -I /cygdr
ive/f/crossbridge/swig-3.0.0/Source/Include -I /cygdrive/f/crossbridge/swig-3.0.0/Source/DOH -I /cyg
drive/f/crossbridge/swig-3.0.0/Source/CParse -I /cygdrive/f/crossbridge/swig-3.0.0/Source/Preprocess
or -I /cygdrive/f/crossbridge/swig-3.0.0/Source/Swig -I /cygdrive/f/crossbridge/swig-3.0.0/Source/Mo
dules -I /cygdrive/f/crossbridge/build/win/swig/pcre/pcre-swig-install/include -I /cygdrive/f/crossb
ridge/avm2_env/misc/ -I /cygdrive/f/crossbridge/llvm-3.2/include -I /cygdrive/f/crossbridge/build/wi
n/llvm-debug/include -I /cygdrive/f/crossbridge/llvm-3.2/tools/clang/include -I /cygdrive/f/crossbri
dge/build/win/llvm-debug/tools/clang/include -I /cygdrive/f/crossbridge/llvm-3.2/tools/clang/lib -is
ysroot /cygdrive/f/crossbridge/sdk/usr/bin/../.. -fmodule-cache-path /var/tmp/clang-module-cache -Wn
o-long-long -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir /cygdrive/f/crossbri
dge/build/win/swig/Source -ferror-limit 19 -fmessage-length 100 -mstackrealign -fno-rtti -fobjc-runt
ime=gcc -fcxx-exceptions -fexceptions -fsjlj-exceptions -fdiagnostics-show-option -fcolor-diagnostic
s -o /tmp/as3-XJf3sY.s -x c++ /cygdrive/f/crossbridge/swig-3.0.0/Source/Modules/as3.cxx
dules/as3.cxx'.
4. Running pass 'AVM2 Assembly Printer' on function '@_ZN5clang19PreprocessorOptionsC2Ev'
clang++: error: unable to execute command: Aborted
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.2 (tags/RELEASE_32/final)
Target: avm2-unknown-freebsd8
Thread model: posix
clang++: note: diagnostic msg: PLEASE submit a bug report to and include the crash backtrace, prepr
ocessed source, and associated run script.
clang++: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/as3-pbefT3.cpp
clang++: note: diagnostic msg: /tmp/as3-pbefT3.sh
clang++: note: diagnostic msg:
https://dl.dropboxusercontent.com/u/1375050/cb_swig_log.zip
The text was updated successfully, but these errors were encountered: