Skip to content

Commit 58b509d

Browse files
sjoelundAnHeuermann
andauthored
[OSX] Check dylib and binaries for relative paths (#916)
* Check dylib and binaries for relative paths * Fix dylib IDs, rpath, etc in various places * Add sanity check for OMEdit (OSX only; check that OMEdit --help works) Co-authored-by: AnHeuermann <andreas.heuermann@liu.se>
1 parent cc6d66f commit 58b509d

File tree

4 files changed

+123
-18
lines changed

4 files changed

+123
-18
lines changed

Jenkinsfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ pipeline {
102102
sh "${env.GMAKE} --version"
103103
common.buildOMC('cc', 'c++', "OMPCC='gcc-mp-5 -fopenmp -mno-avx' GNUCXX=g++-mp-5 FC=gfortran-mp-5 LDFLAGS=-L${env.MACPORTS}/lib CPPFLAGS=-I${env.MACPORTS}/include --without-omlibrary")
104104
common.buildGUI('', false)
105+
sh label: "Look for relative paths in dylibs", script: '! ( find build/ -name "*.dylib" -exec otool -L {} ";" | tr -d "\t" | grep -v : | grep -v "^[/@]" )'
106+
sh label: "Look for relative paths in bin folder", script: '! ( find build/bin -type f -exec otool -L {} ";" | tr -d "\t" | grep -v : | grep -v "^[/@]" )'
107+
// TODO: OMCppOSUSimulation throws error for help display
108+
//sh label: "Sanity check for Cpp runtime", script: "./build/bin/OMCppOSUSimulation --help"
109+
sh label: "Sanity check for OMEdit", script: "./build/Applications/OMEdit.app/Contents/MacOS/OMEdit --help"
105110
}
106111
}
107112
}

