daducci / AMICO

Accelerated Microstructure Imaging via Convex Optimization (AMICO) from diffusion MRI data
Other
105 stars 62 forks source link

Install fail on Apple Silicon #174

Closed dkp closed 10 months ago

dkp commented 1 year ago

Problem: The installation works on Linux, but fails on apple silicon.

OS: Ventura 13.6.1 Hardware: Mac Studio M2

Installation conda create -n noddi python=3.11 conda activate noddi pip install dmri-amico

Things appear to go wrong here: packages/setuptools/command/build_py.py:204: _Warning: Package 'dicelib.include' is absent from the packages configuration. !! After this a giant list of errors occurs:


              ********************************************************************************
              ############################
              # Package would be ignored #
              ############################
              Python recognizes 'dicelib.include' as an importable package[^1],
              but it is absent from setuptools' `packages` configuration.

              This leads to an ambiguous overall configuration. If you want to distribute this
              package, please make sure that 'dicelib.include' is explicitly added
              to the `packages` configuration field.

              Alternatively, you can also rely on setuptools' discovery methods
              (for example by using `find_namespace_packages(...)`/`find_namespace:`
              instead of `find_packages(...)`/`find:`).

              You can read more about "package discovery" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

              If you don't want 'dicelib.include' to be distributed and are
              already explicitly excluding 'dicelib.include' via
              `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
              you can try to use `exclude_package_data`, or `include-package-data=False` in
              combination with a more fine grained `package-data` configuration.

              You can read more about "package data files" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

              [^1]: For Python, any directory (with suitable naming) can be imported,
                    even if it does not contain any `.py` files.
                    On the other hand, currently there is no concept of package data
                    directory, all directories are treated like packages.
              ********************************************************************************

      !!
        check.warn(importable)
      /private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/setuptools/command/build_py.py:204: _Warning: Package 'dicelib.include.psimpl_v7_src' is absent from the `packages` configuration.
      !!

              ********************************************************************************
              ############################
              # Package would be ignored #
              ############################
              Python recognizes 'dicelib.include.psimpl_v7_src' as an importable package[^1],
              but it is absent from setuptools' `packages` configuration.

              This leads to an ambiguous overall configuration. If you want to distribute this
              package, please make sure that 'dicelib.include.psimpl_v7_src' is explicitly added
              to the `packages` configuration field.

              Alternatively, you can also rely on setuptools' discovery methods
              (for example by using `find_namespace_packages(...)`/`find_namespace:`
              instead of `find_packages(...)`/`find:`).

              You can read more about "package discovery" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

              If you don't want 'dicelib.include.psimpl_v7_src' to be distributed and are
              already explicitly excluding 'dicelib.include.psimpl_v7_src' via
              `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
              you can try to use `exclude_package_data`, or `include-package-data=False` in
              combination with a more fine grained `package-data` configuration.

              You can read more about "package data files" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

              [^1]: For Python, any directory (with suitable naming) can be imported,
                    even if it does not contain any `.py` files.
                    On the other hand, currently there is no concept of package data
                    directory, all directories are treated like packages.
              ********************************************************************************

      !!
        check.warn(importable)
      copying dicelib/Tsf.pyx -> build/lib.macosx-11.1-arm64-cpython-311/dicelib
      copying dicelib/clustering.pyx -> build/lib.macosx-11.1-arm64-cpython-311/dicelib
      copying dicelib/connectivity.pyx -> build/lib.macosx-11.1-arm64-cpython-311/dicelib
      copying dicelib/image.pyx -> build/lib.macosx-11.1-arm64-cpython-311/dicelib
      copying dicelib/lazytractogram.pxd -> build/lib.macosx-11.1-arm64-cpython-311/dicelib
      copying dicelib/lazytractogram.pyx -> build/lib.macosx-11.1-arm64-cpython-311/dicelib
      copying dicelib/smoothing.pyx -> build/lib.macosx-11.1-arm64-cpython-311/dicelib
      copying dicelib/split_cluster.pyx -> build/lib.macosx-11.1-arm64-cpython-311/dicelib
      copying dicelib/streamline.hpp -> build/lib.macosx-11.1-arm64-cpython-311/dicelib
      copying dicelib/streamline.pyx -> build/lib.macosx-11.1-arm64-cpython-311/dicelib
      copying dicelib/tractogram.pyx -> build/lib.macosx-11.1-arm64-cpython-311/dicelib
      creating build/lib.macosx-11.1-arm64-cpython-311/dicelib/include
      copying dicelib/include/Catmull.h -> build/lib.macosx-11.1-arm64-cpython-311/dicelib/include
      copying dicelib/include/Vector.h -> build/lib.macosx-11.1-arm64-cpython-311/dicelib/include
      creating build/lib.macosx-11.1-arm64-cpython-311/dicelib/include/psimpl_v7_src
      copying dicelib/include/psimpl_v7_src/psimpl.h -> build/lib.macosx-11.1-arm64-cpython-311/dicelib/include/psimpl_v7_src
      running build_ext
      performance hint: dicelib/connectivity.pyx:284:39: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
      performance hint: dicelib/connectivity.pyx:287:39: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
      performance hint: dicelib/connectivity.pyx:297:39: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
      performance hint: dicelib/connectivity.pyx:300:39: Exception check will always require the GIL to be acquired. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
      Compiling dicelib/lazytractogram.pyx because it changed.
      Compiling dicelib/image.pyx because it changed.
      Compiling dicelib/streamline.pyx because it changed.
      Compiling dicelib/tractogram.pyx because it changed.
      Compiling dicelib/clustering.pyx because it changed.
      Compiling dicelib/split_cluster.pyx because it changed.
      Compiling dicelib/connectivity.pyx because it changed.
      Compiling dicelib/Tsf.pyx because it changed.
      Compiling dicelib/smoothing.pyx because it changed.
      [1/9] Cythonizing dicelib/Tsf.pyx
      [2/9] Cythonizing dicelib/clustering.pyx
      [3/9] Cythonizing dicelib/connectivity.pyx
      [4/9] Cythonizing dicelib/image.pyx
      [5/9] Cythonizing dicelib/lazytractogram.pyx
      [6/9] Cythonizing dicelib/smoothing.pyx
      [7/9] Cythonizing dicelib/split_cluster.pyx
      [8/9] Cythonizing dicelib/streamline.pyx
      [9/9] Cythonizing dicelib/tractogram.pyx
      Parallel compilation using 12 threads
      building 'dicelib.lazytractogram' extension
      building 'dicelib.streamline' extension
      building 'dicelib.image' extension
      creating build/temp.macosx-11.1-arm64-cpython-311
      creating build/temp.macosx-11.1-arm64-cpython-311
      creating build/temp.macosx-11.1-arm64-cpython-311/build
      creating build/temp.macosx-11.1-arm64-cpython-311/build
      creating build/temp.macosx-11.1-arm64-cpython-311/build
      building 'dicelib.tractogram' extension
      building 'dicelib.clustering' extension
      creating build/temp.macosx-11.1-arm64-cpython-311/build/dicelib
      creating build/temp.macosx-11.1-arm64-cpython-311/build/dicelib
      clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11 -c build/dicelib/image.cpp -o build/temp.macosx-11.1-arm64-cpython-311/build/dicelib/image.o -w -std=c++11 -g0
      building 'dicelib.connectivity' extension
      clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11 -c build/dicelib/lazytractogram.cpp -o build/temp.macosx-11.1-arm64-cpython-311/build/dicelib/lazytractogram.o -w -std=c++11 -g0
      clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11 -c build/dicelib/connectivity.cpp -o build/temp.macosx-11.1-arm64-cpython-311/build/dicelib/connectivity.o -w -std=c++11
      building 'dicelib.split_cluster' extension
      clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11 -c build/dicelib/split_cluster.cpp -o build/temp.macosx-11.1-arm64-cpython-311/build/dicelib/split_cluster.o -w -std=c++11
      clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -Idicelib -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11 -c build/dicelib/streamline.cpp -o build/temp.macosx-11.1-arm64-cpython-311/build/dicelib/streamline.o -w -std=c++11 -g0
      clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11 -c build/dicelib/tractogram.cpp -o build/temp.macosx-11.1-arm64-cpython-311/build/dicelib/tractogram.o -w -std=c++11 -g0
      clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11 -c build/dicelib/clustering.cpp -o build/temp.macosx-11.1-arm64-cpython-311/build/dicelib/clustering.o -w -std=c++11
      building 'dicelib.tsf' extension
      building 'dicelib.smoothing' extension
      clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11 -c build/dicelib/smoothing.cpp -o build/temp.macosx-11.1-arm64-cpython-311/build/dicelib/smoothing.o -w -std=c++11
      clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include -arch arm64 -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/private/var/folders/yn/zq2njbnn6cd224b_4qkprb6w0000gn/T/pip-build-env-0alrn0gz/overlay/lib/python3.11/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11 -c build/dicelib/Tsf.cpp -o build/temp.macosx-11.1-arm64-cpython-311/build/dicelib/Tsf.o -w -std=c++11
      In file included from build/dicelib/image.cpp:44:
      In file included from /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:23:
      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:150:34: error: unknown type name 'ldiv_t'
      inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
                                       ^
      In file included from build/dicelib/streamline.cpp:In file included from build/dicelib/split_cluster.cpp:43:
      In file included from /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:23:
      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:150:34: error: unknown type name 'ldiv_t'
      inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
                                       ^
      In file included from build/dicelib/connectivity.cpp:43:
      In file included from /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:23:
      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:150:34In file included from 46build/dicelib/smoothing.cpp::
      43In file included from :
      /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.hIn file included from ::23/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:
      :23:
      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:150:In file included from build/dicelib/lazytractogram.cpp:44:
      In file included from /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:2334:
      :/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h  error: error: unknown type name 'ldiv_t'unknown type name 'ldiv_t'

      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:150:34: error: unknown type name 'ldiv_t'
      :inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {150inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {

      inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {                                 ^

      :                                 ^34:
       error:                                  ^unknown type name 'ldiv_t'

      inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
                                       ^
      In file included from build/dicelib/clustering.cpp:34:
      In file included from /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:23:
      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:150:34: error: unknown type name 'ldiv_t'
      In file included from build/dicelib/Tsf.cpp:43:
      In file included from /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:23:
      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:150:34: error: unknown type name 'ldiv_t'
      inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
                                       ^
      inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
                                       ^
      In file included from build/dicelib/tractogram.cpp:44:
      In file included from /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:23:
      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:150:34: error: unknown type name 'ldiv_t'
      inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
                                       ^
      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h::151151::12/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:151::/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h151::15112::12 error: no member named 'ldiv' in the global namespace
      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h: /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h12::/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h error:   return ::ldiv(__x, __y);:
      151         ~~^::12:no member named 'ldiv' in the global namespace
      error: 12  return ::ldiv(__x, __y);

      151         ~~^::12error: /Users/dpat/fsl/bin/../include/c++/v1/stdlib.hno member named 'ldiv' in the global namespace151
       error: no member named 'ldiv' in the global namespace:
      12:: 151::  return ::ldiv(__x, __y);no member named 'ldiv' in the global namespace12error: no member named 'ldiv' in the global namespace:

      :
                ~~^
       error:
        return ::ldiv(__x, __y);no member named 'ldiv' in the global namespaceerror:
      no member named 'ldiv' in the global namespace
      error: no member named 'ldiv' in the global namespace

        return ::ldiv(__x, __y);         ~~^  return ::ldiv(__x, __y);
        return ::ldiv(__x, __y);
        return ::ldiv(__x, __y);
               ~~^         ~~^

               ~~^  return ::ldiv(__x, __y);
               ~~^

               ~~^
      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h::154154::3434/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:: 154/Users/dpat/fsl/bin/../include/c++/v1/stdlib.herror: unknown type name 'lldiv_t': :error: 154unknown type name 'lldiv_t':
      34::
       /Users/dpat/fsl/bin/../include/c++/v1/stdlib.herror: unknown type name 'lldiv_t'inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,
                                       ^
      34:154:/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h
      :                                 ^154/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h::inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,

                                       ^ 3434
      : error:
      :unknown type name 'lldiv_t':/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h154:34::
      : error: unknown type name 'lldiv_t'154
      error: unknown type name 'lldiv_t'
      :34: error: 154unknown type name 'lldiv_t':
      34inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,:
      inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,                                 ^
      inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,

                                        ^
      error: unknown type name 'lldiv_t'
                                       ^
       inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,error: /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:156::156:12: error: no member named 'lldiv' in the global namespace

                                       ^

                                       ^
      12: error: no member named 'lldiv' in the global namespace
      unknown type name 'lldiv_t'  return ::lldiv(__x, __y);
               ~~^

      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:156:12: error: no member named 'lldiv' in the global namespace
        return ::lldiv(__x, __y);
               ~~^
        return ::lldiv(__x, __y);
               ~~^
      inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,
                                       ^
      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:/Users/dpat/fsl/bin/../include/c++/v1/stdlib.h156::15612::12 :error:  no member named 'lldiv' in the global namespaceerror:
      no member named 'lldiv' in the global namespace
        return ::lldiv(__x, __y);
               ~~^  return ::lldiv(__x, __y);

               ~~^
      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:156:12: /Users/dpat/fsl/bin/../include/c++/v1/stdlib.herror: :156:12: no member named 'lldiv' in the global namespaceerror: no member named 'lldiv' in the global namespace

      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h  return ::lldiv(__x, __y);
      :  return ::lldiv(__x, __y);         ~~^

               ~~^
      156:12: error: no member named 'lldiv' in the global namespace
        return ::lldiv(__x, __y);
               ~~^
      /Users/dpat/fsl/bin/../include/c++/v1/stdlib.h:156:12: error: no member named 'lldiv' in the global namespace
        return ::lldiv(__x, __y);
               ~~^
      In file included from build/dicelib/Tsf.cpp:43In file included from :
      build/dicelib/smoothing.cppIn file included from In file included from :/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h43::
      26In file included from build/dicelib/lazytractogram.cppIn file included from :In file included from build/dicelib/clustering.cpp:3444build/dicelib/image.cppIn file included from :
      build/dicelib/tractogram.cpp:
      :
      :44In file included from :
      /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.hIn file included from :/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:4426:
      :
      /Users/dpat/fsl/bin/../include/c++/v1/string.h/Users/dpat/fsl/bin/../include/c++/v1/string.hIn file included from In file included from build/dicelib/connectivity.cpp/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:::4326/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:
      In file included from /Users/dpat/fsl/bin/../include/c++/v1/string.h26:
      :In file included from 26/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:
      :
      /Users/dpat/fsl/bin/../include/c++/v1/string.h:/Users/dpat/fsl/bin/../include/c++/v1/string.h95:::102: 95error: :unknown type name 'size_t'102:/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:
      95::In file included from 26build/dicelib/split_cluster.cppinline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) {:
      :
                                                                                                           ^95
      :26102:  error: unknown type name 'size_t':
      error: :unknown type name 'size_t'
      :95102
      ::In file included from inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) { 43:
      /Users/dpat/fsl/bin/../include/c++/v1/string.herror:
      In file included from inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) {/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h102::/Users/dpat/fsl/bin/../include/c++/v1/string.h                                                                                                     ^26
      :::
      95 :102:error: build/dicelib/streamline.cpp/Users/dpat/fsl/bin/../include/c++/v1/string.h:95 ::unknown type name 'size_t'/Users/dpat/fsl/bin/../include/c++/v1/string.h:error: 95102:
      102:unknown type name 'size_t' 46unknown type name 'size_t':
      :In file included from inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) {/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h
       :/Users/dpat/fsl/bin/../include/c++/v1/string.herror:                                                                                                      ^error: unknown type name 'size_t'

      26:

      /Users/dpat/fsl/bin/../include/c++/v1/string.h98:95::                                                                                                     ^
      102unknown type name 'size_t'98:
      inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) {
                                                                                                           ^

      inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) {
      90                                                                                                     ^
      :90: inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) {error:
      inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) {unknown type name 'size_t'                                                                                                     ^:

                                                                                                           ^
       error: unknown type name 'size_t'
      : inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) {error:
      unknown type name 'size_t'                                                                                         ^

      /Users/dpat/fsl/bin/../include/c++/v1/string.h:98:90: error: unknown type name 'size_t'
      inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) {
                                                                                               ^
      /Users/dpat/fsl/bin/../include/c++/v1/string.hinline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) {:
      98                                                                                                     ^:
      90: error: unknown type name 'size_t'
      inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) {
                                                                                               ^
      inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) {
                                                                                               ^
      /Users/dpat/fsl/bin/../include/c++/v1/string.h:98:90: error: unknown type name 'size_t'
      inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) {
                                                                                               ^
      /Users/dpat/fsl/bin/../include/c++/v1/string.h:98:90: error: unknown type name 'size_t'
      inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) {
                                                                                               ^
      /Users/dpat/fsl/bin/../include/c++/v1/string.h:98:90: error: unknown type name 'size_t'
      inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) {
                                                                                               ^
      /Users/dpat/fsl/bin/../include/c++/v1/string.h:98:90: error: unknown type name 'size_t'
      /Users/dpat/fsl/bin/../include/c++/v1/string.h:98:90: error: unknown type name 'size_t'
      inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) {
                                                                                               ^
      inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) {
                                                                                               ^
      In file included from build/dicelib/clustering.cppIn file included from :build/dicelib/image.cpp34::
      44/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:
      :/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h29::2912::12 In file included from fatal error: build/dicelib/lazytractogram.cpp'unistd.h' file not found:
      44:
      /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:29:12: In file included from In file included from build/dicelib/smoothing.cppbuild/dicelib/connectivity.cpp:In file included from #  include <unistd.h>build/dicelib/streamline.cpp:43:
      /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.hfatal error:
      ::43In file included from :
      build/dicelib/tractogram.cpp/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h::29           ^~~~~~~~~~ 44::
      In file included from 29In file included from :12: fatal error: 'unistd.h' file not found
      12build/dicelib/Tsf.cpp:43::
      /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h'unistd.h' file not found:
      /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h#  include <unistd.h>:

      #  include <unistd.h> fatal error:            ^~~~~~~~~~

      46:build/dicelib/split_cluster.cpp2929           ^~~~~~~~~~:
      'unistd.h' file not found:fatal error: 12'unistd.h' file not found: fatal error:
      /opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:#  include <unistd.h>

      29:12:'unistd.h' file not found
                 ^~~~~~~~~~:
      #  include <unistd.h>12
      ::
      #  include <unistd.h>           ^~~~~~~~~~
      fatal error:
      'unistd.h' file not found
                 ^~~~~~~~~~
      43fatal error: :
      #  include <unistd.h>/opt/homebrew/Caskroom/miniconda/base/envs/noddi/include/python3.11/Python.h:29:12:
                 ^~~~~~~~~~
      'unistd.h' file not found
       fatal error: #  include <unistd.h>
                 ^~~~~~~~~~
      'unistd.h' file not found
      #  include <unistd.h>
                 ^~~~~~~~~~
      7 errors generated.
      7 errors generated.
      7 errors generated.
      7 errors generated.
      7 errors generated.
      7 errors generated.
      7 errors generated.
      7 errors generated.
      7 errors generated.
      error: command '/Users/dpat/fsl/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for dmri-dicelib
Failed to build dmri-dicelib
ERROR: Could not build wheels for dmri-dicelib, which is required to install pyproject.toml-based projects
nightwnvol commented 1 year ago

Hi @dkp,

thanks for reporting the issue! It seems to be related to the compilation of dmri-dicelib, which is a package required by dmri-amico. It appears that the system header unistd.h is missing. Could you please try upgrading or reinstalling your C compiler (or Xcode)? This should reinstall the missing header.

dkp commented 11 months ago

Thanks for the suggestion. I updated xcode and tried again, but got the same error. Subsequently, I removed xcode and reinstalled it. The error persists.

nightwnvol commented 10 months ago

@dkp could you post the output of clang++ -v?

dkp commented 10 months ago

(noddi) 🍎 dpat@lolo temp % clang++ -v clang version 15.0.7 Target: arm64-apple-darwin22.6.0 Thread model: posix InstalledDir: /Users/dpat/fsl/bin

nightwnvol commented 10 months ago

@dkp I think your issue is related to using the clang compiler from the FSL distribution rather than the clang compiler included in XCode.

It's likely that you have added the /Users/dpat/fsl/bin folder at the beginning of the PATH env variable in your configuration file (e.g. .bash_profile or .zprofile), causing the system to use the incorrect clang compiler.

To solve this, try removing the /Users/dpat/fsl/bin entry from the PATH variable.

dkp commented 10 months ago

Yay! You did it! Thank you so much. This is not the first time FSL has caused similar problems. I not only had to put it at the end of the path, but I had to add /usr/bin to the front of the path. I also changed the fsl.sh file which, when it gets sourced, puts FSL at the front of the path:

# Manually edited fsl.sh so it does not add itself to the path first!
source ${FSLDIR}/etc/fslconf/fsl.sh

Success:

Successfully built dmri-dicelib
Installing collected packages: typing-extensions, tqdm, threadpoolctl, packaging, ordered-set, numpy, cython, setuptools-scm, scipy, nibabel, h5py, deepdiff, trx-python, dipy, dmri-dicelib, dmri-amico
Successfully installed cython-3.0.8 deepdiff-6.7.1 dipy-1.8.0 dmri-amico-2.0.1 dmri-dicelib-1.0.3 h5py-3.10.0 nibabel-5.2.0 numpy-1.26.3 ordered-set-4.1.0 packaging-23.2 scipy-1.11.4 setuptools-scm-8.0.4 threadpoolctl-3.2.0 tqdm-4.66.1 trx-python-0.2.9 typing-extensions-4.9.0