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

Building from scratch #272

Open
morpheuslord opened this issue Mar 30, 2023 · 7 comments
Open

Building from scratch #272

morpheuslord opened this issue Mar 30, 2023 · 7 comments

Comments

@morpheuslord
Copy link

I am trying to build ofrak from the source and I am facing the following issue.

issue

How can I rectify this issue.

@EdwardLarson
Copy link
Collaborator

Hi @morpheuslord , thanks for raising this issue! Can you describe the steps you took before seeing this error, as well as the platform you are using? If you can provide as much of the information which the bug report template here asks for, that will help us help you!

@morpheuslord
Copy link
Author

i just ran

pip install -e .

@rbs-jacob
Copy link
Member

rbs-jacob commented Mar 30, 2023

@EdwardLarson I was able to replicate this error by running pip install . in the root of the clone OFRAK source directory.

@morpheuslord the recommended way to install OFRAK from source is this section on installing from source in the OFRAK docs. That page goes into detail and contains all of the relevant information. I've included a summary of that information (tested on a fresh Debian system) below.

The gist is that you have to install python3, libmagic-dev, and pip—and nodejs and npm if you want to build the GUI—and then run make develop in the relevant directories.

The install step on a Debian or Ubuntu system looks like the following.

sudo apt install git git-lfs python3 python3-pip libmagic-dev nodejs npm
python3 -m pip install --upgrade pip setuptools wheel
git clone https://github.com/redballoonsecurity/ofrak.git
cd ofrak

The step to run the make develop in all of the OFRAK directories looks like the following. This first installs NPM dependencies, then finds all files named Makefile and runs make develop in their containing directory.

for DIR in ofrak_type ofrak_io ofrak_patch_maker ofrak_core disassemblers/ofrak_angr disassemblers/ofrak_capstone; do make -C "${DIR}" develop; done
cd frontend && npm install && make develop && cd ..

@morpheuslord
Copy link
Author

i am doing this on windows is there any specific steps for windows

@rbs-jacob
Copy link
Member

@morpheuslord are you running commands from PowerShell, cmd.exe, or from bash via Cygwin or Windows Subsystem for Linux? Are you using a package manager like Choco or Winget, or no package manager?

We don't officially have OFRAK Windows support yet, although I have gotten it mostly working. There will be some upcoming GitHub issues, fixes, and other documentation related to Windows to be released shortly. In the meantime, there will be a few fixes on this OFRAK on Windows pull request.

@morpheuslord
Copy link
Author

morpheuslord commented Apr 1, 2023

ok did it but still there is an issue

@rbs-jacob
Copy link
Member

@morpheuslord I responded to your other comment here, but will copy the advice in this thread as well: run the following to fix the error you're having.

python -m pip uninstall python-magic python-magic-bin
python -m pip install --upgrade python-magic-bin

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