Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing on Mac OS X #1

Open
pasichnyi opened this issue Jun 14, 2021 · 2 comments
Open

Installing on Mac OS X #1

pasichnyi opened this issue Jun 14, 2021 · 2 comments

Comments

@pasichnyi
Copy link

Hi!
I'm trying to install fmipp in the Mac OS X environment (11.4) and get the error within compiling stage (below). Maybe you have any ideas from Linux experience on C++ version required for the build?

$ clang --version
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ pip install fmipp==1.5.1

Collecting fmipp==1.5.1
  Using cached fmipp-1.5.1.tar.gz (146 kB)
Building wheels for collected packages: fmipp
  Building wheel for fmipp (setup.py) ... error
ERROR: Command errored out with exit status 1:
   command: /Users/oleksil/apps/python/python-mubes/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m3/5y01q_dd1l9012r1k4y09g9h0000gn/T/pip-install-a6kximnc/fmipp_bdbd53b95fe6463f95f3f39e1c9bc6f7/setup.py'"'"'; __file__='"'"'/private/var/folders/m3/5y01q_dd1l9012r1k4y09g9h0000gn/T/pip-install-a6kximnc/fmipp_bdbd53b95fe6463f95f3f39e1c9bc6f7/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/m3/5y01q_dd1l9012r1k4y09g9h0000gn/T/pip-wheel-9ro7vurk
       cwd: /private/var/folders/m3/5y01q_dd1l9012r1k4y09g9h0000gn/T/pip-install-a6kximnc/fmipp_bdbd53b95fe6463f95f3f39e1c9bc6f7/
  Complete output (33 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'fmipp/lib/_fmippim' extension
  swigging source/fmipp/import/swig/libfmippim.i to source/fmipp/import/swig/libfmippim_wrap.cpp
  swig -python -c++ -Isource/fmipp -outdir fmipp -DUSE_SUNDIALS -o source/fmipp/import/swig/libfmippim_wrap.cpp source/fmipp/import/swig/libfmippim.i
  source/fmipp/import/base/include/FMUModelExchange_v1.h:34: Warning 402: Base class 'FMUModelExchangeBase' is incomplete.
  source/fmipp/import/utility/include/IncrementalFMU.h:23: Warning 402: Only forward declaration 'FMUModelExchangeBase' was found.
  source/fmipp/import/base/include/FMUModelExchange_v2.h:34: Warning 402: Base class 'FMUModelExchangeBase' is incomplete.
  source/fmipp/import/utility/include/IncrementalFMU.h:23: Warning 402: Only forward declaration 'FMUModelExchangeBase' was found.
  source/fmipp/import/base/include/FMUCoSimulation_v1.h:32: Warning 402: Base class 'FMUCoSimulationBase' is incomplete.
  source/fmipp/import/utility/include/InterpolatingFixedStepSizeFMU.h:18: Warning 402: Only forward declaration 'FMUCoSimulationBase' was found.
  source/fmipp/import/base/include/FMUCoSimulation_v2.h:29: Warning 402: Base class 'FMUCoSimulationBase' is incomplete.
  source/fmipp/import/utility/include/InterpolatingFixedStepSizeFMU.h:18: Warning 402: Only forward declaration 'FMUCoSimulationBase' was found.
  creating build
  creating build/temp.macosx-11-x86_64-3.9
  creating build/temp.macosx-11-x86_64-3.9/source
  creating build/temp.macosx-11-x86_64-3.9/source/fmipp
  creating build/temp.macosx-11-x86_64-3.9/source/fmipp/import
  creating build/temp.macosx-11-x86_64-3.9/source/fmipp/import/base
  creating build/temp.macosx-11-x86_64-3.9/source/fmipp/import/base/src
  creating build/temp.macosx-11-x86_64-3.9/source/fmipp/import/integrators
  creating build/temp.macosx-11-x86_64-3.9/source/fmipp/import/integrators/src
  creating build/temp.macosx-11-x86_64-3.9/source/fmipp/import/swig
  creating build/temp.macosx-11-x86_64-3.9/source/fmipp/import/utility
  creating build/temp.macosx-11-x86_64-3.9/source/fmipp/import/utility/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DFMU_BIN_DIR="darwin64" -DFMU_BIN_EXT=".dylib" -DFRONT_END_TYPE=FMIComponentFrontEnd -DFRONT_END_TYPE_INCLUDE="export/include/FMIComponentFrontEnd.h" -DUSE_SUNDIALS -UNDEBUG -Isource/fmipp/ -I/private/var/folders/m3/5y01q_dd1l9012r1k4y09g9h0000gn/T/pip-install-a6kximnc/fmipp_bdbd53b95fe6463f95f3f39e1c9bc6f7/source/fmipp -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/tcl-tk/include -I/Users/oleksil/apps/python/python-mubes/include -I/usr/local/Cellar/[email protected]/3.9.1_8/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c source/fmipp/import/base/src/BareFMU.cpp -o build/temp.macosx-11-x86_64-3.9/source/fmipp/import/base/src/BareFMU.o -g0 -std=c++11
  In file included from source/fmipp/import/base/src/BareFMU.cpp:11:
  source/fmipp/import/base/include/ModelDescription.h:22:10: fatal error: 'boost/property_tree/ptree.hpp' file not found
  #include <boost/property_tree/ptree.hpp>
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  error: command '/usr/bin/clang' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for fmipp
@pasichnyi
Copy link
Author

And actually it also hits the wall with Linux (Ubuntu 18):

  ERROR: Command errored out with exit status 1:
   command: /home/oleksii/apps/python/python-mubes/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-szzfe25a/fmipp_cae941c9e6da419bb3749df8eb35b424/setup.py'"'"'; __file__='"'"'/tmp/pip-install-szzfe25a/fmipp_cae941c9e6da419bb3749df8eb35b424/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-qqstb3wp                
       cwd: /tmp/pip-install-szzfe25a/fmipp_cae941c9e6da419bb3749df8eb35b424/
  Complete output (8 lines):                                                 
  running bdist_wheel                                                        
  running build                                                              
  running build_ext                                                          
  building 'fmipp/lib/_fmippim' extension                                    
  swigging source/fmipp/import/swig/libfmippim.i to source/fmipp/import/swig/libfmippim_wrap.cpp                                                          
  swig -python -c++ -Isource/fmipp -outdir fmipp -DUSE_SUNDIALS -o source/fmipp/import/swig/libfmippim_wrap.cpp source/fmipp/import/swig/libfmippim.i     
  unable to execute 'swig': No such file or directory                        
  error: command 'swig' failed with exit status 1                            
  ----------------------------------------                                   
  ERROR: Failed building wheel for fmipp
  Running setup.py clean for fmipp

@ewidl
Copy link
Contributor

ewidl commented Jun 21, 2021

Hi,

At first glance it look like you are missing a few dependencies. The OSX build seems to miss a complete Boost installation, in the case of Ubuntu it seems that swig is missing. On Ubuntu, make sure the following packages are installed:

  • swig
  • libsundials-serial-dev <= v.2.7.0
  • libboost-all-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants