Opened 8 years ago

Closed 7 years ago

#4049 closed defect (fixed)

Mac openmodelica won't build

Reported by: dersh Owned by: sjoelund.se
Priority: high Milestone: Future
Component: Build Environment Version:
Keywords: Cc: adeas31

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 dersh 8 years ago.
no_notebook_main.log (4.8 MB) - added by dersh 8 years ago.
build log without omnotebook

Change History (8)

Changed 8 years ago by dersh

comment:1 Changed 8 years ago by dersh

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).

Changed 8 years ago by dersh

build log without omnotebook

comment:2 Changed 8 years ago by sjoelund.se

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 Changed 8 years ago by dersh

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 Changed 8 years ago by dersh

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 Changed 7 years ago by sjoelund.se

Is this working with XCode8 now?

comment:6 Changed 7 years ago by dersh

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.