Opened 10 years ago

Closed 10 years ago

#2487 closed defect (fixed)

Mac dyld error on run

Reported by: Adam Dershowitz <dersh@…> Owned by: sjoelund.se
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 Changed 10 years ago by Adam Dershowitz <dersh@…>

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

  • Component changed from Backend to Installation program
  • Owner changed from probably noone to sjoelund.se
  • Status changed from new to accepted

comment:3 Changed 10 years ago by sjoelund.se

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

I think r18207 solves this

Last edited 10 years ago by sjoelund.se (previous) (diff)

comment:5 Changed 10 years ago by Adam Dershowitz <dersh@…>

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

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

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.