Eclipse on MAC OS X Does not detect LLVM toolchain - eclipse

I'm trying to work with eclipse to compile/debug C/C++ applications on MAC OSX using LLVM/Clang.
I know I have the toolchain correctly installed as I can compile with it from the terminal using a makefile, and when running clang -v I get the LLVM version + install dir correctly.
I downloaded a fresh copy of eclipse C++ (Mars) + installed the LLVM support plugin and followed: Unable to install LLVM toolchain for Eclipse CDT
Copied the install dir path from the clang -v output to the LLVM part in the preferences -> c++ -> LLVM, but it seems eclipse does not detect the toolchain.
It does not appear as an option when creating a new C++ project unless I uncheck the "only show supported toolchains on the target" checkbox , and when I do uncheck it and create a LLVM project for MACOS in the build process it says:
Toolchain "LLVM with Clang (MacOSX)" is not detected.
Refer to "C/C++ Development User Guide", "Before you begin" how to install toolchains.
All it says in the manual is to install Xcode to get the toolchain running , which I obviously did as it is working from the terminal.
Any ideas? How does Eclipse detect the toolchain exists?

In Xcode app menu > Toolchains > set the one you want to use.
And set the environment variable export TOOLCHAINS=org.llvm.12.0.1. See the following steps to find the correct value of the env var.
If you just downloaded the compiler, headers etc., and no xctoolchain, then do this:
Copy /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain to ~/Library/Developer/Toolchains/
Delete the contents of ~/Library/Developer/Toolchains/XcodeDefault.xctoolchain/usr.
Either copy the share, libexec, lib, include, bin folders from the LLVM binaries to these locations inside ~/Library/Developer/Toolchains/XcodeDefault.xctoolchain/usr. Or you can create symlinks.
Edit the ~/Library/Developer/Toolchains/XcodeDefault.xctoolchain/ToolchainInfo.plist to change the Identifier to whatever you want.
Simply downloading the binaries doesn't make it a "toolchain" that Xcode expects like in /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain

Its highly likely this is fixed in latest version of Eclipse. At date this question was asked, you were using 'Mars'. This version of Eclipse is superseded by 'Neon' and then 'Oxygen' which is current as of end of January 2018. I've seen a reference to this issue being solved with 'Neon' edition as it was a bug in 'Mars'. I cannot personally confirm this though.
In addition if you manually installed clang/llvm instead of included apple version try using homebrew instead. There are some clear instructions here on using it under OSX/macOS in relation to clang/llvm.

Related

Can not create 8051 project in Eclipse on Mac

I'm using macOS. I have downloaded sdcc for Mac and installed it followed INSTALL.txt inside the downloaded folder (simply copy it to Developer folder), and have Eclipse IDE for Embedded C/C++ Developer installed. Then I installed eclipseSDCC (I don't know if the plugin is platform specific). Seems everything in the right way.
However, when I new a project in Eclipse. I found the Toolchains is empty, so I can't create one. So, how can I deal with it?
Without knowing the prerequisites that renders a toolchain as "supported", these steps enables you to create an 8051 project:
Specify a project name.
Uncheck the checkbox at the bottom that reads "Show project types and toolchains only if they are supported on the platform".

Error while trying to compile imported project from Mbed compiler

I have completely followed installing the GNU MCU Eclipse compiler along with the arm gnu toolchain and its complementary GCC toolchain provided in the
tutorial link.
When I want to build a project which I exported from the Mbed online compiler, I set the PATH variable in the project's properties to wherever the where gnu-arm-none-eabi-g++ command refers. But Regarding all the instructions I followed I am still getting this compile error:
**Error:Program "make" not found in PATH**
It seems that there is a way around in order to avoid the multi-step process for setting up the Eclipse IDE for Max devices.
The Maxim Integrated company has special eclipse neon dedicated for maxim arm processors which can be downloaded from this link.
Warning!!: when you install the arm toolchain and run the Eclipse IDE, be aware that you don't update the IDE tools and libraries via the IDE itself. However, if you want to update the libraries you can do this by the Arm cortex management app which is included in the toolchain setup.

AVR-GCC Compiler not in toolchain list eclipse

