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

[JOSS] Install from source fails #40

Closed
hgandhi2411 opened this issue Sep 6, 2022 · 13 comments · Fixed by #41
Closed

[JOSS] Install from source fails #40

hgandhi2411 opened this issue Sep 6, 2022 · 13 comments · Fixed by #41

Comments

@hgandhi2411
Copy link

  • For conda install, the command should be conda install -c conda-forge thermofun instead of conda install thermofun in README.

  • Installation from source fails with this message:

>>> ./install-dependencies.sh
Cloning into 'json'...
remote: Enumerating objects: 35355, done.
remote: Counting objects: 100% (1004/1004), done.
remote: Compressing objects: 100% (385/385), done.
remote: Total 35355 (delta 461), reused 874 (delta 375), pack-reused 34351
Receiving objects: 100% (35355/35355), 178.64 MiB | 8.38 MiB/s, done.
Resolving deltas: 100% (21772/21772), 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
-- Using the multi-header code from /Users/hetagandhi/code/json/include/
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/hetagandhi/code/json/build
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/include
-- Installing: /usr/local/include/nlohmann
-- Installing: /usr/local/include/nlohmann/ordered_map.hpp
-- Installing: /usr/local/include/nlohmann/json.hpp
-- Installing: /usr/local/include/nlohmann/adl_serializer.hpp
-- Installing: /usr/local/include/nlohmann/byte_container_with_subtype.hpp
-- Installing: /usr/local/include/nlohmann/detail
-- Installing: /usr/local/include/nlohmann/detail/hash.hpp
-- Installing: /usr/local/include/nlohmann/detail/string_escape.hpp
-- Installing: /usr/local/include/nlohmann/detail/json_custom_base_class.hpp
-- Installing: /usr/local/include/nlohmann/detail/json_ref.hpp
-- Installing: /usr/local/include/nlohmann/detail/conversions
-- Installing: /usr/local/include/nlohmann/detail/conversions/to_chars.hpp
-- Installing: /usr/local/include/nlohmann/detail/conversions/from_json.hpp
-- Installing: /usr/local/include/nlohmann/detail/conversions/to_json.hpp
-- Installing: /usr/local/include/nlohmann/detail/value_t.hpp
-- Installing: /usr/local/include/nlohmann/detail/input
-- Installing: /usr/local/include/nlohmann/detail/input/position_t.hpp
-- Installing: /usr/local/include/nlohmann/detail/input/parser.hpp
-- Installing: /usr/local/include/nlohmann/detail/input/json_sax.hpp
-- Installing: /usr/local/include/nlohmann/detail/input/binary_reader.hpp
-- Installing: /usr/local/include/nlohmann/detail/input/input_adapters.hpp
-- Installing: /usr/local/include/nlohmann/detail/input/lexer.hpp
-- Installing: /usr/local/include/nlohmann/detail/string_concat.hpp
-- Installing: /usr/local/include/nlohmann/detail/macro_scope.hpp
-- Installing: /usr/local/include/nlohmann/detail/output
-- Installing: /usr/local/include/nlohmann/detail/output/output_adapters.hpp
-- Installing: /usr/local/include/nlohmann/detail/output/serializer.hpp
-- Installing: /usr/local/include/nlohmann/detail/output/binary_writer.hpp
-- Installing: /usr/local/include/nlohmann/detail/meta
-- Installing: /usr/local/include/nlohmann/detail/meta/is_sax.hpp
-- Installing: /usr/local/include/nlohmann/detail/meta/call_std
-- Installing: /usr/local/include/nlohmann/detail/meta/call_std/end.hpp
-- Installing: /usr/local/include/nlohmann/detail/meta/call_std/begin.hpp
-- Installing: /usr/local/include/nlohmann/detail/meta/identity_tag.hpp
-- Installing: /usr/local/include/nlohmann/detail/meta/type_traits.hpp
-- Installing: /usr/local/include/nlohmann/detail/meta/cpp_future.hpp
-- Installing: /usr/local/include/nlohmann/detail/meta/detected.hpp
-- Installing: /usr/local/include/nlohmann/detail/meta/void_t.hpp
-- Installing: /usr/local/include/nlohmann/detail/meta/std_fs.hpp
-- Installing: /usr/local/include/nlohmann/detail/json_pointer.hpp
-- Installing: /usr/local/include/nlohmann/detail/exceptions.hpp
-- Installing: /usr/local/include/nlohmann/detail/abi_macros.hpp
-- Installing: /usr/local/include/nlohmann/detail/macro_unscope.hpp
-- Installing: /usr/local/include/nlohmann/detail/iterators
-- Installing: /usr/local/include/nlohmann/detail/iterators/iter_impl.hpp
-- Installing: /usr/local/include/nlohmann/detail/iterators/json_reverse_iterator.hpp
-- Installing: /usr/local/include/nlohmann/detail/iterators/iteration_proxy.hpp
-- Installing: /usr/local/include/nlohmann/detail/iterators/iterator_traits.hpp
-- Installing: /usr/local/include/nlohmann/detail/iterators/internal_iterator.hpp
-- Installing: /usr/local/include/nlohmann/detail/iterators/primitive_iterator.hpp
-- Installing: /usr/local/include/nlohmann/thirdparty
-- Installing: /usr/local/include/nlohmann/thirdparty/hedley
-- Installing: /usr/local/include/nlohmann/thirdparty/hedley/hedley.hpp
-- Installing: /usr/local/include/nlohmann/thirdparty/hedley/hedley_undef.hpp
-- Installing: /usr/local/include/nlohmann/json_fwd.hpp
-- Installing: /usr/local/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake
-- Installing: /usr/local/share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake
-- Installing: /usr/local/share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake
-- Installing: /usr/local/share/pkgconfig/nlohmann_json.pc
./install-dependencies.sh: line 41: wget: command not found
tar: Error opening archive: Failed to open 'default.tar.bz2'
CMake Warning:
  Ignoring extra path from command line:

   ".."


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:

    spdlogConfig.cmake
    spdlog-config.cmake

  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
@allanleal
Copy link
Contributor

allanleal commented Sep 6, 2022

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).

@hgandhi2411
Copy link
Author

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.

@gdmiron
Copy link
Member

gdmiron commented Sep 14, 2022

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.

@defencedog
Copy link

@hgandhi2411 @gdmiron will there be any support forARM64architecture?

@gdmiron
Copy link
Member

gdmiron commented Sep 15, 2022

@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?

@defencedog
Copy link

@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

@gdmiron gdmiron linked a pull request Sep 16, 2022 that will close this issue
@gdmiron
Copy link
Member

gdmiron commented Sep 16, 2022

@hgandhi2411 I made the requested updates to the install dependencies and readme, see #41

@defencedog
Copy link

@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

@gdmiron
Copy link
Member

gdmiron commented Oct 13, 2022

@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.

@hgandhi2411
Copy link
Author

hgandhi2411 commented Nov 3, 2022

@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

@defencedog
Copy link

@hgandhi2411 No I couldn't run ...though I could build
#39 (comment)

@hgandhi2411
Copy link
Author

@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.

@defencedog
Copy link

@hgandhi2411 Problem is resolved on ARM64 Android: #39 (comment)

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

Successfully merging a pull request may close this issue.

4 participants