- Index
- » Developer
- » OpenModelica development
- » building on the Mac
building on the Mac
building on the Mac
On the Mac, I'm building OMEdit with Qt 4.7.4 and Qwt 6.0.1. Both are framework installs. The OMPlot and OMEdit build scripts don't seem to understand this. The qmake processing seems to make this OK for Qt, but the link lines for Qwt still come out as if they were regular libraries, and thus don't work. I had to manually modify the OMPlot/OMPlotGUI/OMPlotGUI.config and OMEdit/OMEditGUI/OMEdit.config files to manually add "-F/usr/local/qwt-6.0.1/lib -framework qwt" to each of the LIBS lines.
How do I make qmake pick this up automatically? Note that the OM configure script is also broken, as "--with-qwt=FOO" doesn't address this either; it just adds the value given there to the INCLUDEPATH, which is conceptually unexpected; I'd expect it to add FOO/lib to the LIBS, and FOO/include to the INCLUDEPATH (which would also break for a framework build of Qwt, but at least it's reasonable).
Oh, and shouldn't there be some consistency of naming between OMEdit.config and OMPlotGUI.config? Pick one or the other?
Re: building on the Mac
This is because qmake has no knowledge about other libraries and sucks at everything using frameworks. So we simply don't support it and build using macports instead (this was especially true for earlier versions where a build using the frameworks would simply crash; I haven't checked lately).
As for the config files. We have too many master students who don't care about consistency
- sjoelund.se
- 1700 Posts
Re: building on the Mac
The latest Mac version of Qt (4.7.4) seems to support frameworks OK. It's just a matter of putting the right things into OMEdit.config.in and OMPlotGUI.config.in. I'll make up a patch and post it.
Meanwhile, what should the DIRECTORY argument to configure's "--with-qwt=DIRECTORY" point at? The directory containing the include headers? The directory containing the library? The most specific parent directory of both?
Re: building on the Mac
With-qwt should point to /opt/local or whatever prefix you installed qwt at. It does some extra searching to auto-detect since qwt does not have a standard installation path (may be /usr/include/qwt, may be /usr/include/qwt-qt4)
- sjoelund.se
- 1700 Posts
Re: building on the Mac
Hi! It is some time that I'm not able to build openmodelica on mac using macports. I've tried openmodelica, openmodelica-release and openmodelica-devel. Is this a known issue or am I doing something wrong??
Thanks a lot
Alessandro
Re: building on the Mac
You'll have to attach or mail me a log so I can see what fails and what compilers, etc you use.
The builds are working at the moment: http://build.openmodelica.org/omc/builds/mac/x86_64/
- sjoelund.se
- 1700 Posts
Re: building on the Mac
for another reason I discovered this page and I found out that it can happen to have problems with Xcode 4.2
https://trac.macports.org/wiki/ProblemHotlist#compiler
the first suggestion allowed me to compile openmodelica-release
the nice thing is that it is one month that I'm trying to install openmodelica.....
thanks for you immediate reply and I hope that this can help other mac users!
Alessandro
Re: building on the Mac
Yes, we also have problems with the MacPorts stuff. None of my colleagues here were able to use OMEdit via MacPorts, so I built it from the Subversion sources. Some interesting issues in doing that. I'll file some issue tracker reports on it.
- Index
- » Developer
- » OpenModelica development
- » building on the Mac