Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Mars2 on Mac OS X: LLVM with clang (Mac OS X) not available?(Cannot select "LLVM with clang (Mac OS X)" toolchain on Mac OS X)
icon5.gif  Mars2 on Mac OS X: LLVM with clang (Mac OS X) not available? [message #1728837] Thu, 07 April 2016 18:30 Go to next message
Uri Blumenthal is currently offline Uri BlumenthalFriend
Messages: 2
Registered: April 2016
Junior Member
I am trying to use Eclipse MARS2 (on Mac OS X 10.10.5 and 10.11.4) for Java and C++ development. With Java - so far so good.

With C++, CDT only allows me GCC-based toolchains (when "Display compatible toolchains only" is selected).
index.php/fa/25575/0/

The toolchain in question appears available, as evidenced here:
index.php/fa/25576/0/

When I force CDT to accept "LLVM with clang (Mac OS X)" toolchain by unchecking the "Display compatible..." checkbox and selecting it, the entire CDT menu becomes screwed up and throws a null-pointer exception.
index.php/fa/25577/0/

There is no way (that I know of) to recover, because I cannot go back to that menu and select something else. Here's the .log contents:

!ENTRY org.eclipse.ui 4 0 2016-04-07 14:03:06.482
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.cdt.managedbuilder.internal.tcmodification.ConfigurationModification.getBuilderCompatibilityStatus(ConfigurationModification.java:106)
	at org.eclipse.cdt.managedbuilder.ui.properties.ToolChainEditTab.showErrorMessage(ToolChainEditTab.java:242)
	at org.eclipse.cdt.managedbuilder.ui.properties.ToolChainEditTab.updateData(ToolChainEditTab.java:210)
	at org.eclipse.cdt.managedbuilder.ui.properties.ToolChainEditTab.updateData(ToolChainEditTab.java:198)
	at org.eclipse.cdt.ui.newui.AbstractCPropertyTab.handleTabEvent(AbstractCPropertyTab.java:560)
	at org.eclipse.cdt.ui.newui.AbstractPage.forEach(AbstractPage.java:1059)
	at org.eclipse.cdt.ui.newui.AbstractPage.forEach(AbstractPage.java:1054)
	at org.eclipse.cdt.ui.newui.AbstractPage.performDefaults(AbstractPage.java:542)
	at org.eclipse.jface.preference.PreferencePage$1.widgetSelected(PreferencePage.java:277)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1491)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1514)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1499)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1299)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
	at org.eclipse.jface.window.Window.open(Window.java:803)
	at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:157)
	at org.eclipse.ui.internal.ide.actions.ProjectPropertyDialogAction.run(ProjectPropertyDialogAction.java:78)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1491)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1514)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1499)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1299)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1515)

Re: Mars2 on Mac OS X: LLVM with clang (Mac OS X) not available? [message #1728941 is a reply to message #1728837] Fri, 08 April 2016 14:12 Go to previous messageGo to next message
Marc-André Laperle is currently offline Marc-André LaperleFriend
Messages: 256
Registered: July 2009
Senior Member
The LLVM toolchain is not very maintained or tested. But if you select MacOS GCC is should work and it will use Clang underneath anyway.

[Updated on: Fri, 08 April 2016 14:13]

Report message to a moderator

Re: Mars2 on Mac OS X: LLVM with clang (Mac OS X) not available? [message #1728974 is a reply to message #1728941] Fri, 08 April 2016 18:54 Go to previous messageGo to next message
Uri Blumenthal is currently offline Uri BlumenthalFriend
Messages: 2
Registered: April 2016
Junior Member
I would be happy to help testing it. But if this (LLVM) toolchain is lacking resources (i.e., authors are too busy to properly maintain it), that of course is a different story.

The fact is, on my Mac there are several compilers: native Xcode (clang and gcc - and I'd rather not use this gcc), and Macports-installed (gcc-5.3 and clang-3.7). The main difference between them is - they shine at different things, but require different flags.

As I see, MacOS GCC toolchain uses gcc/g++ (the one supplied by Xcode). To me it's the worst of these two worlds. I can manually change the compiler, linker, etc. (and it is simple enough), but I don't remember all the flags that LLVM toolchain uses for LLVM (such as --emit-llvm).

Is it practical to get the LLVM toolchain debugged? Or I shouldn't waste my (and others') time, and just reconfigure MacOS GCC toolchain?
Re: Mars2 on Mac OS X: LLVM with clang (Mac OS X) not available? [message #1728976 is a reply to message #1728974] Fri, 08 April 2016 19:46 Go to previous message
Marc-André Laperle is currently offline Marc-André LaperleFriend
Messages: 256
Registered: July 2009
Senior Member
I don't think the person who contributed the toolchain is much around anymore or working on it actively. But I'd be glad to review any proposed changes. I do have a Mac so I can test and merge your changes if you have some to propose.
If you want to get quickly started, I suggest using the "Eclipse Installer" (Oomph) to set up everything for you.
https://wiki.eclipse.org/Getting_started_with_CDT_development#Using_Oomph

Once the code is cloned and everything, the interesting code is in org.eclipse.cdt.managedbuilder.llvm.ui

Hope this helps!
Previous Topic:Mars doesn't seem to upload and debug.
Next Topic:Inconsistent/erratic (indexer?) source code navigating behavior in Mars.1 , .2
Goto Forum:
  


Current Time: Tue Mar 19 04:45:06 GMT 2024

Powered by FUDForum. Page generated in 0.03559 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top