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

Installation failing on MacBook M2 Pro with Sonoma 14.4.1 #1038

Open
joshiji opened this issue Jun 17, 2024 · 8 comments
Open

Installation failing on MacBook M2 Pro with Sonoma 14.4.1 #1038

joshiji opened this issue Jun 17, 2024 · 8 comments

Comments

@joshiji
Copy link

joshiji commented Jun 17, 2024

Python version

('python=3.9.6 (default, Aug 11 2023, 19:44:49) \n'
 '[Clang 15.0.0 (clang-1500.0.40.1)]')
'os=macOS-14.4.1-arm64-arm-64bit'

Description

When I am running pip install asammdf, it is failing to compile cutils.o. Following is the log output starting at failing part. Please let me know if full output will help in resolving this:

...
      creating build/temp.macosx-10.9-universal2-cpython-39
      creating build/temp.macosx-10.9-universal2-cpython-39/src
      creating build/temp.macosx-10.9-universal2-cpython-39/src/asammdf
      creating build/temp.macosx-10.9-universal2-cpython-39/src/asammdf/blocks
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -I/private/var/folders/bz/hsz3cjcd1cx0fvs8cgcfqzwh0000gn/T/pip-build-env-htz4l547/overlay/lib/python3.9/site-packages/numpy/_core/include -I/Users/santosh/dev/area51/ridot_telemetry/venv/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -c src/asammdf/blocks/cutils.c -o build/temp.macosx-10.9-universal2-cpython-39/src/asammdf/blocks/cutils.o -std=c99
      src/asammdf/blocks/cutils.c:253:20: error: no member named 'elsize' in 'struct _PyArray_Descr'
                  descr->elsize = max;
                  ~~~~~  ^
      src/asammdf/blocks/cutils.c:361:24: warning: unused variable 'current_size' [-Wunused-variable]
          unsigned long long current_size = 0, * offsets_array;
                             ^
      src/asammdf/blocks/cutils.c:1241:28: warning: comparison of integers of different signs: 'int' and 'unsigned long long' [-Wsign-compare]
                  for (int i=0; i<cycles; i++) {
                                ~^~~~~~~
      src/asammdf/blocks/cutils.c:1272:16: warning: incompatible pointer types assigning to 'PyArrayObject *' (aka 'struct tagPyArrayObject *') from 'PyObject *' (aka 'struct _object *') [-Wincompatible-pointer-types]
              result = PyArray_ZEROS(1, dims, NPY_BOOL, 0);
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      3 warnings and 1 error generated.
      error: command '/usr/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 asammdf
Failed to build asammdf
ERROR: Could not build wheels for asammdf, which is required to install pyproject.toml-based projects
@joshiji
Copy link
Author

joshiji commented Jun 17, 2024

For now, I was able to install using --prefer-binary option for pip install.

@KingJuleZ
Copy link

Thanks that worked well to install it. However then I run into a numpy problem...

    from .cutils import get_channel_raw_bytes
ImportError: numpy.core.multiarray failed to import

@danielhrisca
Copy link
Owner

danielhrisca commented Jun 18, 2024

For now you should not use asammdf in combination with numpy 2.0.0

@KingJuleZ
Copy link

Hi Daniel, could you add more details on that? My pip doesn't find no version 2.0.0 of jumpy. However, @joshiji 's solution works for now...

@danielhrisca
Copy link
Owner

It was a typo. Numpy

@KingJuleZ
Copy link

Alright got that, thanks for the great work!

@joshiji
Copy link
Author

joshiji commented Jun 18, 2024

@KingJuleZ I realised that --prefer-binary installed v6 of asammdf, which is like four years old. There don't seem to be binary wheels available for Apple Silicon Macs for new version.

@KingJuleZ
Copy link

Oh okay, however for my code it does the job

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

3 participants