I'm trying to program in C for arduino and I'm trying my very best to avoid having to use Atmel Studio
I've installed the AVR plugin for eclipse on the MARS release.
I've downloaded and extracted WinAVR (and added it to PATH)
In Eclipse preferences under AVR/Paths, all paths are correctly recognised
but the New C/C++ Project Wizard doesn't show AVR-GCC in the toolchain list, not on project type executable, not on AVR Cross Target Application project type, not even when Show project types and toolchains only if they are supported on the platform is unchecked.
I also have MinGW in PATH for normal C applications.
Is there any way to fix this? (as in, get AVR-GCC in the toolchain list). A friend on linux (I'm on Win10) did get AVR-GCC in his toolchain list without issues on the same eclipse version.

In switch to Android Studio should my SDK location be the same as Eclipse version?

I'm trying to move from Eclipse ADT NDK build to Android Studio on my Mac OS X. In doing this, one thing I notice is the Project Structure's Android SDK Location for my ported project and for new projects is defaulting to be: /Users/user1/Development/adt-bundle-mac-x86_64-20131030/sdk.
Shouldn't the Android Studio come with its own SDK and shouldn't I be using it by default? I looked in the application install directory but found no signs of an SDK directory there. I'm concerned that the sdk is from October 30, 2013 and so it seems rather old. What are the implications of moving to a newer SDK?
Perhaps related to this is that when trying to use the old Eclipse Kepler that used to build for me:
I get notice on Eclipse launch:
This Android SDK requires Android Developer Toolkit version 23.0.0 or above.
Current version is 22.6.2.v2014032112031-1085508.
Please update ADT to the latest version.
Click "Check for Updates":
No Updates were found.
No Repository found at https://dl.google.com/alt.
Tried to update the repository to (for Kepler Eclipse):
https://dl.google.com/eclipse/plugin/4.3
Still no updates found but error about no repository goes away.
I resolved this later issue with the answer posted here.
cant comment on details of OSX but on linux/AS with Eclipse & AS , i found follow to help:
provision environment to use multiple versions of java JDK
install oracle JDK 1.7 that will be just for use by shell script running AS
note ASRoot/bin/studio.sh .... if [ -n "$STUDIO_JDK"
accordingly provide for the above ENV VAR and its use by the AS.studio.sh
that version of the JDK does nothing more than run AS
Then , for the ADT stuff (OK to be shared by Eclipse & AS ), you can keep updated another version of the SDK/ADT in a path where theres read access by both eclipse/ AS.
I think u can use ./android to keep updated this , original sdk/adt

How to (re)attach JDK sources for Eclipse on Snow Leopard?

After updating to the latest (and now deprecated, sniff...) update of Apple's JDK, Eclipse does not show the source code for JDK classes anymore. It asks me to attach the source location file or folder. Where can I find that?
It seems that Java for Mac OS X 10.6 Update 3 does not include the sources anymore. There is a separate package "Java for Mac OS X 10.6 Update 3 Developer Package" now. See http://lookfirst.com/2010/10/how-to-fix-missing-source-for-latest.html
For each update from Apple, I write a new blog post with the updated symlinks. I noticed a lot of traffic on my blog from one of the answers, so I figured I might as well update things with the latest release.
I could write a simple shell script to do this for you, but that would require you to download a file. Seems simpler to just execute a few easy commands.
This is the latest one for update 5:
http://lookfirst.com/2011/06/fix-missing-source-for-java-mac-os-x.html
I am using Mac OS 10.8.5. I downloaded the java for Mac OS 10.7 and installed it. I found the src.jar file in
/Library/Java/JavaVirtualMachines/1.6.0_37-b06-434.jdk/Contents/Home/src.jar.
Then I
Opened eclipse(JUNO)
Eclipse > Prefereces > JAVA > Installed jre
Edit the java listed
In the jre system libraries section,
Expand the first one (i.e., classes.jar)
You can see that src is not attached
Double click that and provide the above location
That's it.
In my case the sources are in
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/src.jar
You might need to set this in the Eclipse preferences: Java - installed JREs. Select the 1.6 JVM and click edit. Now select classes.jar from the list of JRE system libraries, click source attachment and enter the path to your src.jar.
To all the guys who's been suffering from searching the source code here and there for hours but finally get nothing.
For Eclipse to attach(imperfectly available for 1.6):
jdk1.7.0_21_src_for_mac.zip