Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

OSX Build

OSX Build

Good Afternoon

I have been trying to compile OM on OSX for a while now and finally got it to finish making omc. Now when I run the tests 1408/2718 fail. I though it was an issue with the compiler (https://trac.openmodelica.org/OpenModel … 09#ticket) but seems it is something else. I have tried both the latest commit as well as the "2804a382451e7f2afbc514a59925823cef6668da" one with no luck. Any help will be very much appreciated. I can also post any logs etc- just let me know which would be most useful.

Re: OSX Build

Did you try going back to an earlier commit?  I found that somewhere between dev-106-ga101226 (2015-09-28) and 1.9.4~dev-133-gf27d20b (2015-10-02) that at least one example stopped working on the mac build. 
At this point, I believe that there are three separate, and likely unrelated, problems with the OSX build.
1)  Recent commits, in the range of 153 and later (2015-10-06), hang during build.  That is visible on the Hudson, and because of that they disabled the Hudson OSX builds until that can be resolved.
2)  Some tests started failing on mac as mentioned above
3)  Macports upgraded qt4 from 4.8.7_1 to 4.8.7_2.  That main point of that change was to move the location of a bunch of qt4 libraries to a more consistent location.  However, that upgrade seems to also break the OM build for Macs.  I have been working some with the Macport developer who made this change to try to get things working again, but so far, no luck on it.

Re: OSX Build

No worries, I'll add (at least the -devel package) to use the qt4 macports group, so it sends the QTDIR env.var to the configure process. So the paths should be fine tomorrow, I hope. The spinning seems to be fixed with https://github.com/OpenModelica/OMCompi … ad5a4ece9; I am currently playing with it to try to make sure everything runs.

Re: OSX Build

While I was trying to fix it, I did add the portgroup to my portfile, on my local machine, but I still was getting an error.  Hopefully, I just did something wrong with it, that you can get right. 

Re: OSX Build

We simply didn't look for QTDIR before: https://github.com/OpenModelica/OpenMod … bc310acb76

Re: OSX Build

Ok, so I tried to build the a101226 version and 1382 of 2689 tests failed. Any other suggestions?

Re: OSX Build

Ok, so I pulled in that fix and still sitting with around half the tests failing- must be missing something basic- any other ideas?

Re: OSX Build

I don't know yet. Our Mac Mini takes ages to run the tests current/smile

Re: OSX Build

Haha, ok. I don't know if it makes any difference, but I've been running with the j flag for make- could that be the problem?
Thank you for your help so far.

Re: OSX Build

Nah, we run parallel make. OSX is just really slow (2~3x slower than Linux on the same hardware for us), and we clean everything between builds, only build after a successful Linux test, etc. So it simply takes time.

Re: OSX Build

https://test.openmodelica.org/hudson/vi … iluresLink says ~99 tests fail now. So it shouldn't be half (make gitclean might help).

Re: OSX Build

Ok, so did a make gitclean and got the same result. Attached are the logs- I can't see anything wrong, but certainly no expert.
Thanks again.





Re: OSX Build

1. PDF logs are hard to read
2. The config.log for OMCompiler is more interesting than the config.log for OpenModelica
3. I need the output of one (or more) of the failed tests. Something like testsuite/simulation/libraries/msl22/Mechanics/Oscillator2.mos.fail_log
4. I need the commit hash you used

Re: OSX Build

Sorry about the pdf logs- the website was giving an error when I tried to upload the txt files.

Will start on 2-4 now.

Re: OSX Build

Commit Tag: 721b49e
Sorry, still having big issues attaching txt files- gives a wrong MIME error. Anyway, I zipped the two files you asked for:

OMCompiler-TestFail.zip

Thanks again for your help.

Re: OSX Build

Seems to be: Simulation Failed. Model: Modelica.Mechanics.Translational.Examples.Oscillator does not exist! Please load it first before simulation.

Did you just do make omc, and skip make omlibrary-core in OpenModelica.git?

Re: OSX Build

So if I make with no options then it fails when trying to make omplot, so I have been trying with omc. Have just done omlibrary-core too. Now when opening the log file the following error is found:
+ Modelica.Blocks.Examples.BusUsage                                                 ... sh: line 1: 81903 Trace/BPT trap: 5       /Users/grantstephens/Repos/OpenModelica/build/bin/omc --running-testsuite=/var/folders/6l/40mkyzts1pdf0tfxwrsmtz140000gn/T/rtest81898.Z0LtO.tmpModelica.Blocks.Examples.BusUsage.mos +locale=C Modelica.Blocks.Examples.BusUsage.mos >> /tmp/omc-rtest-grantstephens/simulation/libraries/msl32/Modelica.Blocks.Examples.BusUsage.mos_temp9747/log-Modelica.Blocks.Examples.BusUsage.mos 2>&1
execution failed

