Opened 7 years ago

Closed 7 years ago

#4647 closed defect (fixed)

Installation issue with Mac OS 10.13

Reported by: Francesco Casella Owned by:
Priority: high Milestone: 1.12.0
Component: Installation program Version:
Keywords: Cc: p.colonna@…, Adam Dershowitz, martin.sjolund@…

Description

I am trying to get OMC to work on my colleague Piero Colonna's Mac. We opted for the stable 1.12.0 to play safe, and used the .mkpg MacPort installer.

We followed the instructions from the Web page, installed XCode and the command-line tools, but we still get this compilation error:

stdout | error | <p>dyld: Library not loaded:
 /opt/openmodelica/lib/libgcc/libgfortran.3.dylib<br>
  Referenced from: /opt/openmodelica/lib/x86_64-darwin15.4.0/omc/libipopt.0.0.0.dylib<br>
  Reason: image not found<br>

stdout | error | <p>Process crashed</p>
stdout | error | <p>Process crashed<br>
Simulation process failed. Exited with code 0.</p>

Please help. Maybe we need to fix the 1.12.0 release for the Mac?

Change History (22)

comment:1 by anonymous, 7 years ago

You have to open XCode once, I believe, to accept the EULA.
What does e.g. git --version return on the command line?

comment:2 by Adam Dershowitz, 7 years ago

Cc: martin.sjolund@… added

I think that you should not need MacPort if you are installing the binary. Are you trying to build from src? The path /opt/openmodelica...indicates that you are trying to run the binary, but then you shouldn't have to compile it, so something is not completely clear about what you are trying (and it is not clear on the web page as well)
Also, FYI, when I first upgraded to OS 10.13 and Xcode 9. I was no longer able to build OMC 1.13 due to an issue with Xcode. That bug has since been fixed, but I doubt that it has been back ported to 1.12 (?)
But, the above error looks like a library is just missing from the binary package, so yes that needs to be fixed, and probably doesn't relate to 10.13.
As a work around, you can try to just install the newer dev version from source. All you should need to do, if you have already installed Xcode 9.1 and macports is:
sudo port install openmodelica-devel
or, if you want all the libraries
sudo port install openmodelica-devel +libraries

and then wait a while... It should then download, install and build a bunch of things.

comment:3 by massimo ceraolo, 7 years ago

I also would like to install OM on Mac OS 10.13.
If I install from source, upgrades will be faster, true? I mean I expect only changed modules will be compiled and linked.

If this is true I would like to install from source code.
I have Xcode 9.1 and installed command-line tools through

xcode-select --install.

Then I issued
sudo port install openmodelica-devel

and got the following:

host-131-114-251-216:~ ceraolo$ sudo port install openmodelica-devel
---> Computing dependencies for python27
---> Installing python27 @2.7.14_0
Error: Failed to install python27: no destroot found at: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/destroot
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/main.log for details.
Error: Problem while installing python27
Error: Unable to execute port: upgrade omniorb failed

comment:4 by Francesco Casella, 7 years ago

I report verbatim what is found in the Download Mac page. If that is not up to date, then we should update it.

The installation uses MacPorts. Homebrew is also possible from source. A alternative that is fast and works on all recent versions of OSX is installing on a Linux virtual machine; there are pre-built virtual machine images available.

You can use the binary release (only x86_64 version available, built on OSX 10.9 nightly, installs into /Applications/MacPorts/ /opt/openmodelica/bin/ and /opt/openmodelica/share/doc/omc/). Note that there is no uninstaller (see MacPorts guide for some hints on what is safe to remove). Also note that make and system headers are not included in this package so you will also need to install XCode3 (10.6), which is available for free with a registration, or a later version of XCode (which is available for free from the App store). Remember to install the XCode command-line tools (recent distributions of XCode do not install them by default). You will also need Java (which might not come preinstalled on your Mac). You may also need to allow unsigned packages to be installed.

For fewer potential issues at the cost of a longer time to install, you can use the source package in our MacPorts repository

So, what I understand is that either you install the binaries using MacPorts, and additionally install XCode and Java you haven't them already, or you compile from source. I would expect that, no matter how smart the build system on MacOS is, installing binaries is in general less of a problem than compiling from source code. If not, then we should stop bothering about building and providing .mpkg install files and only explain how to build from source.

I also understand that MacPorts is used for the installation, I'm not aware of other way to use the .mpkg installation files which are provided here

If the .mpkg installation files are incomplete or broken, either we fix them (or update the installation instructions explaining how to install the software successfully) or we remove them from the download pages. IMO, trying to use the source code and not fixing the installers is not the right way to solve this issue.

Has anybody else been able to install 1.12.0 successfully from .mpkg files? My understanding is that something went wrong with library dependencies over time (I remember some commits about ipopt some time ago), was not addressed properly in the Mac installations, and was never caught because possibly all (or most) Mac users do not use the installer but rather build from source.

Do we have any test procedure in place, or any faithful Mac beta tester that makes sure the installation files are not broken?

comment:5 by Francesco Casella, 7 years ago

For the record, #2516 and #2554 mention issues with libipopt and the Mac version. I'm not sure if the current issue is related those old (and fixed) issues, but the error message I reported initially clearly indicates some problem with an incorrectly configured libipopt. I'd be glad if somebody knows how to fix that.

