Compile Error For cocos2dx3.10 android - compilation

Cocos2dx v3.10 facing some unusual error.in compiling andoird
Cocos :- 3.10
Mac :- 10.11.4 (OSX EL capitan)
NDK :- android-ndk-r9d
ANT :- apache-ant-1.9.6
Android NDK: WARNING: APP_PLATFORM android-15 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml    
make: Entering directory /Users/Game/Desktop/cocos2d-x-3.10/PROJECTS/GameName/proj.android'
[armeabi] Compile++ thumb: cocostudio_static <= WidgetReader.cpp
[armeabi] Compile++ thumb: cocostudio_static <= FlatBuffersSerialize.cpp
[armeabi] Compile++ thumb: cocostudio_static <= WidgetCallBackHandlerProtocol.cpp
[armeabi] Compile++ thumb: cocostudio_static <= CCComExtensionData.cpp
clang: error: unsupported option '--noexecstack'
clang: error: unsupported option '--noexecstack'
clang: error: unknown argument: '-meabi=5'
make: *** [obj/local/armeabi/objs-debug/cocostudio_static/CCComExtensionData.o] Error 1
make: *** Waiting for unfinished jobs….å
clang: error: unsupported option '--noexecstack'
clang: error: unsupported option '--noexecstack'
clang: error: unknown argument: '-meabi=5'
make: *** [obj/local/armeabi/objs-debug/cocostudio_static/WidgetCallBackHandlerProtocol.o] Error 1
clang: error: unsupported option '--noexecstack'
clang: error: unsupported option '--noexecstack'
clang: error: unknown argument: '-meabi=5'
make: *** [obj/local/armeabi/objs-debug/cocostudio_static/WidgetReader/WidgetReader.o] Error 1
clang: error: unsupported option '--noexecstack'
clang: error: unsupported option '--noexecstack'
clang: error: unknown argument: '-meabi=5'
make: *** [obj/local/armeabi/objs-debug/cocostudio_static/FlatBuffersSerialize.o] Error 1
make: Leaving directory/Users/Game/Desktop/cocos2d-x-3.10/PROJECTS/GameName/proj.android'
Error running command, return code: 2.

Try using the last versions of cocos2d-x and NDK, since they just added clang support recently: https://github.com/cocos2d/cocos2d-console/pull/350
It is stated that it was tested with NDK 12b

Related

Unable to compile library, symbol not found when running make

I am trying to compile a library, MultiNest. I am on Mac OS Catalina, 10.15.6. The instructions to do so are
git clone https://github.com/JohannesBuchner/MultiNest
cd MultiNest/build
cmake ..
make
I get this error when running make:
Undefined symbols for architecture x86_64:
"___nested_MOD_nestrun", referenced from:
_run in eggbox.c.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/eggboxC] Error 1
make[1]: *** [src/example_eggbox_C/CMakeFiles/eggboxC.dir/all] Error 2
make: *** [all] Error 2

Build PCL on macOS Sierra - Linking CXX shared library error: Undefined symbols for architecture x86_64

I'm trying to install PCL (Point Cloud Library) on my system with macOS Sierra following the instructions here: http://ns50.pointclouds.org/documentation/tutorials/compiling_pcl_macosx.php
I made it to the step "Building PCL" but receive the following error when running the "cmake .." command:
[ 10%] Linking CXX shared library ../lib/libpcl_io.dylib
Undefined symbols for architecture x86_64:
"boost::this_thread::hiden::sleep_until(timespec const&)", referenced from:
pcl::HDLGrabber::readPacketsFromPcap() in hdl_grabber.cpp.o
pcl::OpenNIGrabber::start() in openni_grabber.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[2]: *** [lib/libpcl_io.1.8.0.99.dylib] Error 1
make[1]: *** [io/CMakeFiles/pcl_io.dir/all] Error 2
make: *** [all] Error 2
Thanks for your help!

Error when brewing Qt 32 bits on OS X

When trying to install Qt on OSX (10.11) via homebrew with the --universal option
brew install qt --universal
I get the following error:
clang: error: invalid Xarch argument: '-Xarch_i386 -framework', options requiring arguments are unsupported
clang: error: invalid Xarch argument: '-Xarch_i386 -framework', options requiring arguments are unsupported
make[4]: *** [../../../../plugins/phonon_backend/libphonon_qt7.dylib] Error 1
make[3]: *** [release] Error 2
make[2]: *** [sub-qt7-make_default] Error 2
make[1]: *** [sub-phonon-make_default] Error 2
make: *** [sub-plugins-make_default-ordered] Error 2
Any idea on how to fix that?

