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

Full pip install breaks on Mac systems due to leechcore issues #1194

Closed
atcuno opened this issue Jul 7, 2024 · 1 comment
Closed

Full pip install breaks on Mac systems due to leechcore issues #1194

atcuno opened this issue Jul 7, 2024 · 1 comment
Assignees

Comments

@atcuno
Copy link
Contributor

atcuno commented Jul 7, 2024

For a workshop I am hosting next week, I sent the prep instructions for students including to install Volatility from source through pip. Several students running on Macs reported issues in leechcore breaking the install process with backtraces, similar to the one below. Removing leechcore from the list of packages fixed it for them.

Building wheels for collected packages: leechcorepyc
  Building wheel for leechcorepyc (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for leechcorepyc (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [53 lines of output]
      /Applications/Xcode.app/Contents/Developer/usr/bin/make clean -C leechcore
      rm -f *.o || true
      rm -f */*.o || true
      rm -f *.so || true
      /Applications/Xcode.app/Contents/Developer/usr/bin/make clean -C leechcore_ft601_driver_linux || true
      rm -f *.o
      /Applications/Xcode.app/Contents/Developer/usr/bin/make clean -C leechcore_device_qemu || true
      rm -f *.o
      /Applications/Xcode.app/Contents/Developer/usr/bin/make clean -C leechcore_device_rawtcp || true
      rm -f *.o
      /Applications/Xcode.app/Contents/Developer/usr/bin/make clean -C ms-compress || true
      rm -f src/*.o
      rm -f *.so
      rm files/*.so || true
      rm: files/*.so: No such file or directory
      rm leechcore.so || true
      rm: leechcore.so: No such file or directory
      rm leechcorepyc/*.so || true
      rm: leechcorepyc/*.so: No such file or directory
      /Applications/Xcode.app/Contents/Developer/usr/bin/make -C leechcore
      gcc -c -o oscompatibility.o oscompatibility.c -I. -D LINUX -D _GNU_SOURCE -shared -fPIC -fvisibility=hidden -pthread `pkg-config libusb-1.0 --libs --cflags` -fPIE -fPIC -pie -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O1 -Wl,-z,noexecstack -Wall -Wno-multichar -Wno-unused-result -Wno-unused-variable -Wno-unused-value -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
      /bin/sh: pkg-config: command not found
      clang: warning: -Wl,-z,noexecstack: 'linker' input unused [-Wunused-command-line-argument]
      clang: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
      clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
      In file included from oscompatibility.c:40:
      ./oscompatibility.h:29:10: fatal error: 'libusb.h' file not found
      #include <libusb.h>
               ^~~~~~~~~~
      1 error generated.
      make[1]: *** [oscompatibility.o] Error 1
      make: *** [all] Error 2
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-universal2-cpython-311
      creating build/lib.macosx-10.9-universal2-cpython-311/leechcorepyc
      copying leechcorepyc/__init__.py -> build/lib.macosx-10.9-universal2-cpython-311/leechcorepyc
      running build_ext
      building 'leechcorepyc.leechcorepyc' extension
      creating build/temp.macosx-10.9-universal2-cpython-311
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DLINUX= -Iincludes -I/usr/include/libusb-1.0/ -I/Users/bob/Desktop/vol3venv/include -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c leechcorepyc.c -o build/temp.macosx-10.9-universal2-cpython-311/leechcorepyc.o -I. -L. -l:leechcore.so -shared -fPIC -fvisibility=hidden
      clang: warning: -l:leechcore.so: 'linker' input unused [-Wunused-command-line-argument]
      clang: warning: argument unused during compilation: '-L.' [-Wunused-command-line-argument]
      clang: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
      In file included from leechcorepyc.c:6:
      In file included from ./leechcorepyc.h:24:
      ./oscompatibility.h:28:10: fatal error: 'byteswap.h' file not found
      #include <byteswap.h>
               ^~~~~~~~~~~~
      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 leechcorepyc
Failed to build leechcorepyc
ERROR: Could not build wheels for leechcorepyc, which is required to install pyproject.toml-based projects
@digitalisx
Copy link
Contributor

We can resolve this issue, if this PR (#1157) is merge

@ikelos ikelos closed this as completed Jul 14, 2024
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