in reply to:  3 ; comment:6 by Adam Dershowitz, 7 years ago

@ceraolo
I'm not sure what "modules" you are talking about. Each time you update openmodelica is will have to rebuild the whole OM, OMEdit, OMPlot etc. But, it doesn't have to rebuild all of the dependencies that are required and downloaded when you first install.

It looks like you are having a problem with your Macports install. It is trying to install one of the required dependencies and that is failing. You might try to update macports:
sudo port selfupdate
It should easily be able to install python27.

comment:7 by Francesco Casella, 7 years ago

@ceraolo's comment:3 also demonstrates what I strongly believe, i.e, that we cannot expect "normal" end-users to compile from source. That's something for developers or hackers, not for somebody who needs to use Modelica and OpenModelica on a Mac to solve his/her problems. If we want OpenModelica to be successful, we cannot only rely on committed hackers to use it.

comment:8 by Adam Dershowitz, 7 years ago

@casella I agree that the binary needs to be fixed, and the binary should be the primary way for users to get and use OM. There is probably a chicken-and-egg problem here of not many Mac users because it is hard to install and since there are few users there are few people to check and debug etc...

The web page is not very clear. My interpretation is that Macports is used by the server to build the .mpkg that can be downloaded. But, I think Macports itself should not be required by a user except to build from source.

Because I always build from source, I already have the libraries etc, so I think that I would have to uninstall many things to actually check if the binaries work. But, I do verify that the Mac source code does build and I consistently report back tickets when I run into trouble to try to keep things working on the Mac side.

in reply to:  4 ; comment:9 by Martin Sjölund, 7 years ago

Replying to casella:

Do we have any test procedure in place, or any faithful Mac beta tester that makes sure the installation files are not broken?

We cannot test the mpkg files either because we build OM on the same system. Probably is just a missing runtime dependency due to some added code.

in reply to:  5 comment:10 by Adam Dershowitz, 7 years ago

Replying to casella:

It looks like the problem is that the binary just doesn't include libgfortran.3.dylib. it is not really a problem with libipopt but instead that a library that it requires is not included, or not included in the correct place. I'm not sure why the build is missing that.

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

Note that I did remove the broken 1.12.0 release build and changed the portfile to upgrade better. But the nightly builds have been broken due normal macports crap.

in reply to:  11 ; comment:12 by Francesco Casella, 7 years ago

Cc: p.colonna@… removed

Replying to sjoelund.se:

Note that I did remove the broken 1.12.0 release build and changed the portfile to upgrade better.

Which broken relase you refer to?

Replying to sjoelund.se:

We cannot test the mpkg files either because we build OM on the same system. Probably is just a missing runtime dependency due to some added code.

I can ask Piero to be our official Mac beta tester. He's a committed Mac user, he and his group are regularly using Modelica (with other commercial tools at the moment), and will definitely never compile from source on his PC.

in reply to:  9 comment:13 by Adam Dershowitz, 7 years ago

Cc: p.colonna@… added

Replying to sjoelund.se:

I also noticed that the Mac nightlies have not been successfully building on Hudson lately. Perhaps that relates?

in reply to:  12 comment:14 by Martin Sjölund, 7 years ago

Replying to casella:

Replying to sjoelund.se:

Note that I did remove the broken 1.12.0 release build and changed the portfile to upgrade better.

Which broken relase you refer to?

https://build.openmodelica.org/omc/builds/mac/binaries/latest-release.mpkg
https://build.openmodelica.org/omc/builds/mac/binaries/latest-release-1.12.0.mpkg
which were removed.

comment:15 by Francesco Casella, 7 years ago

We have used https://build.openmodelica.org/omc/builds/mac/binaries/latest-stable-1.12.0.mpkg

If that is not the right one, please let me know.

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

That is not the correct one for the release build, no. It should be roughly the same and I'll remove it when the release is working (to make it rebuild with the new settings).

in reply to:  6 comment:17 by massimo ceraolo, 7 years ago

Replying to dersh:

@ceraolo
I'm not sure what "modules" you are talking about.

Yes, I was very foggy. But this was useful since you explained exactly what I was expecting.. Thanks!

It looks like you are having a problem with your Macports install. It is trying to install one of the required dependencies and that is failing. You might try to update macports:
sudo port selfupdate

Good to know. I will try.

It should easily be able to install python27.

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

The build now fails with :error:pkg Failed to mpkg openmodelica-release: invalid command name "interp151" which I never saw before...

comment:19 by Adam Dershowitz, 7 years ago

That looks like a Tcl error. Macports itself is written in Tcl. But, that should not happen, and I've never seen it before either.

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

That error seems to have been fixed upstream; can somebody please try https://build.openmodelica.org/omc/builds/mac/binaries/release/openmodelica-release-1.12.0.mpkg

comment:21 by massimo ceraolo, 7 years ago

I tried the new today's openmodelica-relase-1.12.0.mpkg and could install and run it correctly.
Previously I had problems: it installed, but when tried to run models OM complained about some libraries missing (don't remember which).

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

Milestone: 1.13.01.12.0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.