Opened 11 years ago

Closed 11 years ago

#2487 closed defect (fixed)

Mac dyld error on run

Reported by: Adam Dershowitz <dersh@…> Owned by: Martin Sjölund
Priority: high Milestone: 1.9.1
Component: Installation program Version: trunk
Keywords: Cc:

Description

After upgrading to 18199 simulations now fail.
The error I get is:

dyld: Library not loaded: /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_18199/3rdParty/Ipopt-3.11.6/lib/libipopt.1.dylib
  Referenced from: /private/var/folders/s4/0j3cshj161126ygbpbzsdkmd4h24dl/T/OpenModelica/OMEdit/Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum
  Reason: image not found
Process crashed
Simulation process exited with code 0

I would guess that this relates to one of the following changes:
https://trac.openmodelica.org/OpenModelica/changeset/18179
https://trac.openmodelica.org/OpenModelica/changeset/18177
https://trac.openmodelica.org/OpenModelica/changeset/18174
https://trac.openmodelica.org/OpenModelica/changeset/18173
https://trac.openmodelica.org/OpenModelica/changeset/18172

I did verify that libipopt is being built because I see it here:
/opt/local/lib/omc/libipopt.1.dylib
So, it looks like it is just being linked with the wrong path, and then, at runtime it is trying to find it in the working directory rather then in the install directory.

Change History (7)

comment:1 by Adam Dershowitz <dersh@…>, 11 years ago

I confirmed that it is just a path error because I was able to do a temporary work around by creating the working directories again (they are deleted as part of the install), and then linking to the appropriate directories:

sudo ln -s /opt/local/lib/omc/libipopt.1.dylib  /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_18199/3rdParty/Ipopt-3.11.6/lib/libipopt.1.dylib
sudo ln -s /opt/local/lib/omc/libcoinmumps.1.dylib  /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_18199/3rdParty/Ipopt-3.11.6/lib/libcoinmumps.1.dylib

Note that, as shown above, I did also need the link to libcoinmumps.

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

Component: BackendInstallation program
Owner: changed from probably noone to Martin Sjölund
Status: newaccepted

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

I need to play around some with otool for the installation. OSX is so slow to build though, so will take me a little time.

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

I think r18207 solves this

Last edited 11 years ago by Martin Sjölund (previous) (diff)

comment:5 by Adam Dershowitz <dersh@…>, 11 years ago

Yes, it builds and runs now.
I did run into another problem. It looks like you changed how it sundials. I had my own port of sundials installed, and I had to get rid of it. Then, your version worked just fine.

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

Yes, I added the Portfile in the macports ticket since they don't seem to want to put it into macports. And since we got an OSX machine and I want to run tests on it, I thought I'd just let our Mac users have access to the sundials solvers.

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

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.