question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

clang: error: unknown argument: '-fstack-usage'

See original GitHub issue

Describe the bug A clear and concise description of what the bug is. First of all, thank you for your attention,our product is firmware, it contains .c and .h files,and then, When i use the codecheck for static check scanning and analyzer, it was in trouble. some errors in my program, like this:

[INFO 2021-10-11 10:53] - [66/5082] clang-tidy analyzed screen_adapter.c successfully. … Analyzing screen_adapter.c with clangsa failed! clang: error: unknown argument: ‘-fstack-usage’ … [INFO 2021-10-11 10:57] - ----==== Summary ====---- [INFO 2021-10-11 10:57] - Successfully analyzed [INFO 2021-10-11 10:57] - clang-tidy: 2541 [INFO 2021-10-11 10:57] - Failed to analyze [INFO 2021-10-11 10:57] - clangsa: 2541 [INFO 2021-10-11 10:57] - Total analyzed compilation commands: 2541 [INFO 2021-10-11 10:57] - ----=================---- [INFO 2021-10-11 10:57] - Analysis finished.

CodeChecker version You can get version info by running CodeChecker version.

CodeChecker analyzer version:

Kind | Version

Base package version | 6.17.0
Package build date | 2021-10-09T15:44
Git commit ID (hash) | 70dc02187b90da06e62f4272075336347b4242b2 Git tag information | 6.17

CodeChecker web version:

Kind | Version

Base package version | 6.17.0
Package build date | 2021-10-09T15:44
Git commit ID (hash) | 70dc02187b90da06e62f4272075336347b4242b2 Git tag information | 6.17
Server supported API (Thrift) | 6.43
Client API (Thrift) | 6.43

To Reproduce Steps to reproduce the behaviour:

When i use the codecheck for static check scanning and analyzer,some errors in my program, like this: Analyzing screen_adapter.c with clangsa failed! clang: error: unknown argument: ‘-fstack-usage’

  1. Run command ‘…’
  2. Go to ‘…’
  3. Click on ‘…’
  4. Scroll down to ‘…’
  5. See error

Expected behaviour What you expected to happen. there is no problem.

Desktop (please complete the following information)

  • OS: [e.g. Linux]----------------------------------linux DockerContainer
  • Browser: [e.g. Firefox, Chrome]
  • Version: [e.g. 22]

Additional context Add any other context about the problem. No

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
csordasmartoncommented, Oct 11, 2021

Did you rebuild the CodeChecker package (make clean_package && make package)?

By the way what is your original compiler (gcc, g++, clang, …)? Can you please share us one translation unit from your compilation database?

1reaction
csordasmartoncommented, Oct 11, 2021

You can add this unknown option (-fstack-usage) above this line: https://github.com/Ericsson/codechecker/blob/70dc02187b90da06e62f4272075336347b4242b2/analyzer/codechecker_analyzer/buildlog/log_parser.py#L108

After it works fine and you can build/analyze you project successfully you can create a pull request from this change and we will merge it to our repository 😊

Read more comments on GitHub >

github_iconTop Results From Across the Web

clang: error: unknown argument: '-fstack-protector-strong' #289
On clang 3.4 I am getting this issue using the Experimental build instructions: http://klee.github.io/experimental/ I am using Debian Jessie ...
Read more >
clang-tidy reporting many error: unknown argument
I am running an embedded C project based on a tricore-gcc compiler. I made a compile_commands.json file that works well.
Read more >
clang: error: unknown argument: '-fstack-protector-strong'
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our ......
Read more >
Sentry Install clang: error: unknown argument: '-fstack ...
Hello! Every time I install Sentry, I run into a new problem. Now I need install Sentry service on the Centos 7.4 OS....
Read more >
clang++: error: unknown argument: '-imsvc' when cross ...
We use ExternalProject_Add and a custom toolchain file (below), to cross compile with Clang/LLVM. On Linux, this works great, with no issues ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found