py4n6 / pytsk

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

How do I build source directly from a git checkout? #94

Closed piercan closed 1 year ago

piercan commented 1 year ago

I tried to install in everyway on my Macbook air M1 without success. Is it possible to install and, if so, how?

joachimmetz commented 1 year ago

Can you be more specific (descriptive)? What steps did you take? what did not work for you? what message did you get?

piercan commented 1 year ago

Hi! First I installed the dependencies like afflib and sleuthkit by brew and I installed Xcode with command line support and all gone well.

Then I downloaded the library from git executing “git clone https://github.com/py4n6/pytsk”.

Changed directory to pytsk, I’m not able to build the library because I receive an error like that in attachment.

My Python version is 3.11.3.

Screenshot 2023-06-30 alle 09 09 50
joachimmetz commented 1 year ago

can you please attach the output as text, screenshots are hard to read

joachimmetz commented 1 year ago

Then I downloaded the library from git executing “git clone https://github.com/py4n6/pytsk”.

please read https://github.com/py4n6/pytsk/blob/main/README, this explains what you need to do first when you use the source directly from git

Specifically If downloaded pytsk using git you'll have to first run

piercan commented 1 year ago
gattag@AIR-DI-GAT pytsk % python3 setup.py build
running build
running build_ext
sh: configure: No such file or directory
Traceback (most recent call last):
  File "/Users/gattag/pytsk/setup.py", line 577, in <module>
    ProjectBuilder(setup_args, sys.argv).build()
  File "/Users/gattag/pytsk/setup.py", line 546, in build
    setup(
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 132, in run
    self.run_command(cmd_name)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
    self.distribution.run_command(command)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.run()
  File "/Users/gattag/pytsk/setup.py", line 346, in run
    self.configure_source(compiler)
  File "/Users/gattag/pytsk/setup.py", line 323, in configure_source
    output = subprocess.check_output(command, cwd="sleuthkit")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['sh', 'configure', '--disable-java', '--disable-multithreading', '--without-afflib', '--without-libbfio', '--without-libewf', '--without-libvhdi', '--without-libvmdk', '--without-libvslvm', '--without-zlib']' returned non-zero exit status 127.