adobe-flash / crossbridge

Welcome to visit the homepage!
http://www.crossbridge.io
542 stars 194 forks source link

Failing to build (futures, llvm 3.2) #5

Closed stopiccot closed 11 years ago

stopiccot commented 11 years ago

Sorry for another one but I really need that C++11 features). As was suggested in issue #2 I replaced 2.9 with 3.2 in root makefile. I've got many errors in gcc target but it is probably not supposed to build with 3.2 anyways, so I've removed it from build. Next target to fail was stdlibs with error:

/Users/stopiccot/code/flash/crossbridge/sdk/usr/bin/clang -emit-llvm -DSTRIP_FBSDID -O2 -pipe  -I/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/csu/avm2/../common  -I/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/csu/avm2/../../libc/include -std=gnu99  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c crt1_c.c
In file included from crt1_c.c:35:
/Users/stopiccot/code/flash/crossbridge/sdk/usr/include/stdlib.h:90:7: error: incompatible redeclaration of library function 'calloc' [-Werror]
void    *calloc(size_t, size_t) __malloc_like;
         ^
/Users/stopiccot/code/flash/crossbridge/sdk/usr/include/stdlib.h:90:7: note: 'calloc' is a builtin with type 'void *(unsigned long, unsigned long)'
/Users/stopiccot/code/flash/crossbridge/sdk/usr/include/stdlib.h:97:7: error: incompatible redeclaration of library function 'malloc' [-Werror]
void    *malloc(size_t) __malloc_like;
         ^
/Users/stopiccot/code/flash/crossbridge/sdk/usr/include/stdlib.h:97:7: note: 'malloc' is a builtin with type 'void *(unsigned long)'
/Users/stopiccot/code/flash/crossbridge/sdk/usr/include/stdlib.h:104:7: error: incompatible redeclaration of library function 'realloc' [-Werror]
void    *realloc(void *, size_t);
         ^
/Users/stopiccot/code/flash/crossbridge/sdk/usr/include/stdlib.h:104:7: note: 'realloc' is a builtin with type 'void *(void *, unsigned long)'
In file included from crt1_c.c:38:
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/csu/avm2/../common/crtbrand.c:46:35: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment and section separated by a comma
} abitag __attribute__ ((section (ABI_SECTION), aligned(4))) __used = {
                                  ^
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/csu/avm2/../common/crtbrand.c:32:21: note: expanded from macro 'ABI_SECTION'
#define ABI_SECTION     ".note.ABI-tag"
                        ^
4 errors generated.
*** Error code 1

Stop.
bmake: stopped in /Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/csu/avm2
make[3]: *** [csu] Error 1
make[2]: *** [stdlibs] Error 2
cbakgly commented 11 years ago

Search for "BMAKE" in Makefile and append NO_WERROR=true to avoid those warnings. Well, again have to say besides the libs problem, the compiler is not fully workable, and you just can't get it work quickly also. :( I've made a little changes in Makefile, please check it.