GithubHelp home page GithubHelp logo

Comments (7)

patrafter1999 avatar patrafter1999 commented on June 6, 2024

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

from triton.

JonathanSalwan avatar JonathanSalwan commented on June 6, 2024

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/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib \
      -DPYTHON_INCLUDE_DIRS=/opt/homebrew/opt/[email protected]/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 \
      ..

from triton.

patrafter1999 avatar patrafter1999 commented on June 6, 2024

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,

from triton.

JonathanSalwan avatar JonathanSalwan commented on June 6, 2024

SystemError: initialization of triton did not return an extension module

From experiences, it can comes from:

  • Not the correct python version compiled. Like you compile for py3.10 but py3.11 is used.
  • The libtriton.dylib used by the Python interpreter can't find dependencies.

from triton.

patrafter1999 avatar patrafter1999 commented on June 6, 2024

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?

from triton.

JonathanSalwan avatar JonathanSalwan commented on June 6, 2024

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/[email protected]/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)

from triton.

patrafter1999 avatar patrafter1999 commented on June 6, 2024

I am not familiar with all those tools, but I will figure it out. Thanks heaps, @JonathanSalwan !

from triton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.