- Index
- » Developer
- » OpenModelica development
- » can't simulate with latest trunk
can't simulate with latest trunk
can't simulate with latest trunk
I installed the latest mmc, then did a make clean and make in OpenModelica. I got a working OMedit, but it can't simulate:
Code:
Translation 18:15:16 0:0-0:0 Error building simulator. Buildlog: gcc-4.2 -falign-functions -msse2 -mfpmath=sse -I"/Users/wjanssen/Desktop/OMedit.app/Contents/Resources/include/omc" -I. -L"/local/PARC-QM/META/Modelica/test-circuits" -c -o rlc_series.o rlc_series.c
gcc-4.2 -falign-functions -msse2 -mfpmath=sse -I"/Users/wjanssen/Desktop/OMedit.app/Contents/Resources/include/omc" -I. -L"/local/PARC-QM/META/Modelica/test-circuits" -c -o rlc_series_records.o rlc_series_records.c
g++-4.2 -I. -o rlc_series rlc_series.o rlc_series_records.o -I"/Users/wjanssen/Desktop/OMedit.app/Contents/Resources/include/omc" -I. -L"/local/PARC-QM/META/Modelica/test-circuits" -L"/local/PARC-QM/META/Modelica/test-circuits" -falign-functions -msse2 -mfpmath=sse -L"/Users/wjanssen/Desktop/OMedit.app/Contents/Resources/lib/omc" -lSimulationRuntimeC -ldl -linteractive -lexpat -L/local/open-modelica/lib -lintl -liconv -lsundials_kinsol -lsundials_nvecserial -llapack -lpthread -lf2c
Undefined symbols for architecture x86_64:
"_mmc_jumper", referenced from:
_omc_assert_function in libSimulationRuntimeC.a(omc_error.o)
_omc_throw_function in libSimulationRuntimeC.a(omc_error.o)
_omc_terminate_function in libSimulationRuntimeC.a(omc_error.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [omc_main_target] Error 1
Re: can't simulate with latest trunk
mmc_jumper is present in libSimulationRuntimeC.a, so it must be some linking issue I'm not seeing here.
Code:
% nm /Users/wjanssen/Desktop/OMedit.app/Contents/Resources/lib/omc/libSimulationRuntimeC.a | grep mmc_jumper
U _mmc_jumper
nm: no name list
U _mmc_jumper
0000000000000008 C _mmc_jumper
U _mmc_jumper
%
Re: can't simulate with latest trunk
The only difference I can see from the linux version is that the symbols are prefixed "_" in OSX. Of course everything works in Linux and nothing in OSX.
- sjoelund.se
- 1700 Posts
Re: can't simulate with latest trunk
Ok, I figured out how to solve it. Simply run:
Code:
ld -o OSXUGLYHACK.o -r util/omc_error.o ./meta/meta_modelica_builtin.o ./meta/meta_modelica_string_lit.o ./meta/realString.o ./meta/meta_modelica_real.o ./meta/gc/gc.o ./meta/gc/common.o ./meta/gc/roots.o ./meta/gc/generational.o ./meta/gc/marksweep.o ./util/base_array.o ./util/boolean_array.o ./util/division.o ./util/index_spec.o ./util/integer_array.o ./util/java_interface.o ./util/list.o ./util/memory_pool.o ./util/modelica_string.o ./util/modelinfo.o ./util/read_write.o ./util/read_matlab4.o ./util/real_array.o ./util/ringbuffer.o ./util/rtclock.o ./util/string_array.o ./util/utility.o ./util/varinfo.o ./math-support/bigden.o ./math-support/biglag.o ./math-support/dgesv_aux.o ./math-support/dogleg.o ./math-support/dpmpar.o ./math-support/enorm.o ./math-support/fdjac1.o ./math-support/hybrd.o ./math-support/hybrd1.o ./math-support/hybrj.o ./math-support/lsame.o ./math-support/nelmead.o ./math-support/newuoa.o ./math-support/newuob.o ./math-support/nonlinearSystem.o ./math-support/nonlinearSolverHybrd.o ./math-support/qform.o ./math-support/qrfac.o ./math-support/r1mpyq.o ./math-support/r1updt.o ./math-support/trsapp.o ./math-support/update.o ./simulation/solver/daux.o ./simulation/solver/ddasrt.o ./simulation/solver/ddassl.o ./simulation/solver/dassl.o ./simulation/solver/delay.o ./simulation/solver/dlamch.o ./simulation/solver/dlinpk.o ./simulation/solver/events.o ./simulation/solver/initialization.o ./simulation/solver/initialization_data.o ./simulation/solver/ipopt_initialization.o ./simulation/solver/model_help.o ./simulation/solver/solver_main.o ./simulation/solver/kinsol_initialization.o ./simulation/solver/newuoa_initialization.o ./simulation/solver/simplex_initialization.o ./simulation/solver/nelderMeadEx_initialization.o ./simulation/results/read_csv.o ./simulation/results/simulation_result_csv.o ./simulation/results/simulation_result_mat.o ./simulation/results/simulation_result_plt.o ./simulation/options.o ./simulation/simulation_input_xml.o ./simulation/simulation_runtime.o ./simulation/../linearization/linearize.o meta/meta_modelica_catch.o meta/meta_modelica.o
Followed by:
Code:
ar -ru libSimulationRuntimeC.a OSXUGLYHACK
This makes the linker suddenly find the symbols. Stupid OSX linkers. Now to see if I can do this without breaking the other tools...
- sjoelund.se
- 1700 Posts
Re: can't simulate with latest trunk
Try https://trac.openmodelica.org/OpenModel … eset/13088
And please add bug reports to the trac in the future
- sjoelund.se
- 1700 Posts
- Index
- » Developer
- » OpenModelica development
- » can't simulate with latest trunk