==== Log /tmp/omc-rtest-grantstephens/simulation/libraries/msl32/Modelica.Blocks.Examples.BusUsage.mos_temp9747/log-Modelica.Blocks.Examples.BusUsage.mos
dyld: lazy symbol binding failed: Symbol not found: _hwloc_topology_init
  Referenced from: /Users/grantstephens/Repos/OpenModelica/build/bin/../lib/x86_64-darwin15.0.0/omc//libOpenModelicaCompiler.dylib
  Expected in: flat namespace

dyld: Symbol not found: _hwloc_topology_init
  Referenced from: /Users/grantstephens/Repos/OpenModelica/build/bin/../lib/x86_64-darwin15.0.0/omc//libOpenModelicaCompiler.dylib
  Expected in: flat namespace


== 1 out of 1 tests failed [simulation/libraries/msl32/Modelica.Blocks.Examples.BusUsage.mos_temp9747, time: 11]

Re: OSX Build

Hmmm... How did you manage to bootstrap OMC if the compiler dylib cannot be loaded?

Re: OSX Build

Haha, I have no idea... The commands I typed are as follows:
make gitclean
git pull
git submodule update
autoconf
PATH=$PATH:/usr/local/Cellar/gettext/0.19.6/bin/
./configure LDFLAGS="-L/usr/local/opt/gettext/lib -L/usr/local/Cellar/lp_solve/5.5.2.0/lib" CFLAGS="-I/usr/local/opt/gettext/include -I/usr/local/Cellar/lp_solve/5.5.2.0/include" CC=clang CXX=clang++ --without-omniORB --disable-omnotebook --disable-modelica3d --without-paradiseo --without-OMShell --without-OMPlot --without-OMOptim --without-OMNotebook --without-OMEdit
make -j7 omc
make -j7 omlibrary-core
make -j7 omlibrary-all
(cd testsuite/partest && ./runtests.pl)

Is the order of the make's right? it seems to do a whole lot of git stuff when making the omlibraries- is this correct?

Re: OSX Build

As one additional datapoint, for me the recent commits fix the problems and are all building and running fine, using macports. 
There is one minor issue remaining, which is that I had the plotutils port installed, and that put this file /opt/local/include/plot.h in place.  Apparently, the OM build was finding that and getting confused, instead of using the correct local plot.h.  The work around is just to disable that port during the build of OM.

Re: OSX Build

Does anybody have any other suggestions. It seems all the tests fail with the following error:
I don't understand how it can compile without errors and this occurs.
execution failed

==== Log /tmp/omc-rtest-grantstephens/simulation/modelica/commonSubExp/cse2.mos_temp313/log-cse2.mos
dyld: lazy symbol binding failed: Symbol not found: _hwloc_topology_init
  Referenced from: /Users/user/Repositories/OpenModelica/build/bin/../lib/x86_64-darwin15.0.0/omc//libOpenModelicaCompiler.dylib
  Expected in: flat namespace

dyld: Symbol not found: _hwloc_topology_init
  Referenced from: /Users/user/Repositories/OpenModelica/build/bin/../lib/x86_64-darwin15.0.0/omc//libOpenModelicaCompiler.dylib
  Expected in: flat namespace


== 1 out of 1 tests failed [simulation/modelica/commonSubExp/cse2.mos_temp313, time: 5]

Re: OSX Build

Ok so I finally figured it out. Seems there is a conflict if you have open-mpi and/or hwloc installed. This was then compounded by the fact that they are needed in my project at a later point. Thanks for all the help none the less.

I have also started a homebrew formula for openmodelica which can be installed by

Code:


brew tap RexFuzzle/OpenModelica
brew install --HEAD openmodelica

There is a basic readme at https://github.com/RexFuzzle/homebrew-OpenModelica
It links everything and build the omlibrary-all so takes a long time, but omc does seems to work anywhere then. Around 50 tests fail when testing in the build temporary folder- I can't seem to get them to run elsewhere on the system.
Comments and feedback welcome.

Edited by: rexfuzzle - Jan-07-16 06:45:54

Re: OSX Build

Ok, have run into a few more questions that I'm hoping somebody can answer.

1. When running ./configure I would like to disable omplot/edit/shell due to them not compiling on OSX at the moment, or not wanting to install them. The problem is that the script does not seem to account for this and thus still checks for all the dependencies, specifically qt4, which is no needed for omc. Would a better way be to simply pull omcompiler and just compile that?

2. I would like to use the official omc binary off github to make the brew recipe and possibly even get it approved, however the libraries directory is not that. How do I go about compiling and installing the omlibraries separately? I see there are no releases of the libraries, surely there should be a v1.9.3 release as with the rest?

3. In the latest version (master --HEAD) there is an issue with compiling lpopt in the 3rd party folder. It works fine if I go and compile it manually, but gives an architecture error when it is done in the make omc script. It seems to be an OSX issue only.

Thank you

There are 0 guests and 0 other users also viewing this topic