No architectures to compile for (only_active_arch = yes, active arch = x86_64, valid_archs= i386 - ios7.1

I'm using XCODE 5.1 and IOS 7.1 for my project and when I compile it for Iphone-simulator 64bit, Xcode generates this error:
No architectures to compile for (only_active_arch = yes, active arch = x86_64, valid_archs= i386
I have already read others topics and I tried the solutions but I haven't resolved my problem.
I post my image settings:
Thanks

If it helps I just added x86_64 to the valid architectures list and the message went away. (Although there are other issues in the code)
The older projects are targeted to the old MAC processors - pre intel, if you dont add i386/x86_64 to the list it can't produce code that will run in the simulator.

Related

Configure GDB to accept Cross-Compiled executables?

I'm still a newbie to assembly language and cross-compiling etc. I've already googled the problem I'm having and seen a few similar posts but none of them solved my problem unfortunately.
We're learning ARM32 Syntax at the university and playing around with assembly code on AARCH64 machines on a uni server. So we need to cross-compile the .s files to be able to run them.
We use the command arm-linuxgnueabihf-gcc to cross-compile.
Now the system (the loader I guess) is configured properly to execute these 32-bit cross executables. When I tried to debug a 32b exec however GDB crashes with error: selected architecture armv7 is not compatible with reported target architecture aarch64
There are screenshots below that illustrate the problem. Thanks for any help!
System infos:
System info
No error with native compiler:
No error with native compiler
Error with cross-compilation:
Error with cross-compilation

MinGW Error "Only Win32 target is supported"

I recently updated my Ubuntu and now I get an error message saying "In included file: Only Win32 target is supported" every time I try to compile a C project. I use Codelite 15.0.2 and Mingw-w64 7.0.0-2. Before I updated my OS everything worked flawlessly and I have no idea how to fix this error, reinstalling Codelite and Mingw-w64 and searching on google didn't solve anything either :(
MinGW-w64 exists for 32-bit and 64-bit Windows.
The /usr/i686-w64-mingw32 part of the message you get tells me you're using the 32-bit Windows target.
If you run apt-cache search mingw-w64 in Ubuntu you will see there are seperate i686 and x86-64 packages.

GCC installed on ubuntu 14.04, but no toolchain visible on eclipse?

So itś my first time using eclipse in ubuntu and I seem to have problems with setting up GCC as the toolchain. I expect the toolchains to work with a standard HelloWorld example, but they don't (after building the project of course).
I get the following error:
When adding the new project, I only have a choice between these toolchains:
When unmarking ¨Show project types and toolchains only if...¨, I do get the GCC toolchain in the list, but that doesn´t seem right (and is also not working).

ARM cross compiling introduction?

I'm trying to compile a program to run on a Linux powered board, which has an ARM926EJ-S processor. So I've installed Debian embedded cross-development toolchain, and tried compiling an Hello World with in gcc with -march=armv5te . When I tried running the binary on the board it crashed with file not found errors (due to library versions), after that I've tried compiling with -static flag and I got a seg fault (0x0000827c in __libc_start_main (), said mr gdb trough gdbserver).
Any idea on what to do here to get something running?
Apparently the solution is to try as many toolchains as you can find. Eventually you'll find the one that works, after spending a few too many hours compiling toolchains. uClibc buildroot in this case.
You can find toolchains which support ARM926EJ-S on Linaro Page. Use the most recent arm-linux-gnueabi from Linaro project. I am currently using a version with gcc 4.9.4 which you can find here
It is recommended to use -mcpu=arm926ej-s instead of -march and -mtune. See gcc documentation because it combines -march and -mtune for your specified processor. It was deprecated for x86, but not for arm.
Other possibility could be building your own toolchain via crosstools-ng. But the Linaro toolchains are working out of the box if you don't need some specific setting (for example only using static libraries).

Running a program compiled from clang+llvm on another machine

I am compiling a program through clang+llvm (version 3.1) and trying to run it on a computer which also has the same clang+llvm version. I'm compiling on Ubuntu 10, but the other computer where I'm trying to run has CentOS 5. There (in CentOS), I also encounter problems compiling through LLVM (a compiler pass is implemented in LLVM). That is why I thought about compiling on Ubuntu, take the exe from there and just run it on the CentOS machine.
However, when I try to do that, I get the following error.
./main: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./main)
./main: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./main)
How can I solve this. Please note that I do not have root accesses on that machine.
One solution would be to copy the library from your working Ubuntu machine to your CentOS machine. Put in your Home/Workdir/whereever(TM) and set your LD_PRELOAD variable to that library. But that can be quite tedious as it is possible that this is not the only library that is missing (and maybe libraries depend on other libraries, that you also need...).
This also only works, if both machines have the same architecture (e.g. it wont work if your ubuntu machine is 32 bit and your CentOS 64).
Centos 5 uses an older version of libstdc++ than Ubuntu 11.04 or 11.10, so can't use binaries from there.
Either compile on Centos 5, or find a older compile environment that does work. If you were using gcc, you could also investigate the LSB compiler environment.
Cross compilation is always a difficult issue. In your case you have different c++ library versions on the two machines. In case you do not need to do this often, I suggest you try and solve your compilation issue on CentOS. It's probably the easier way round.

Resources