lAdIdAccess error, library not found

I've got this error and can't find anything about it (-lAdIdAccess):
ld: warning: directory not found for option '-L/Users/macbook/Desktop/rapid ball/Rapid'
ld: warning: directory not found for option '-LBall'
ld: warning: directory not found for option '-LBall/googleanalytics'
ld: library not found for -lAdIdAccess
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What should I do?

Error when building arm-elf-gcc

I'm trying to build a arm-elf-gcc cross compiler.
So firts I installed binutils 2.18 with the following configure options:
./configure --target=arm-elf --enable-interwork --enable-multilib
This seems to work fine.
next I installed gmp, mpfr and libmpc
so now to the gcc itself.
//edit - removed previous error and updated with the current one (I tried to build everything separately)
First I install a bootstrap gcc with these configure options:
--target=arm-elf --disable-libssp --with-newlib --without-headers --with-gnu-as --with-gnu-ld
And afterwards I try to build newlib 1.17.0 with it
--target=arm-elf --disable-werror --disable-newlib-supplied-syscalls --disable-nls --with-gnu-as --with-gnu-ld
But this still results in the same error. Maybe newlib tries to build for x86 architecture with the apple gcc (I'm running these things all on OS X) which maybe doesn't understand these parameters?
cc1: error: unrecognized command line option "-msse4"
../../../../../../newlib/libc/argz/dummy.c:1: error: bad value (core2) for -march= switch
cc1: error: unrecognized command line option "-msse4"
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
../../../../../../newlib/libc/argz/argz_add.c:1: error: bad value (core2) for -march= switch
cc1: error: unrecognized command line option "-msse4"
../../../../../../newlib/libc/argz/argz_add_sep.c:1: error: bad value (core2) for -march= switch
cc1: error: unrecognized command line option "-msse4"
make[8]: *** [lib_a-argz_add.o] Error 1
make[8]: *** Waiting for unfinished jobs....
../../../../../../newlib/libc/argz/argz_append.c:1: error: bad value (core2) for -march= switch
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
cc1: error: unrecognized command line option "-msse4"
../../../../../../newlib/libc/argz/argz_create.c:1: error: bad value (core2) for -march= switch
cc1: error: unrecognized command line option "-msse4"
../../../../../../newlib/libc/argz/argz_count.c:1: error: bad value (core2) for -march= switch
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
cc1: error: unrecognized command line option "-msse4"
../../../../../../newlib/libc/argz/argz_delete.c:1: error: bad value (core2) for -march= switch
make[8]: *** [lib_a-dummy.o] Error 1
make[8]: *** [lib_a-argz_create.o] Error 1
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
make[8]: *** [lib_a-argz_add_sep.o] Error 1
make[8]: *** [lib_a-argz_delete.o] Error 1
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
make[8]: *** [lib_a-argz_count.o] Error 1
make[8]: *** [lib_a-argz_append.o] Error 1
FATAL:/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand 'm' flag!
cc1: error: unrecognized command line option "-msse4"
../../../../../../newlib/libc/argz/argz_create_sep.c:1: error: bad value (core2) for -march= switch
make[8]: *** [lib_a-argz_create_sep.o] Error 1
make[7]: *** [all-recursive] Error 1
make[6]: *** [all-recursive] Error 1
make[5]: *** [all] Error 2
make[4]: *** [multi-do] Error 1
make[3]: *** [all-multi] Error 2
make[2]: *** [all] Error 2
make[1]: *** [all-target-newlib] Error 2
make: *** [all] Error 2
Not every combination of binutils, gcc, and newlib work. I gave up a long time ago personally trying to find any combinations. Last time I was successful was in the gcc 3.x days, and you cant cross compile gcc 3.x with gcc 4.x or at least it is getting harder.
Maybe try without the interwork and multilib until you get straight arm working. Maybe you need an eabi in there in some form arm-non-eabi, something like that?
Here is a combination that gets a working gcc and libgcc
http://www.cowlark.com/2009-07-04-building-gcc/
code sourcery should have their build information available to figure out how to, at least get as far as binutils and gcc.
Somehow you are getting a core2 architecture in there, I dont see anything obvious though.
Yes this is an old post, but I found it as I was looking for an answer.
Now I found the answer, so I'll post it here.
Look closely at the "as" - which as is actually executed, your as for the host-computer or for the target architecture ?
The answer is: The as for the target architecture.
This happens when you build on Mac - both on PowerPC and on intel.
You should set up your PATH environment variable right after building binutils, so that the correct binutils will be found, otherwise your native x86 (or PowerPC) tools will be used to build your ARM target. That just won't work.

Resources