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

Cargo build error on Ubuntu 22.04 LLVM 15 #1434

Closed
nemo6655 opened this issue Aug 21, 2023 · 4 comments
Closed

Cargo build error on Ubuntu 22.04 LLVM 15 #1434

nemo6655 opened this issue Aug 21, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@nemo6655
Copy link

When I run cargo build on Ubuntu 22.04 with LLVM 15, I got this error
error: failed to run custom build command for libafl_cc v0.10.1 (/home/ly/CLionProjects/LibAFL/libafl_cc)`

Caused by:
process didn't exit successfully: /home/ly/CLionProjects/LibAFL/target/release/build/libafl_cc-5be43f04fd2eccc7/build-script-build (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=LLVM_CONFIG
cargo:rerun-if-env-changed=LLVM_BINDIR
cargo:rerun-if-env-changed=LLVM_CXXFLAGS
cargo:rerun-if-env-changed=LLVM_LDFLAGS
cargo:rerun-if-env-changed=LLVM_VERSION
cargo:rerun-if-env-changed=LIBAFL_EDGES_MAP_SIZE
cargo:rerun-if-env-changed=LIBAFL_ACCOUNTING_MAP_SIZE
cargo:rerun-if-changed=src/common-llvm.h
cargo:rerun-if-changed=build.rs
cargo:rerun-if-changed=src/cmplog-routines-pass.cc

--- stderr
Ubuntu clang version 15.0.7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-15/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12
Candidate multilib: .;@m64
Selected multilib: .;@m64
"/usr/lib/llvm-15/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name cmplog-routines-pass.cc -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -v -fcoverage-compilation-dir=/home/ly/CLionProjects/LibAFL/libafl_cc -resource-dir /usr/lib/llvm-15/lib/clang/15.0.7 -I /usr/lib/llvm-15/include -D _GNU_SOURCE -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -D LIBAFL_EDGES_MAP_SIZE=65536 -D LIBAFL_ACCOUNTING_MAP_SIZE=65536 -D USE_NEW_PM -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++ -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/x86_64-linux-gnu -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/backward -internal-isystem /usr/lib/llvm-15/lib/clang/15.0.7/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -std=c++14 -fdeprecated-macro -fdebug-compilation-dir=/home/ly/CLionProjects/LibAFL/libafl_cc -ferror-limit 19 -fgnuc-version=4.2.1 -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/cmplog-routines-pass-b69481.o -x c++ src/cmplog-routines-pass.cc
clang -cc1 version 15.0.7 based upon LLVM 15.0.7 default target x86_64-pc-linux-gnu
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/backward"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/llvm-15/include
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++
/usr/lib/llvm-15/lib/clang/15.0.7/include
/usr/local/include
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
src/cmplog-routines-pass.cc:25:10: fatal error: 'list' file not found
#include
^~~~~~
1 error generated.
thread 'main' panicked at 'Failed to compile cmplog-routines-pass.cc', libafl_cc/build.rs:198:25
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
`

@nemo6655 nemo6655 added the bug Something isn't working label Aug 21, 2023
@tokatoka
Copy link
Member

do you have g++?

@nemo6655
Copy link
Author

yes
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

do you have g++?

@nemo6655
Copy link
Author

nemo6655 commented Aug 24, 2023

I find the same problem under other issue
#1098 (comment),
and solve it by installing the following
'sudo apt install libstdc++-12-dev'
It seems I miss some libstdc++ files.
@tokatoka thanks anyway

@tokatoka
Copy link
Member

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants