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

Build fails due to some issue in unicorn_afl #24

Open
nishant412 opened this issue Oct 17, 2023 · 1 comment
Open

Build fails due to some issue in unicorn_afl #24

nishant412 opened this issue Oct 17, 2023 · 1 comment

Comments

@nishant412
Copy link

nishant412 commented Oct 17, 2023

I am trying to build AFLplusplus from source following the instructions on here - https://github.com/AFLplusplus/AFLplusplus/blob/stable/docs/INSTALL.md

When I run make distrib it seems to error out during unicorn_mode build stage. Here is what I observed:

[ 94%] Built target sample_x86
make[3]: Leaving directory '/home/nb-ap@THP.LOCAL/Tools/AFLplusplus/unicorn_mode/unicornafl/unicorn/build'
make[2]: *** [Makefile:146: all] Error 2
make[2]: Leaving directory '/home/nb-ap@THP.LOCAL/Tools/AFLplusplus/unicorn_mode/unicornafl/unicorn/build'
make[1]: *** [Makefile:11: unicorn/build/libunicorn-common.a] Error 2
make[1]: Leaving directory '/home/nb-ap@THP.LOCAL/Tools/AFLplusplus/unicorn_mode/unicornafl'
make: [GNUmakefile:651: distrib] Error 1 (ignored)

Any suggestions on how to resolve this? I am running Ubuntu 22.04.1 LTS on a x86_64 machine

Edit : Looking at the output logs better, I realize this is where the errors start

[ 93%] Building C object CMakeFiles/sample_x86.dir/samples/sample_x86.c.o
make[4]: Entering directory '/home/nb-ap@THP.LOCAL/Tools/AFLplusplus/unicorn_mode/unicornafl/unicorn/build'
[ 93%] Building C object CMakeFiles/sample_x86_32_gdt_and_seg_regs.dir/samples/sample_x86_32_gdt_and_seg_regs.c.o
make[4]: Entering directory '/home/nb-ap@THP.LOCAL/Tools/AFLplusplus/unicorn_mode/unicornafl/unicorn/build'
[ 93%] Building C object CMakeFiles/sample_batch_reg.dir/samples/sample_batch_reg.c.o
make[4]: Entering directory '/home/nb-ap@THP.LOCAL/Tools/AFLplusplus/unicorn_mode/unicornafl/unicorn/build'
@syntax error in archive script, line 1
/usr/bin/ar: /home/nb-ap: No such file or directory
@make[4]: *** [CMakeFiles/bundling_target.dir/build.make:73: libunicorn.a] Error 9

I am guessing the arguments to the call to ar don't have quotes correctly, coz it seems to ignore my home directory name after the @ . Where should I edit to fix this?

@vanhauser-thc
Copy link
Member

sorry I somehow never saw this issue.
easy fix: build under a different user, e.g. root, and do sudo make install.

also the repo that would need the fix is this one: https://github.com/AFLplusplus/unicornafl

@vanhauser-thc vanhauser-thc transferred this issue from AFLplusplus/AFLplusplus Apr 6, 2024
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