Where to get Cross GCC For Mac OS - eclipse

I was wondering where to get Cross GCC for mac, and how to install it.
I have installed the eclipse IDE on mac, and am able to run it, however it asks for a compiler path. To my knowledge I don't have a c++ compiler and I would like to know where to get one from.

Related

How do I install gdb on a Macbook M1 to use it in Eclipse?

I am quite new to the programming world and am trying to learn some coding on Eclipse by following a guided self-study book.
For the course I should use Eclipse with gdb for debugging. Unfortunately I cannot get gdb working; I managed to follow the steps in this file (https://www.ics.uci.edu/~pattis/common/handouts/macmingweclipse/allexperimental/mac-gdb-install.html) and everything worked, excpet for gdb to relaunch after quitting. So now I am quite clueless about how to proceed?
I also tried installing it via Homebrew, but when executing
brew install gdb
I get the message
gdb: The x86_64 architecture is required for this software. Error: gdb: An unsatisfied requirement failed this build.
I know that there are issues with gdb on Mac with M1 chip, but is there any way to resolve this? My computer knowledge isn't very good as for know, so I probably need quite a step-by-step guidance.
Thank you very much in advance!
GDB has not been ported to MacOS for the M1 (AArch64) architecture. The lldb debugger is available for MacOS on M1, you could consider using that debugger.

CUDA Nsight Eclipse debugger error (Mac OS X)

I am running Nsight Eclipse edition on my MacBook PRO (OS X 10.8.2, mountain lion, CUDA 5.0, GT650M)
and I am getting a strange error each time I try to start the debugger in Nsight.
In the console I get: Coalescing of the CUDA commands output is off. and an error screen.
Here is a screenshot of the error:
I went through the Nsight documentation and found this line:
GPUs used to run X11 (on Linux) or Aqua (on Mac) cannot be used to
debug CUDA applications in Nsight Eclipse Edition. Consult cuda-gdb
documentation for details.
Does this mean I can't run the debugger form Nsight, but just from terminal?
The message you are seein means the debugger was not properly setup on your system (e.g. it will not even work from the console). Please follow the steps outlined in "Setting Up the Debugger Environment" of the cuda-gdb manual
You will need a two-GPU system to debug a CUDA code using visual debugger. Unfortunately, no Mac laptops qualify even though they have Intel graphics. The issue been the OS can start using NVIDIA GPU at any moment and may hang if the device is suspended on a breakpoint.
Your cuda-gdb is not properly code signed, which is required by the Darwin kernel to debug applications.
Follow this guideline to create a System code sign certificate
http://www.noktec.be/archives/1251
Then, code sign the following binaries (assuming the certificate you created is cuda_gdb)
sudo codesign -s cuda_gdb /usr/local/cuda/bin/cuda-gdb
sudo codesign -s cuda_gdb /usr/local/cuda/bin/cuda-binary-gdb
Also, in order to launch the application, you also need to make sure the DYLD_LIBRARY_PATH contains the cuda runtime library path
DYLB_LIBRARY_PATH /usr/local/cuda/lib

Mindstorms: Installation of NXT2.0f3 patch for Mac OS X Lion 10.7.3

Looking for installation help with NXT2.0f3 patch for mindstorms NXT 2.0 software on iMac w/ Lion 10.7.3. Base software installation from CD works fine (with some minor glitches once the NXT software is running that I can live with for now); however, applying the NXT2.0f3 patch (so-called Mac software fix downloaded from Lego) prevents NXT application startup. On application startup, I get an alert box with
"Error Code: 1003" stating that a required file is broken. The program then quits. No useful information (like a filename) there.
Mindstorms phone support wasn't helpful. Did reinstalls five times with different combinations of 32-bit and 64-bit mode OSX. Also tried installing driver package from CD to repair installation (after patch was applied), but no luck.
Has anyone got this working, or run into the same problem and have a solution?

What is fake-libgcc? Is fake-libgcc required in order to compile on iPhone?

I started out developing on C. I know what gcc is, libgcc, and so on . I've done Windows/.NET development for years, and now I am playing with an iphone.
I understand that it's possible to compile apps on the iphone itself.
Wanted to start with a hello,world. I have openssh on the phone, and am connected from the Windows machine via putty.exe.
using Cydia to install GCC, it tells me "Cannot Comply".
The post I cited above says I may need fake-libgcc. Why? What's fake about it, and why do I need it? If this is a pre-req for gcc, why doesn't the GCC package in Cydia install it automatically?
I just barely got this figured out myself, and since Google doesn't seem to have any recent and sufficient information, I'll go ahead and explain what I've found out even though this question is rather old.
The quick of it is this, gcc needs to see libgcc installed. I installed fake-gcc from here and it let me install gcc, and it appears to be running just fine, however, it still needs the headers. Here is a walkthrough that should help get the appropriate header files so you can get it to work.
As for why this all is, this is what I've been able to gather from searching through Google for a little while. Let me just start by saying, this is pretty much pure speculation, and if someone points me to a more correct reference, I'll gladly update this.
It appears that up through version 2.0 of the toolchain, libgcc was installable through Cydia to provide the basic libraries for gcc. However, since version 3.0, these libraries are (maybe?) now built in by default, so installing libgcc again through Cydia broke things. But as gcc has it as a dependency, it can't be installed until it sees libgcc somewhere.
That's where fake-libgcc comes in. It registers itself as that package, but doesn't really do anything besides that.

Cross compiling for SPARC on x86

I've seen the about cross compilers reply at How do I cross-compile C code on Windows for a binary to also be run on Unix (Solaris/HPUX/Linux)?
I would like to know how can Y compile for SPARC on a x86 machine?
Where can i find a good cross compiler? I also need to compile for HP OS.
gcc is fully capable of this. Sun's compiler may be capable, but I'm more familiar with gcc. First, you should get comfortable with building gcc, and also decide if you need just the C compiler or if you need C++ or other languages.
Once you've built gcc for the host you are on, you can then rebuild gcc to include a target for the target machine you want to cross compile for.
When building a cross compiler, the three things you must get correct are the build, host, and target.
build: the machine you are building on
host: the machine that you are building for
target: and the machine that GCC will produce code for
For a cross compiler, build and host will be the same, and target will be different. For example, here's how to tell the compiler to build a compiler to cross compile from Solaris x86 to Solaris Sparc:
./configure --build=x86_64-sun-solaris2.10 --host=x86_64-sun-solaris2.10 --target=sparc-sun-solaris2.10
You can then build additional compiler for each target you need to cross compile to.
Compiling 32 bit and 64 bit executables on a platform which runs both is quite easy. Anything else, will be a bit trickier. gcc on the Mac is built with several targets, and Apple has made it quite easy to create binaries for multiple platforms. All iPhone apps are compiled on x86 and target the ARM processor. If you can get the compiler built for the targets you want, then the cross compiling is usually fairly easy to do.