You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tl;dr: I stumbled upon cmake not detecting the ar path while it is clearly in my Ubuntu 18.04 installation.
The issue is that some generated file contains the CMAKE_AR-NOTFOUND instead of ar path. I resolved it locally by specyfing -D CMAKE_AR=/usr/bin/ar as suggested here.
root@b2e78972f3fa:~/deepstate/build_afl# CXX="$AFL_HOME/afl-clang++" CC="$AFL_HOME/afl-clang" cmake -DDEEPSTATE_AFL=ON ../
-- The C compiler identification is Clang 6.0.0
-- The CXX compiler identification is Clang 6.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /root/AFL/afl-clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /root/AFL/afl-clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /root/deepstate/build_afl
root@b2e78972f3fa:~/deepstate/build_afl# make
Scanning dependencies of target deepstate_AFL
[ 1%] Building C object CMakeFiles/deepstate_AFL.dir/src/lib/DeepState.c.o
afl-cc 2.57b by <[email protected]>
afl-as 2.57b by <[email protected]>
[+] Instrumented 1205 locations (64-bit, non-hardened mode, ratio 100%).
[ 2%] Building C object CMakeFiles/deepstate_AFL.dir/src/lib/Log.c.o
afl-cc 2.57b by <[email protected]>
afl-as 2.57b by <[email protected]>
[+] Instrumented 43 locations (64-bit, non-hardened mode, ratio 100%).
[ 3%] Building C object CMakeFiles/deepstate_AFL.dir/src/lib/Option.c.o
afl-cc 2.57b by <[email protected]>
afl-as 2.57b by <[email protected]>
[+] Instrumented 285 locations (64-bit, non-hardened mode, ratio 100%).
[ 5%] Building C object CMakeFiles/deepstate_AFL.dir/src/lib/Stream.c.o
afl-cc 2.57b by <[email protected]>
afl-as 2.57b by <[email protected]>
[+] Instrumented 280 locations (64-bit, non-hardened mode, ratio 100%).
[ 6%] Linking C static library libdeepstate_AFL.a
Error running link command: No such file or directory
CMakeFiles/deepstate_AFL.dir/build.make:147: recipe for target 'libdeepstate_AFL.a' failed
make[2]: *** [libdeepstate_AFL.a] Error 2
CMakeFiles/Makefile2:178: recipe for target 'CMakeFiles/deepstate_AFL.dir/all' failed
make[1]: *** [CMakeFiles/deepstate_AFL.dir/all] Error 2
Makefile:136: recipe for target 'all' failed
make: *** [all] Error 2
root@b2e78972f3fa:~/deepstate/build_afl# cat CMakeFiles//deepstate_AFL.dir/link.txt
CMAKE_AR-NOTFOUND qc libdeepstate_AFL.a CMakeFiles/deepstate_AFL.dir/src/lib/DeepState.c.o CMakeFiles/deepstate_AFL.dir/src/lib/Log.c.o CMakeFiles/deepstate_AFL.dir/src/lib/Option.c.o CMakeFiles/deepstate_AFL.dir/src/lib/Stream.c.o
root@b2e78972f3fa:~/deepstate/build_afl# apt install ar
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ar
root@b2e78972f3fa:~/deepstate/build_afl# ar
Usage: ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file...
ar -M [<mri-script]
The text was updated successfully, but these errors were encountered:
Tl;dr: I stumbled upon cmake not detecting the
ar
path while it is clearly in my Ubuntu 18.04 installation.The issue is that some generated file contains the
CMAKE_AR-NOTFOUND
instead ofar
path. I resolved it locally by specyfing-D CMAKE_AR=/usr/bin/ar
as suggested here.The text was updated successfully, but these errors were encountered: