Open stopiccot opened 11 years ago
Yes, libc++ is not ready now. There's still plenty of work including libc upgrading.
Libc upgrading is roughly done. Wish libc++ to be done soon.
Any progress with libc++?
Oh, I am a little over-optimistic. So let code in first.
Hi. Just tested commit e6b4dfe3594d843266994fda5183fae6dc3332bb. I'm getting a few errors. First one occurs while building stdlibs target:
/Users/stopiccot/code/flash/crossbridge/build/mac/libthr/libthr/thread/thr_exit.c:110:1: error: conflicting types for '_Unwind_GetCFA'
_Unwind_GetCFA(struct _Unwind_Context *context)
which can be fixed obviously. The second occurs while building as3wig target and seems to be more complex:
In file included from AS3Wig.cpp:22:
In file included from /Users/stopiccot/code/flash/crossbridge/sdk/usr/bin/../../usr/include/AS3++/AS3Wig.h:23:
In file included from /Users/stopiccot/code/flash/crossbridge/sdk/usr/bin/../../usr/include/AS3/AS3++.h:16:
In file included from /Users/stopiccot/code/flash/crossbridge/sdk/usr/bin/../../usr/include/c++/4.2/string:56:
In file included from /Users/stopiccot/code/flash/crossbridge/sdk/usr/bin/../../usr/include/c++/4.2/algorithm:67:
/Users/stopiccot/code/flash/crossbridge/sdk/usr/bin/../../usr/include/c++/4.2/bits/stl_algo.h:1985:40: error: no member named 'rand' in namespace 'std'
std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1)));
~~~~~^
It seems that despite we should use libc++, gcc 4.2 headers are somehow getting into compilation which is obviously incorrect. Looking forward for your response.
Hi. Just tested commit 37b738b627a4a90fbf2816587a722f2e5e82b6d3. I've changed my main.cpp to:
#include <iostream>
int main() {
std::cout << "crossbridge test" << std::endl;
return 0;
}
It compiled fine using command line:
$ .../crossbridge/sdk/usr/bin/clang++ ./main.cpp -emit-swf -o ~/test.swf
It's already a good milestone :) But generated swf crashes on startup. Here is what I have in my flashlog.txt:
Error
at global/C_Run::F__sync_val_compare_and_swap_1()
at global/C_Run::F__ZNSt3__16locale8__globalEv()
at global/C_Run::F__ZNSt3__110__stdinbufIcEC2EP7__sFILEP11__mbstate_t()
at global/C_Run::F__ZNSt3__18ios_base4InitC2Ev()
at global/C_Run__2F_var_2F_folders_2F_gy_2F_5rs8cgt96sj_1bf1qxcpqmtw0000gn_2F_T_2F__2F_sK9QJI_2E_lto_2E_bc_3A_6F0C363B_2D_EC8B_2D_439B_2D_86C8_2D_8F DFED6DCB03::F__GLOBAL__I_a()
at com.adobe.flascc::CModule$/callI()
at com.adobe.flascc::CModule/runCtors()
at com.adobe.flascc::CModule$/runCtors()
at global/C_Run::F__init()
at global/C_Run::F__start1()
at com.adobe.flascc::CModule$/callI()
at com.adobe.flascc::CModule$/start()
at com.adobe.flascc::CModule$/startAsync()
at com.adobe.flascc::Console/init()
at com.adobe.flascc::Console()
at com.adobe.flascc.preloader::DefaultPreloader/onPreloaderComplete()
FlasCC does not support CAS on a non-32bit values..
Thanks. Known issue.
A minor fix is uploaded. Hope it works all the time.
What toolchain/OS combo do you use guys to get the futures branch "working" ?
@rtissera Mac OS X Lion 10.7.5 (11G63b) + Xcode Version 4.6.3 (4H1503). Also major parts are also working in Cygwin.
Hi. Recent commits to futures branch made it workable for simple test programs that use C++11 features. So I decided to test our project. I'm getting a lot of weird link time errors:
error: z: no archive symbol table (run ranlib)
error: LLVM gold plugin has failed to create LTO module: Invalid MODULE_CODE_GLOBALVAR record
error: SDL: member at 7992 is not an ELF object
error: LLVM gold plugin has failed to create LTO module: Invalid MODULE_CODE_GLOBALVAR record
error: SDL: member at 286344 is not an ELF object
error: LLVM gold plugin has failed to create LTO module: Invalid MODULE_CODE_GLOBALVAR record
error: SDL: member at 289732 is not an ELF object
error: LLVM gold plugin has failed to create LTO module: Invalid MODULE_CODE_GLOBALVAR record
error: SDL: member at 340280 is not an ELF object
error: LLVM gold plugin has failed to create LTO module: Invalid MODULE_CODE_GLOBALVAR record
error: SDL: member at 371328 is not an ELF object
error: LLVM gold plugin has failed to create LTO module: Invalid MODULE_CODE_GLOBALVAR record
error: SDL: member at 389676 is not an ELF object
....
Do you have any idea what can be causing these errors?
It's better for me :) I just missed the following symbols at link time :
_powl openat fstatat
Seems missing from libc.a :(
2013/10/17 Alexey notifications@github.com
Hi. Recent commits to futures branch made it workable for simple test programs that use C++11 features. So I decided to test our project. I'm getting a lot of weird link time errors:
error: z: no archive symbol table (run ranlib) error: LLVM gold plugin has failed to create LTO module: Invalid MODULE_CODE_GLOBALVAR record error: SDL: member at 7992 is not an ELF object error: LLVM gold plugin has failed to create LTO module: Invalid MODULE_CODE_GLOBALVAR record error: SDL: member at 286344 is not an ELF object error: LLVM gold plugin has failed to create LTO module: Invalid MODULE_CODE_GLOBALVAR record error: SDL: member at 289732 is not an ELF object error: LLVM gold plugin has failed to create LTO module: Invalid MODULE_CODE_GLOBALVAR record error: SDL: member at 340280 is not an ELF object error: LLVM gold plugin has failed to create LTO module: Invalid MODULE_CODE_GLOBALVAR record error: SDL: member at 371328 is not an ELF object error: LLVM gold plugin has failed to create LTO module: Invalid MODULE_CODE_GLOBALVAR record error: SDL: member at 389676 is not an ELF object ....
Do you have any idea what can be causing these errors?
— Reply to this email directly or view it on GitHubhttps://github.com/adobe-flash/crossbridge/issues/14#issuecomment-26532495 .
@stopiccot Did you use the file made by previous version of LLVM? You may take a look at line 384 at llvm-3.2/tools/gold/gold-plugin.cpp.
@rtissera powl, make it an alias of pow. openat is in thread lib. fstatat, you should not rely on such APIs, otherwise have to implement yourself. Image that how can you access the real file system in Flash Player?
Not using openat neither fstatat directly in my code, it seems to be called by some underneath library or API hidden by Crossbridge. Using ZipBackingStore VFS btw, maybe the source of the issue ?
@cbakgly Yes, you are right. There were some mess with libs compiled by master branch version of crossbridge. I've tried to recompile dependencies (https://github.com/alexmac/alcextra) using newer crossbridge:
libtool: link: ranlib build/.libs/libSDL_mixer.a
bfd plugin: Failed to create LLVM module: Unknown bitstream version!
ld: warning: ignoring file build/.libs/libSDL_mixer.a, file was built for archive which is not the architecture being linked (x86_64): build/.libs/libSDL_mixer.a
ld: file too small for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've also compiled our project once again (but with libSDL_mixer disabled). This time it compiled and linked successfully. But when I try to run it using Flash Player Debugger 11.2.202.228 it fails on printf() call:
ReferenceError: Error #1065: Variable F_puts is not defined.
I have no idea why it is happening because simple test programs (int main() with just one printf()) wok fine for me. Any ideas what can be causing this issue?
@stopiccot I feel that they both are version-mixed issues. 1st, like a different LLVM bitcode version. Just note that LLVM bitcode is not completely compatible. So a file from 2.9 should not be used to link with 3.2. 2nd, I think you used a bitcode file gen'ed from 2.9 compiler, and use it with 3.2 compiler. Because with previous one, 'put' will be converted later into some function; but in 3.2 "printf" just keeps its name. For this part I don't remember clearly. Hope I am right.
@rtissera Hmm, maybe you are right. Does Crossbridge has a ZipBackingStore?
ZipBackingStore is a custom alcextra class based on InMemoryBackingStore
2013/10/21 Ye Liu notifications@github.com
@rtissera https://github.com/rtissera Hmm, maybe you are right. Does Crossbridge has a ZipBackingStore?
— Reply to this email directly or view it on GitHubhttps://github.com/adobe-flash/crossbridge/issues/14#issuecomment-26699093 .
Oh yes, but guess he won't update anymore :(
If anyone wants commit access to the various alc* repos on my github page just send me a pull request, having a futures branch for each of them would be great but I probably won't have time to keep them up to date myself
Simple hello world application
Compilation