Closed hgandhi2411 closed 2 years ago
Hi @hgandhi2411 You need to build & install spdlog
first (https://github.com/gabime/spdlog).
@gdmiron In the README, the conda-forge channel must be added for the conda install thermofun
to work:
conda config --add channels conda-forge
One needs to check if conda install -c conda-forge thermofun
(alternatively, conda install conda-forge::thermofun
) does not end up installing dependencies from other channels if the conda-forge channel is not the priority one (first in the list of channels in ~/.condarc
).
I am using the install_dependencies.sh
file, shouldn't that file install all required dependencies for me? If that is not the case, I would recommend creating a list of requirements and add steps that users should follow in order to get dependencies installed while building thermofun from source.
I am using the
install_dependencies.sh
file, shouldn't that file install all required dependencies for me? If that is not the case, I would recommend creating a list of requirements and add steps that users should follow in order to get dependencies installed while building thermofun from source.
Thanks for testing the build. I will make an update to the install dependencies file in the following days. Seems that spdlog is missing.
@hgandhi2411 @gdmiron will there be any support forARM64
architecture?
@defencedog I am totally for supporting different architectures. Do you have any experience with what one needs to adapt in the build and setup tools?
@gdmiron sir thanks for response give me a day! I as a chemical engineer had already compiled a fair amount of libraries on a rather unorthodox platform. Yes on Android with termux + jupyter
I will reply back give me a day
@hgandhi2411 I made the requested updates to the install dependencies and readme, see #41
@gdmiron on Android ARM64 the package successfully builds but doesn't run under python. Configure / Make log is here
n [1]: import thermofun as tf
----------------------------------------------------------------------
ImportError Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 import thermofun as tf
File /data/data/com.termux/files/usr/lib/python3.9/site-packages/thermofun/__init__.py:1, in <module>
----> 1 from thermofun.PyThermoFun import *
ImportError: dlopen failed: cannot locate symbol "_ZN6spdlog7details7log_msgC1ENS_10source_locEN3fmt2v817basic_string_viewIcEENS_5level10level_enumES6_" referenced by "/data/data/com.termux/files/usr/lib/libThermoFun.so"...
In [2]: import chemicalfun as cf
----------------------------------------------------------------------
ImportError Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 import chemicalfun as cf
File /data/data/com.termux/files/usr/lib/python3.9/site-packages/chemicalfun/__init__.py:1, in <module>
----> 1 from chemicalfun.PyChemicalFun import *
ImportError: dlopen failed: cannot locate symbol "_ZN6spdlog7details7log_msgC1ENS_10source_locEN3fmt2v817basic_string_viewIcEENS_5level10level_enumES6_" referenced by "/data/data/com.termux/files/usr/lib/libChemicalFun.so"...
The source of this problem is chemicalfun
& the error is mentioned here Now chemicalfun
is not on github so who will address this issue don't know
@defencedog when you build you should try without having fmt installed. The spdlog 1.10.0 should have an internal version of fmt that it uses. Maybe there is a conflict between fmt in spdlog and fmt installed. So try without having any fmt, but only splog v.1.10.0. In any case I can help with chemicalfun also. I maintain it on Bitbucket.
@gdmiron Thermofun build from source doesn't seem to work for Mac ARM64 processors. Seems like @defencedog was able to build the package fine on Android ARM64. So, I am going to proceed with testing on the conda install.
Pasting the error here in case you decide to provide support in the future
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [ThermoFun/libThermoFun.dylib] Error 1
make[1]: *** [ThermoFun/CMakeFiles/ThermoFun.dir/all] Error 2
make: *** [all] Error 2
@hgandhi2411 No I couldn't run ...though I could build https://github.com/thermohub/thermofun/issues/39#issuecomment-1291063466
@gdmiron Please add a comment in the readme file that the "build from source" doesn't work for ARM processors, unless you plan to fix it.
@hgandhi2411 Problem is resolved on ARM64 Android: https://github.com/thermohub/thermofun/issues/39#issuecomment-1320903633
For conda install, the command should be
conda install -c conda-forge thermofun
instead ofconda install thermofun
in README.Installation from source fails with this message:
CMake Error: The source directory "/Users/hetagandhi/code/eigen-code" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. Cloning into 'pybind11'... remote: Enumerating objects: 24615, done. remote: Counting objects: 100% (170/170), done. remote: Compressing objects: 100% (101/101), done. remote: Total 24615 (delta 78), reused 126 (delta 59), pack-reused 24445 Receiving objects: 100% (24615/24615), 9.21 MiB | 6.78 MiB/s, done. Resolving deltas: 100% (17232/17232), done. -- The CXX compiler identification is AppleClang 13.1.6.13160021 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- pybind11 v2.11.0 dev1 -- CMake 3.24.1 -- Found PythonInterp: /Users/hetagandhi/opt/anaconda3/envs/thermofun/bin/python (found suitable version "3.7.13", minimum required is "3.6") -- Found PythonLibs: /Users/hetagandhi/opt/anaconda3/envs/thermofun/lib/libpython3.7m.dylib -- PYTHON 3.7.13 -- Performing Test HAS_FLTO -- Performing Test HAS_FLTO - Success -- pybind11::lto enabled -- Performing Test HAS_FLTO_THIN -- Performing Test HAS_FLTO_THIN - Success -- pybind11::thin_lto enabled -- Configuring done -- Generating done -- Build files have been written to: /Users/hetagandhi/code/pybind11/build Install the project... -- Install configuration: "" -- Installing: /usr/local/include/pybind11 -- Installing: /usr/local/include/pybind11/attr.h -- Installing: /usr/local/include/pybind11/embed.h -- Installing: /usr/local/include/pybind11/numpy.h -- Installing: /usr/local/include/pybind11/pybind11.h -- Installing: /usr/local/include/pybind11/operators.h -- Installing: /usr/local/include/pybind11/iostream.h -- Installing: /usr/local/include/pybind11/gil.h -- Installing: /usr/local/include/pybind11/chrono.h -- Installing: /usr/local/include/pybind11/stl_bind.h -- Installing: /usr/local/include/pybind11/buffer_info.h -- Installing: /usr/local/include/pybind11/options.h -- Installing: /usr/local/include/pybind11/stl -- Installing: /usr/local/include/pybind11/stl/filesystem.h -- Installing: /usr/local/include/pybind11/functional.h -- Installing: /usr/local/include/pybind11/stl.h -- Installing: /usr/local/include/pybind11/detail -- Installing: /usr/local/include/pybind11/detail/type_caster_base.h -- Installing: /usr/local/include/pybind11/detail/typeid.h -- Installing: /usr/local/include/pybind11/detail/descr.h -- Installing: /usr/local/include/pybind11/detail/internals.h -- Installing: /usr/local/include/pybind11/detail/common.h -- Installing: /usr/local/include/pybind11/detail/class.h -- Installing: /usr/local/include/pybind11/detail/init.h -- Installing: /usr/local/include/pybind11/common.h -- Installing: /usr/local/include/pybind11/eval.h -- Installing: /usr/local/include/pybind11/cast.h -- Installing: /usr/local/include/pybind11/eigen.h -- Installing: /usr/local/include/pybind11/pytypes.h -- Installing: /usr/local/include/pybind11/complex.h -- Installing: /usr/local/share/cmake/pybind11/pybind11Config.cmake -- Installing: /usr/local/share/cmake/pybind11/pybind11ConfigVersion.cmake -- Installing: /usr/local/share/cmake/pybind11/FindPythonLibsNew.cmake -- Installing: /usr/local/share/cmake/pybind11/pybind11Common.cmake -- Installing: /usr/local/share/cmake/pybind11/pybind11Tools.cmake -- Installing: /usr/local/share/cmake/pybind11/pybind11NewTools.cmake -- Installing: /usr/local/share/cmake/pybind11/pybind11Targets.cmake -- Installing: /usr/local/share/pkgconfig/pybind11.pc Cloning into 'chemicalfun'... remote: Enumerating objects: 1172, done. remote: Counting objects: 100% (1172/1172), done. remote: Compressing objects: 100% (946/946), done. remote: Total 1172 (delta 639), reused 406 (delta 169), pack-reused 0 Receiving objects: 100% (1172/1172), 1.13 MiB | 3.49 MiB/s, done. Resolving deltas: 100% (639/639), done. -- The CXX compiler identification is AppleClang 13.1.6.13160021 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- CondaAware: conda environment recognized! -- CondaAware: CONDA_PREFIX=/Users/hetagandhi/opt/anaconda3/envs/thermofun -- CondaAware: CONDA_AWARE_PREFIX=CONDA_PREFIX (/Users/hetagandhi/opt/anaconda3/envs/thermofun) -- CondaAware: CMAKE_INSTALL_PREFIX set to CONDA_AWARE_PREFIX -- CondaAware: appended CONDA_AWARE_PREFIX to CMAKE_PREFIX_PATH -- CondaAware: appended CONDA_AWARE_PREFIX/include to include directories -- CondaAware: appended CONDA_AWARE_PREFIX/lib to link directories -- Found PythonInterp: /Users/hetagandhi/opt/anaconda3/envs/thermofun/bin/python (found suitable version "3.7.13", minimum required is "3.6") -- Found PythonLibs: /Users/hetagandhi/opt/anaconda3/envs/thermofun/lib/libpython3.7m.dylib -- Performing Test HAS_FLTO -- Performing Test HAS_FLTO - Success -- Performing Test HAS_FLTO_THIN -- Performing Test HAS_FLTO_THIN - Success -- Found pybind11: /usr/local/include (found version "2.11.0dev1") -- Found pybind11 v2.11.0: /usr/local/include;/Users/hetagandhi/opt/anaconda3/envs/thermofun/include/python3.7m -- Found pybind11 v2.11.0: /usr/local/include;/Users/hetagandhi/opt/anaconda3/envs/thermofun/include/python3.7m CMake Error at cmake/modules/ChemicalFunFindDeps.cmake:14 (find_package): By not providing "Findspdlog.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "spdlog", but CMake did not find one.
Could not find a package configuration file provided by "spdlog" with any of the following names:
Add the installation prefix of "spdlog" to CMAKE_PREFIX_PATH or set "spdlog_DIR" to a directory containing one of the above files. If "spdlog" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:115 (include)
-- Configuring incomplete, errors occurred! See also "/Users/hetagandhi/code/chemicalfun/build/CMakeFiles/CMakeOutput.log". See also "/Users/hetagandhi/code/chemicalfun/build/CMakeFiles/CMakeError.log". expr: syntax error