Closed patrafter1999 closed 3 months ago
FYI, I followed the install instructions, which all went successfully.
$ git clone https://github.com/JonathanSalwan/Triton
$ cd Triton
$ mkdir build ; cd build
$ cmake ..
$ make -j3
FYI, I followed the install instructions, which all went successfully.
$ git clone https://github.com/JonathanSalwan/Triton $ cd Triton $ mkdir build ; cd build $ cmake .. $ make -j3
So is it working? Once you did make -j3
, you can then use make install
and the python package will be pushed into your site-packages
. (no need to do python -m build --wheel
)
I'm also using MacOS with custom dependencies and below my compile:
cmake -DCAPSTONE_INCLUDE_DIRS=/Users/jonathan/Works/Tools/capstone-5.0.1/include/ \
-DCAPSTONE_LIBRARIES=/Users/jonathan/Works/Tools/capstone-5.0.1/libcapstone.a \
-DCAPSTONE_VERSION_HEADER=/Users/jonathan/Works/Tools/capstone-5.0.1/include/capstone/capstone.h \
-DCMAKE_INSTALL_PREFIX=/opt/homebrew/ \
-DPYTHON_EXECUTABLE=/opt/homebrew/bin/python3 \
-DPYTHON_LIBRARIES=/opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib \
-DPYTHON_INCLUDE_DIRS=/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11/ \
-DLLVM_INTERFACE=ON \
-DCMAKE_PREFIX_PATH=/Users/jonathan/Works/Tools/llvm-project-14.0.0/build \
-DBITWUZLA_INTERFACE=ON \
-DBITWUZLA_INCLUDE_DIRS=/usr/local/include/ \
-DBITWUZLA_LIBRARIES="/usr/local/lib/libbitwuzla.dylib" \
-DBOOST_INTERFACE=OFF \
..
Thanks a lot for your reply, @JonathanSalwan.
Everything went well until I've got that error message with 'import triton' :(. I use anaconda env with python 3.10. I had trouble with LLVM and BITWULZA, so I tried without them.
I will give it another go with your cmake. Thanks.
Cheers,
SystemError: initialization of triton did not return an extension module
From experiences, it can comes from:
libtriton.dylib
used by the Python interpreter can't find dependencies.That's interesting.
I can dig in more on the first point. What do you suggest me to check or correct for your second point on libtriton.dylib
?
Make sure you have only one libtriton
installed on your system.
$ sudo /usr/libexec/locate.updatedb
$ locate triton.so
/Users/jonathan/Works/Tools/Triton/build/src/libtriton/triton.so
/opt/homebrew/lib/python3.11/site-packages/triton.so
$ otool -L /opt/homebrew/lib/python3.11/site-packages/triton.so
/opt/homebrew/lib/python3.11/site-packages/triton.so:
@rpath/libtriton.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/homebrew/opt/z3/lib/libz3.4.12.dylib (compatibility version 4.12.0, current version 4.12.2)
@rpath/libLTO.dylib (compatibility version 1.0.0, current version 14.0.0)
@rpath/libRemarks.dylib (compatibility version 1.0.0, current version 14.0.0)
/usr/local/lib/libbitwuzla.0.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/Python (compatibility version 3.11.0, current version 3.11.0)
/usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0)
/usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.61.1)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.12)
/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1600.157.0)
I am not familiar with all those tools, but I will figure it out. Thanks heaps, @JonathanSalwan !
Hi Guys,
I have spent half a day trying to install this very promising package on my Mac OSX (Sonoma 14.3.1), but it ended with this weird error, which I can't debug any more. Your help will be greatly appreciated.
Regards,