py4n6 / pytsk

Python bindings for The Sleuth Kit (libtsk)
Apache License 2.0
92 stars 24 forks source link

Unable to build pytsk3/libtsk on macOS Monterey on M1 #88

Closed smclinden closed 2 years ago

smclinden commented 2 years ago
In file included from sleuthkit/tsk/fs/../pool/pool_compat.hpp:13:
In file included from sleuthkit/tsk/fs/../pool/tsk_pool.hpp:18:
sleuthkit/tsk/fs/../pool/tsk_pool.h:43:16: error: redefinition of '_TSK_POOL_VOLUME_INFO'
typedef struct _TSK_POOL_VOLUME_INFO {
               ^
/usr/local/include/tsk/pool/tsk_pool.h:43:16: note: previous definition is here
typedef struct _TSK_POOL_VOLUME_INFO {
               ^
In file included from sleuthkit/tsk/fs/apfs_compat.cpp:15:
In file included from sleuthkit/tsk/fs/../pool/apfs_pool_compat.hpp:13:
In file included from sleuthkit/tsk/fs/../pool/pool_compat.hpp:13:
In file included from sleuthkit/tsk/fs/../pool/tsk_pool.hpp:18:
sleuthkit/tsk/fs/../pool/tsk_pool.h:55:16: error: redefinition of '_TSK_POOL_INFO'
typedef struct _TSK_POOL_INFO {
               ^
/usr/local/include/tsk/pool/tsk_pool.h:55:16: note: previous definition is here
typedef struct _TSK_POOL_INFO {
               ^
9 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
(plaso_env) MacBook-Pro:pytsk seanmclinden$ pip install pytsk3
Collecting pytsk3
  Using cached pytsk3-20211111.tar.gz (3.2 MB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pytsk3
  Building wheel for pytsk3 (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [292 lines of output]
      running bdist_wheel
      running build
      running build_ext
      configure:
      Building:
         afflib support:                        no
         libewf support:                        no
         zlib support:                          no

         libvhdi support:                       no
         libvmdk support:                       no
      Features:
         Java/JNI support:                      no
         Multithreading:                        no
joachimmetz commented 2 years ago

Looks like an issue with building sleuthkit from source, @smclinden are you able to build the sleuthkit from source on the same M1? Are you building with treat warnings as errors?

smclinden commented 2 years ago

Apparently, TSK was installed using Homebrew and that set up conflicts with the header files.

Uninstalling the Homebrew version fixed the issue (probably something to consider including in the documentation).