OMCompiler/Makefile.common

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -505,13 +505,33 @@ $(builddir_lib_omc)/libsundials_ida.a: 3rdParty/sundials/CMakeLists.txt
505505
(cp -pfr 3rdParty/sundials/build/include/* $(OMBUILDDIR)/include/omc/c/sundials)
506506
# copy the libs to the build/lib/omc directory
507507
(cp -pf 3rdParty/sundials/build/lib/* $(builddir_lib_omc))
508-
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_arkode.0.dylib "$(builddir_lib_omc)/libsundials_nvecserial.0.dylib"
509-
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_cvode.0.dylib "$(builddir_lib_omc)/libsundials_nvecserial.0.dylib"
510-
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_cvodes.0.dylib "$(builddir_lib_omc)/libsundials_nvecserial.0.dylib"
511-
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_ida.0.dylib "$(builddir_lib_omc)/libsundials_nvecserial.0.dylib"
512-
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_idas.0.dylib "$(builddir_lib_omc)/libsundials_nvecserial.0.dylib"
513-
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_kinsol.0.dylib "$(builddir_lib_omc)/libsundials_nvecserial.0.dylib"
514-
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_nvecserial.0.dylib "$(builddir_lib_omc)/libsundials_nvecserial.0.dylib"
508+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_arkode.1.0.0.dylib "$(builddir_lib_omc)/libsundials_arkode.1.0.0.dylib"
509+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_arkode.1.dylib "$(builddir_lib_omc)/libsundials_arkode.1.dylib"
510+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_arkode.dylib "$(builddir_lib_omc)/libsundials_arkode.dylib"
511+
512+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_cvode.1.0.0.dylib "$(builddir_lib_omc)/libsundials_cvode.1.0.0.dylib"
513+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_cvode.1.dylib "$(builddir_lib_omc)/libsundials_cvode.1.dylib"
514+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_cvode.dylib "$(builddir_lib_omc)/libsundials_cvode.dylib"
515+
516+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_cvodes.2.0.0.dylib "$(builddir_lib_omc)/libsundials_cvodes.2.0.0.dylib"
517+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_cvodes.2.dylib "$(builddir_lib_omc)/libsundials_cvodes.2.dylib"
518+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_cvodes.dylib "$(builddir_lib_omc)/libsundials_cvodes.dylib"
519+
520+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_ida.2.0.0.dylib "$(builddir_lib_omc)/libsundials_ida.2.0.0.dylib"
521+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_ida.2.dylib "$(builddir_lib_omc)/libsundials_ida.2.dylib"
522+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_ida.dylib "$(builddir_lib_omc)/libsundials_ida.dylib"
523+
524+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_idas.0.0.0.dylib "$(builddir_lib_omc)/libsundials_idas.0.0.0.dylib"
525+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_idas.0.dylib "$(builddir_lib_omc)/libsundials_idas.0.dylib"
526+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_idas.dylib "$(builddir_lib_omc)/libsundials_idas.dylib"
527+
528+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_kinsol.1.0.0.dylib "$(builddir_lib_omc)/libsundials_kinsol.1.0.0.dylib"
529+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_kinsol.1.dylib "$(builddir_lib_omc)/libsundials_kinsol.1.dylib"
530+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_kinsol.dylib "$(builddir_lib_omc)/libsundials_kinsol.dylib"
531+
532+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_nvecserial.0.0.2.dylib "$(builddir_lib_omc)/libsundials_nvecserial.0.0.2.dylib"
533+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_nvecserial.0.dylib "$(builddir_lib_omc)/libsundials_nvecserial.0.dylib"
534+
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_nvecserial.dylib "$(builddir_lib_omc)/libsundials_nvecserial.dylib"
515535
# copy the dlls to the build bin directory
516536
test ! "$(SHREXT)" = ".dll" || (cp -pf 3rdParty/sundials/build/lib/*$(SHREXT) $(builddir_bin))
517537
@touch "$@"

OMCompiler/Makefile.omsi.common

Lines changed: 89 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,95 @@ OMSICPP: omc
8585

8686
OMSICPPinstall: copycppheader OMSICPP
8787
$(MAKE) -C SimulationRuntime/OMSICpp/ -f $(defaultMakefileTarget) CC="$(CC)" CXX="$(CXX)" install ANALYZATION_MODE="$(ANALYZATION_MODE)" $(CMAKE_ARGS) OMBUILDDIR=$(OMBUILDDIR) LIB_OMC=$(LIB_OMC)
88-
test ! `uname` = Darwin || install_name_tool -id @rpath/OMSICpp/libOMCppCVode.dylib $(OMBUILDDIR)/$(LIB_OMC)/OMSICpp/libOMCppCVode.dylib
89-
test ! `uname` = Darwin || install_name_tool -id @rpath/OMSICpp/libOMCppDataExchange.dylib $(OMBUILDDIR)/$(LIB_OMC)/OMSICpp/libOMCppDataExchange.dylib
90-
test ! `uname` = Darwin || install_name_tool -id @rpath/OMSICpp/libOMCppEuler.dylib $(OMBUILDDIR)/$(LIB_OMC)/OMSICpp/libOMCppEuler.dylib
91-
test ! `uname` = Darwin || install_name_tool -id @rpath/OMSICpp/libOMCppNewton.dylib $(OMBUILDDIR)/$(LIB_OMC)/OMSICpp/libOMCppNewton.dylib
92-
test ! `uname` = Darwin || install_name_tool -id @rpath/OMSICpp/libOMCppSimulationSettings.dylib $(OMBUILDDIR)/$(LIB_OMC)/OMSICpp/libOMCppSimulationSettings.dylib
93-
test ! `uname` = Darwin || install_name_tool -id @rpath/OMSICpp/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/OMSICpp/libOMCppSolver.dylib
94-
test ! `uname` = Darwin || install_name_tool -id @rpath/OMSICpp/libOMCppSystemBase.dylib $(OMBUILDDIR)/$(LIB_OMC)/OMSICpp/libOMCppSystemBase.dylib
95-
test ! `uname` = Darwin || install_name_tool -id @rpath/OMSICpp/libOMCppExtendedSystem.dylib $(OMBUILDDIR)/$(LIB_OMC)/OMSICpp/libOMCppExtendedSystem.dylib
96-
test ! `uname` = Darwin || install_name_tool -id @rpath/OMSICpp/libOMCppSystemOMSI.dylib $(OMBUILDDIR)/$(LIB_OMC)/OMSICpp/libOMCppSystemOMSI.dylib
97-
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/OMSICpp/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/OMSICpp/libOMCppCVode.dylib
98-
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/OMSICpp/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/OMSICpp/libOMCppEuler.dylib
88+
# TODO: Fix this chaos!
89+
# Correct every lib directly after it is compiled and before it is linked to the next target!
90+
# Add RPATH handling to SimulationRuntime/OMSICpp/CMakeLists.txt
91+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppDataExchange.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppDataExchange.dylib
92+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppDataExchange.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppDataExchange.dylib
93+
94+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppMath.dylib
95+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppExtensionUtilities.dylib
96+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppModelicaUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppModelicaUtilities.dylib
97+
98+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppEuler.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppEuler.dylib
99+
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppEuler.dylib
100+
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppEuler.dylib
101+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppEuler.dylib
102+
103+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppRTEuler.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppRTEuler.dylib
104+
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppRTEuler.dylib
105+
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppRTEuler.dylib
106+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppRTEuler.dylib
107+
108+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppRK12.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppRK12.dylib
109+
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppRK12.dylib
110+
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppRK12.dylib
111+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppRK12.dylib
112+
113+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppNewton.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppNewton.dylib
114+
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppNewton.dylib
115+
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppNewton.dylib
116+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppNewton.dylib
117+
118+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppSimulationSettings.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSimulationSettings.dylib
119+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSimulationSettings.dylib
120+
121+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSolver.dylib
122+
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSolver.dylib
123+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSolver.dylib
124+
125+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppSystemBase.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSystemBase.dylib
126+
test ! `uname` = Darwin || install_name_tool -change libOMCppSimulationSettings.dylib @rpath/libOMCppSimulationSettings.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSystemBase.dylib
127+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSystemBase.dylib
128+
129+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppIDA.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppIDA.dylib
130+
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppIDA.dylib
131+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppIDA.dylib
132+
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppIDA.dylib
133+
134+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppFMU.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppFMU.dylib
135+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppFMU.dylib
136+
137+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppKinsol.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppKinsol.dylib
138+
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppKinsol.dylib
139+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppKinsol.dylib
140+
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppKinsol.dylib
141+
142+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppExtendedSystem.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppExtendedSystem.dylib
143+
test ! `uname` = Darwin || install_name_tool -change libOMCppSystemBase.dylib @rpath/libOMCppSystemBase.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppExtendedSystem.dylib
144+
test ! `uname` = Darwin || install_name_tool -change libOMCppSimulationSettings.dylib @rpath/libOMCppSimulationSettings.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppExtendedSystem.dylib
145+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppExtendedSystem.dylib
146+
147+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppSystemOMSI.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSystemOMSI.dylib
148+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtendedSystem.dylib @rpath/libOMCppExtendedSystem.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSystemOMSI.dylib
149+
test ! `uname` = Darwin || install_name_tool -change libOMCppSystemBase.dylib @rpath/libOMCppSystemBase.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSystemOMSI.dylib
150+
test ! `uname` = Darwin || install_name_tool -change libOMCppSimulationSettings.dylib @rpath/libOMCppSimulationSettings.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSystemOMSI.dylib
151+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSystemOMSI.dylib
152+
153+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppCVode.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppCVode.dylib
154+
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppCVode.dylib
155+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppCVode.dylib
156+
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppCVode.dylib
157+
158+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppUmfPack.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppUmfPack.dylib
159+
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppUmfPack.dylib
160+
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppUmfPack.dylib
161+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppUmfPack.dylib
162+
163+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppLinearSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppLinearSolver.dylib
164+
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppLinearSolver.dylib
165+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppLinearSolver.dylib
166+
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppLinearSolver.dylib
167+
168+
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppSimController.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSimController.dylib
169+
test ! `uname` = Darwin || install_name_tool -change libOMCppModelicaUtilities.dylib @rpath/libOMCppModelicaUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSimController.dylib
170+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/omsicpp/libOMCppSimController.dylib
171+
172+
# This should be done somewhere else as well...
173+
test ! `uname` = Darwin || install_name_tool -add_rpath @executable_path/../$(LIB_OMC)/omsicpp/ $(OMBUILDDIR)/bin/OMCppOSUSimulation
174+
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/bin/OMCppOSUSimulation
175+
test ! `uname` = Darwin || install_name_tool -change libOMCppModelicaUtilities.dylib @rpath/libOMCppModelicaUtilities.dylib $(OMBUILDDIR)/bin/OMCppOSUSimulation
99176

100177
OMSICPPclean:
101178
$(MAKE) -C SimulationRuntime/OMSICpp/ -f $(defaultMakefileTarget) clean OMBUILDDIR=$(OMBUILDDIR)
179+
rm -rf $(OMBUILDDIR)/$(LIB_OMC)/omsicpp

OMCompiler/SimulationRuntime/c/Makefile.common

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ install: bootstrap-dependencies $(LIBSIMULATION) $(LIBFMIRUNTIME) $(ALL_OBJS) fm
287287
test ! -f libSimulationRuntimeC.bc || cp libSimulationRuntimeC.bc $(builddir_lib)/emcc/libSimulationRuntimeC.so
288288
test ! `uname` = Darwin || install_name_tool -change libsundials_idas.0.dylib @rpath/libsundials_idas.0.dylib $(builddir_lib)/$(LIBFMIRUNTIME)
289289
test ! `uname` = Darwin || install_name_tool -change libsundials_ida.2.dylib @rpath/libsundials_ida.2.dylib $(builddir_lib)/$(LIBFMIRUNTIME)
290+
test ! `uname` = Darwin || install_name_tool -change libsundials_cvodes.2.dylib @rpath/libsundials_cvodes.2.dylib $(builddir_lib)/$(LIBFMIRUNTIME)
291+
test ! `uname` = Darwin || install_name_tool -change libsundials_cvode.1.dylib @rpath/libsundials_cvode.1.dylib $(builddir_lib)/$(LIBFMIRUNTIME)
290292
test ! `uname` = Darwin || install_name_tool -change libsundials_nvecserial.0.dylib @rpath/libsundials_nvecserial.0.dylib $(builddir_lib)/$(LIBFMIRUNTIME)
291293
test ! `uname` = Darwin || install_name_tool -change libsundials_kinsol.1.dylib @rpath/libsundials_kinsol.1.dylib $(builddir_lib)/$(LIBFMIRUNTIME)
292294
# C runtime libs

0 commit comments

Comments
 (0)