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

opt not linked #6

Open
jf-li00 opened this issue Jan 29, 2024 · 1 comment
Open

opt not linked #6

jf-li00 opened this issue Jan 29, 2024 · 1 comment

Comments

@jf-li00
Copy link

jf-li00 commented Jan 29, 2024

in function opt_callgraph in AFLGo/scripts/gen_distance_fast.py, which is need for instrumentation, the opt command is needed however not installed/linked

def opt_callgraph(args, binary):
    print(f"({STEP}) Constructing CG for {binary}..")
    dot_files = args.temporary_directory / DOT_DIR_NAME
    prefix = dot_files / f"{binary.name}"
    cmd = ["opt", "-dot-callgraph", f"{binary}",
           "-callgraph-dot-filename-prefix", prefix,
           "-o", "/dev/null"]
    log_p = args.temporary_directory / f"step{STEP}.log"
    with log_p.open("w") as f:
        try:
            subprocess.run(cmd, stderr=f, check=True, cwd=dot_files)
        except subprocess.CalledProcessError:
            abort(args)

could be resolved by simpliy adding a symbol link for opt in build-llvm-11.sh

@MrDalekCaan
Copy link

use following command to add opt to PATH

export PATH= /usr/lib/llvm-11/bin: $PATH

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

2 participants