Opened 8 years ago

Closed 4 years ago

#3896 closed defect (wontfix)

Cannot build Cpp runtime on OS X

Reported by: hkiel Owned by: somebody
Priority: high Milestone: Future
Component: Cpp Run-time Version: v1.10.0-dev-nightly
Keywords: Cc:

Description

When I configure OMCompiler with --with-cppruntime, configuring cpp runtime fails because it does not find sundials (which I would expect to be built beforehand):

[...]
-- A library with LAPACK API found.
-- Lapack Libraries
-- /System/Library/Frameworks/Accelerate.framework/System/Library/Frameworks/Accelerate.framework
CMake Error at CMakeLists.txt:493 (MESSAGE):
  Could not find Sundials, specify environment variable SUNDIALS_ROOT


-- Configuring incomplete, errors occurred!
See also "/Users/x/src/OpenModelica/OMCompiler/SimulationRuntime/cpp/Build_dynamic/CMakeFiles/CMakeOutput.log".
gmake[4]: Entering directory '/Users/x/src/OpenModelica/OMCompiler/SimulationRuntime/cpp/Build_dynamic'
gmake[4]: *** No targets specified and no makefile found.  Stop.
gmake[4]: Leaving directory '/Users/x/src/OpenModelica/OMCompiler/SimulationRuntime/cpp/Build_dynamic'

However, when I installed sundials on the system (via macports), I get the following error when sundials is linking:

[  3%] Linking C shared library libsundials_arkode.dylib
cd /Users/x/src/OpenModelica/OMCompiler/3rdParty/sundials/build/src/arkode && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/sundials_arkode_shared.dir/link.txt --verbose=1
/opt/local/bin/clang  -lm -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup  -Wl,-undefined -Wl,dynamic_lookup -compatibility_version 1.0.0 -current_version 1.0.0 -o libsundials_arkode.1.0.0.dylib -install_name /Users/x/src/OpenModelica/OMCompiler/3rdParty/sundials/build/src/arkode/libsundials_arkode.1.dylib CMakeFiles/sundials_arkode_shared.dir/arkode.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_band.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_bandpre.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_bbdpre.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_butcher.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_dense.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_direct.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_io.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_pcg.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_spbcgs.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_spfgmr.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_spgmr.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_spils.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_sptfqmr.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_sparse.c.o CMakeFiles/sundials_arkode_shared.dir/arkode_klu.c.o CMakeFiles/sundials_arkode_shared.dir/__/sundials/sundials_nvector.c.o CMakeFiles/sundials_arkode_shared.dir/__/sundials/sundials_math.c.o CMakeFiles/sundials_arkode_shared.dir/__/sundials/sundials_direct.c.o CMakeFiles/sundials_arkode_shared.dir/__/sundials/sundials_band.c.o CMakeFiles/sundials_arkode_shared.dir/__/sundials/sundials_dense.c.o CMakeFiles/sundials_arkode_shared.dir/__/sundials/sundials_iterative.c.o CMakeFiles/sundials_arkode_shared.dir/__/sundials/sundials_pcg.c.o CMakeFiles/sundials_arkode_shared.dir/__/sundials/sundials_spbcgs.c.o CMakeFiles/sundials_arkode_shared.dir/__/sundials/sundials_spfgmr.c.o CMakeFiles/sundials_arkode_shared.dir/__/sundials/sundials_spgmr.c.o CMakeFiles/sundials_arkode_shared.dir/__/sundials/sundials_sptfqmr.c.o CMakeFiles/sundials_arkode_shared.dir/__/sundials/sundials_sparse.c.o -lklu -lamd -lcolamd -lbtf 
ld: library not found for -lklu
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/arkode/CMakeFiles/sundials_arkode_shared.dir/build.make:799: recipe for target 'src/arkode/libsundials_arkode.1.0.0.dylib' failed
gmake[6]: *** [src/arkode/libsundials_arkode.1.0.0.dylib] Error 1
gmake[6]: Leaving directory '/Users/x/src/OpenModelica/OMCompiler/3rdParty/sundials/build'
CMakeFiles/Makefile2:202: recipe for target 'src/arkode/CMakeFiles/sundials_arkode_shared.dir/all' failed

Change History (5)

comment:1 Changed 8 years ago by hkiel

With PR #948 I can compile, but running the testsuite still does not work on OS X, because Accelerate library (Cminpack?) is missing:

Error: Fehler beim Bauen des Simulators. Build log: clang++ -fopenmp=libomp  -Winvalid-pch -O0 -g -DNDEBUG  -std=c++11 -stdlib=libc++ -DBOOST_ALL_DYN_LINK   -DUSE_DGESV -DUSE_LOGGER -DOMC_BUILD -DUSE_THREAD -DSUNDIALS_MAJOR_VERSION=2 -DSUNDIALS_MINOR_VERSION=6 -DPMC_USE_SUNDIALS -I"." -I"/Users/x/src/OpenModelica/build/include/omc/cpp/" -I.  -I"/opt/local/include" -I"." -I"/Users/x/src/OpenModelica/OMCompiler/3rdParty/sundials/build/include"     -DMEASURETIME_PROFILEBLOCKS -DUSE_LOGGER  -c -o OMCppClockedTypesCalcHelperMain.o OMCppClockedTypesCalcHelperMain.cpp
+clang++ -fopenmp=libomp -shared -o OMCppClockedTypes.dylib OMCppClockedTypesCalcHelperMain.o    -lOMCppSystem -lOMCppModelicaUtilities -lOMCppDataExchange -lOMCppMath -lOMCppExtensionUtilities -lOMCppOMCFactory -L"/Users/x/src/OpenModelica/build/lib/x86_64-darwin15.5.0/omc/cpp"    -Wl,-rpath,"/Users/x/src/OpenModelica/build/lib/x86_64-darwin15.5.0/omc/cpp"  -L"." -lboost_filesystem-mt -lboost_system-mt -lboost_serialization-mt -lboost_program_options-mt  -lModelicaExternalC -lModelicaStandardTables -L/System/Library/Frameworks -lAccelerate -lAccelerate 
+ld: library not found for -lAccelerate
+clang: error: linker command failed with exit code 1 (use -v to see invocation)
+make[1]: *** [ClockedTypes] Error 1

comment:2 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.10.0 to 1.11.0

Ticket retargeted after milestone closed

comment:3 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.11.0 to 1.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:4 Changed 7 years ago by casella

  • Milestone changed from 1.12.0 to Future

The milestone of this ticket has been reassigned to "Future".

If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.

If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".

In both cases, a short informative comment would be welcome.

comment:5 Changed 4 years ago by AnHeuermann

  • Resolution set to wontfix
  • Status changed from new to closed

Closing this ticket because it is out of date: We dropped support for OSX, SUNDIALS was updated to a neweer version, the OSX build was fixed (and broken again and fixed again and broken again ...)

Note: See TracTickets for help on using tickets.