Comments (5)
The problem is that I do not have access to any Mac - however it used to work some time ago wit clang. If you are free to choose your Python version, let us forget about Python 2.
Error messages for pip install cmf
?
Can you post them here in the issues
Building from source
Should work like this:
git clone https://github.com/philippkraft/cmf
cd cmf
python3 setup.py install
cd demo
python3 tracer1d.py
Can you post me (and other users) errors?
Compiler configuration
Includes:
Lines 202 to 204 in f5bf6a4
POSIX specific settings (for Linux & Mac)
Lines 227 to 238 in f5bf6a4
Note the Mac specific setting here:
Lines 229 to 230 in f5bf6a4
Is this the problem? This might be specific for CLang (I don't know, it was a lot experimenting last time with a Mac).
All other flags are coming from the configuration of the compiler when Python was compiled. You might have better luck, if you do not use Mac OS' system Python but an extra version.
from cmf.
Thanks for your quick reply. Here is the error from calling pip install cmf (or calling python setup.py which results in the same):
python setup.py install
cmf 1.4.1
running install
running bdist_egg
running egg_info
writing cmf.egg-info/PKG-INFO
writing dependency_links to cmf.egg-info/dependency_links.txt
writing top-level names to cmf.egg-info/top_level.txt
reading manifest file 'cmf.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.dox' under directory 'cmf'
warning: no files found matching '*.png' under directory 'cmf'
warning: no files found matching '*.txt' under directory 'cmf'
writing manifest file 'cmf.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.7-x86_64/egg
running install_lib
running build_py
copying cmf/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/cmf
running build_ext
building 'cmf._cmf_core' extension
...
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/cojack/miniconda3/include -arch x86_64 -I/Users/cojack/miniconda3/include -arch x86_64 -Icmf/cmf_core_src/math/integrators/sundials_cvode/include -I/Users/cojack/miniconda3/lib/python3.6/site-packages/numpy/core/include -I/Users/cojack/miniconda3/include/python3.6m -c cmf/cmf_core_src/math/root_finding.cpp -o build/temp.macosx-10.7-x86_64-3.6/cmf/cmf_core_src/math/root_finding.o -Wno-comment -Wno-reorder -Wno-deprecated -Wno-unused -Wno-sign-compare -ggdb -std=c++11 -stdlib=libc++
In file included from cmf/cmf_core_src/math/root_finding.cpp:2:
cmf/cmf_core_src/math/root_finding.h:45:28: error: implicit instantiation of
undefined template 'std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >'
sign_error(std::string msg) : std::runti...
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note:
template is declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
In file included from cmf/cmf_core_src/math/root_finding.cpp:2:
cmf/cmf_core_src/math/root_finding.h:49:34: error: implicit instantiation of
undefined template 'std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >'
not_finite_error(std::string msg) : std:...
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note:
template is declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
In file included from cmf/cmf_core_src/math/root_finding.cpp:2:
cmf/cmf_core_src/math/root_finding.h:53:33: error: implicit instantiation of
undefined template 'std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >'
iteration_error(std::string msg) : std::...
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note:
template is declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
3 errors generated.
error: command 'gcc' failed with exit status 1
from cmf.
I am not quite convinced if it has anything to do with the python version. I am using miniconda py3.6.
Moreover, I do not use clang (since I used to have a series of issues with this). To me the output points to the missing definition of "basic_string" in the Mac c++ library.? I hoped to change this by forcing the gcc compiler. However, the library remains pointed to the Xcode one.
from cmf.
Might be a missing include (not sure), which results in an error only in xcode library. Can you try to add to root_finding.h
into line 39:
#include <string>
If it works, I will update cmf fast. root_finding.h
is younger than my last try to compile cmf on a Mac.
from cmf.
Perfect! Quite a bunch of warnings are coming up but it compiles.
Thanks a lot for your quick help.
from cmf.
Related Issues (20)
- Describe how to build a custom cmf
- Update Docs with new Solver names HOT 1
- Run CVodeKLU with CUDA
- Setup.py build libraries on clean command
- Freundlich Adsorption not working
- Can't create a SoluteWaterIntegrator HOT 1
- new flux: Schmitt-trigger HOT 4
- make potential of Dirichlet BC a time series HOT 1
- Undefined behaviour when c'tor of flux_connection throws HOT 2
- Remove integratables HOT 1
- CVodeKLU is not suitable in a SoluteWaterIntegrator HOT 1
- Add additional ET method with parameterized aerodynamic resistance HOT 5
- Diffusive singularity protection is inconsistent HOT 1
- cmf.timeseries should get a from_pandas factory function HOT 2
- Modernize the doxygen documentation HOT 1
- Allow for Python flux connections, even if they are slow HOT 1
- Simple infiltration ignores waterbalance connections regardless of their direction
- Try out scikit-build with ninja for CMF 2.0
- Update CVODE
- error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmf.