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

complie error #57980

Closed
gtt1995 opened this issue Sep 26, 2022 · 5 comments
Closed

complie error #57980

gtt1995 opened this issue Sep 26, 2022 · 5 comments
Labels
build-problem compiler-rt:fuzzer invalid Resolved as invalid, i.e. not a bug

Comments

@gtt1995
Copy link
Contributor

gtt1995 commented Sep 26, 2022

llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:861:68: error: invalid suffix 's' on integer constant
/TimeOfUnit=/duration_cast(0s), {0}, DFT,
1 error generated.

@fhahn
Copy link
Contributor

fhahn commented Sep 26, 2022

Could you please specify which version of LLVM this is for, the full compiler invocation and the compiler version you are using? Without that, it is impossible to say if it is an issue with your build environment or an issue in LLVM

@fhahn fhahn added incomplete Issue not complete (e.g. missing a reproducer, build arguments, etc.) and removed new issue labels Sep 26, 2022
@gtt1995
Copy link
Contributor Author

gtt1995 commented Sep 26, 2022

gutaotao@x1-1:/workspace/llvm-project/compiler-rt/lib/fuzzer$ uname -a
Linux x1-1 5.13.0-52-generic #59~20.04.1-Ubuntu SMP Thu Jun 16 21:21:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
gutaotao@x1-1:/workspace/llvm-project/compiler-rt/lib/fuzzer$ cat build.sh
#!/bin/sh
LIBFUZZER_SRC_DIR=$(dirname $0)
CXX="${CXX:-clang}"
for f in $LIBFUZZER_SRC_DIR/*.cpp; do
clang++ -g -O2 -fno-omit-frame-pointer -std=c++11 $f -c &

$CXX -g -O2 -fno-omit-frame-pointer -std=c++11 $f -c &

done
wait
rm -f libFuzzer.a
ar ru libFuzzer.a Fuzzer*.o
rm -f Fuzzer*.o

gutaotao@x1-1:/workspace/llvm-project/compiler-rt/lib/fuzzer$ uname
Linux
gutaotao@x1-1:/workspace/llvm-project/compiler-rt/lib/fuzzer$ uname -a
Linux x1-1 5.13.0-52-generic #59~20.04.1-Ubuntu SMP Thu Jun 16 21:21:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
gutaotao@x1-1:/workspace/llvm-project/compiler-rt/lib/fuzzer$ cat build.sh
#!/bin/sh
LIBFUZZER_SRC_DIR=$(dirname $0)
CXX="${CXX:-clang}"
for f in $LIBFUZZER_SRC_DIR/*.cpp; do
clang++ -g -O2 -fno-omit-frame-pointer -std=c++11 $f -c &

$CXX -g -O2 -fno-omit-frame-pointer -std=c++11 $f -c &

done
wait
rm -f libFuzzer.a
ar ru libFuzzer.a Fuzzer*.o
rm -f Fuzzer*.o

gutaotao@x1-1:/workspace/llvm-project/compiler-rt/lib/fuzzer$ clang --version
clang version 11.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
gutaotao@x1-1:/workspace/llvm-project/compiler-rt/lib/fuzzer$ clang++ --version
clang version 11.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
gutaotao@x1-1:/workspace/llvm-project/compiler-rt/lib/fuzzer$

@gtt1995
Copy link
Contributor Author

gtt1995 commented Sep 26, 2022

commit bebc969 (HEAD -> main, origin/main, origin/HEAD)
Author: David Green [email protected]
Date: Mon Sep 26 09:55:10 2022 +0100

[AArch64] Enable FeatureFuseAdrpAdd for all Arm cpus

The commit D120104 enabled FeatureFuseAdrpAdd for -mcpu=generic,
allowing the linker to relax adrp;add pairs where possible. D132075
extended that to neoverse-n1, this patch extends it to all other cortex
and neoverse cpus for the same reasons.

Differential Revision: https://reviews.llvm.org/D134521

@gtt1995
Copy link
Contributor Author

gtt1995 commented Sep 26, 2022

commit bebc969 (HEAD -> main, origin/main, origin/HEAD) Author: David Green [email protected] Date: Mon Sep 26 09:55:10 2022 +0100

[AArch64] Enable FeatureFuseAdrpAdd for all Arm cpus

The commit D120104 enabled FeatureFuseAdrpAdd for -mcpu=generic,
allowing the linker to relax adrp;add pairs where possible. D132075
extended that to neoverse-n1, this patch extends it to all other cortex
and neoverse cpus for the same reasons.

Differential Revision: https://reviews.llvm.org/D134521

Hello, thank you for your reply.
For the official git repo, I did not change any code.

@fhahn
Copy link
Contributor

fhahn commented Sep 26, 2022

It looks like you are using manual build commands. Please make sure to use the same flags as if configured by cmake when building.

clang++ -g -O2 -fno-omit-frame-pointer -std=c++11 $f -c &

This doesn't look correct, latest LLVM requires C++17 to build: https://llvm.org/docs/CodingStandards.html#c-standard-versions

@fhahn fhahn closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2022
@EugeneZelenko EugeneZelenko added invalid Resolved as invalid, i.e. not a bug compiler-rt:fuzzer build-problem and removed incomplete Issue not complete (e.g. missing a reproducer, build arguments, etc.) labels Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-problem compiler-rt:fuzzer invalid Resolved as invalid, i.e. not a bug
Projects
None yet
Development

No branches or pull requests

3 participants