Opened 8 years ago

Closed 7 years ago

#4049 closed defect (fixed)

Mac openmodelica won't build

Reported by: Adam Dershowitz Owned by: Martin Sjölund
Priority: high Milestone: Future
Component: Build Environment Version:
Keywords: Cc: Adeel Asghar

Description

I just tried to update from 1.11.0~dev-154-ged4fde4_0 to 1.11.0~dev-173-g9944a43_0 and it fails to build.
It looks like a problem related to OMNotebook, from my brief review of the attached log file, but it fails the whole build.

Attachments (2)

main.log (4.8 MB ) - added by Adam Dershowitz 8 years ago.
no_notebook_main.log (4.8 MB ) - added by Adam Dershowitz 8 years ago.
build log without omnotebook

Change History (8)

by Adam Dershowitz, 8 years ago

Attachment: main.log added

comment:1 by Adam Dershowitz, 8 years ago

I also just tried to build without omnotebook like this:
sudo port install openmodelica-devel +libraries +modelica3d -omnotebook
but it also failed.
I have attached that log as well.
What could be related is that I did recently upgrade to XCode 8 (new from Apple).

by Adam Dershowitz, 8 years ago

Attachment: no_notebook_main.log added

build log without omnotebook

comment:2 by Martin Sjölund, 8 years ago

Yes, if including pthread.h no longer works, we can't build on XCode8 I guess :(

:info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/pthread.h:423:66: error: expected ';' after top level declarator
:info:build __SWIFT_UNAVAILABLE_MSG("Use lazily initialized globals instead")

comment:3 by Adam Dershowitz, 8 years ago

I think that there is some issue with using XCode 8 with Mac OS 10.11. I saw the same problem here with cmake:
https://trac.macports.org/ticket/52258
I don't think that the issue is that pthreads itself, but something else. You will note that in both cases, cmake and openmodelica, that they are trying to build for platform 10.12, but I am running 10.11.
I don't get it. For now, I will try to downgrade back to XCode 7.

comment:4 by Adam Dershowitz, 8 years ago

Apparently, there is a bug in the current version of cmake from macports. It is using a system configuration test that ends up trying to build for 10.12, even if the OS is 10.11, if you have Xcode 8 installed. Apparently, since opernmodelica uses cmake, this test propagates to openmodelica.
The bug has been reported, and is being worked on. But, for now it seems that cmake and openmodelica can only be built with Xcode 7, on OS 10.11, and likely (but I haven't tested it) with Xcode 8, on OS 10.12 (that has been released in the last few days).
In other words the SDK and OS have to match at the moment, because of how cmake does a test. Hopefully cmake will be fixed and that will also fix openmodelica builds.
For more info, see this thread: https://lists.macosforge.org/pipermail/macports-dev/2016-September/033734.html

comment:5 by Martin Sjölund, 7 years ago

Is this working with XCode8 now?

comment:6 by Adam Dershowitz, 7 years ago

Resolution: fixed
Status: newclosed

Yes, it was building fine with Xcode 8, and now with Xcode 9.2.

Note: See TracTickets for help on using tickets.