Comments (8)
The error occurs in code from the most recent commit: 1ff0458
from rchk.
If I revert that commit then it all builds fine.
from rchk.
Strange - sadly I am travelling without access to 18.04. You can try the version with "." (manually override the ifdef). What is your llvm version ? (llvm-config --version)
from rchk.
I got the guard wrong, the new API is from LLVM 5. Now should be working (but I still have to test on 18.04). Thanks for the report!
from rchk.
Yes, that works. Thanks!
from rchk.
I may have spoken a bit too soon. On Ubuntu 18.04 I now get these warnings for each source file:
WARNING:Did not recognize the compiler flag "-g3"
clang: warning: -Wl,--no-keep-files-mapped: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -Wl,--no-map-whole-files: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-fuse-ld=gold' [-Wunused-command-line-argument]
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.
clang: warning: argument unused during compilation: '-fuse-ld=gold' [-Wunused-command-line-argument]
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.
Then this error linking:
/home/jjallaire/.local/bin/wllvm++ -stdlib=libc++ -I/usr/lib/llvm-4.0/include -std=c++0x -fuse-ld=gold -Wl,--no-keep-files-mapped -Wl,--no-map-whole-files -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections -O2 -DNDEBUG -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -g3 -MMD -DBCHECK_MAX_STATES=3000000 -DCALLOCATORS_MAX_STATES=1000000 -I/usr/include/llvm-3.8/ -I/usr/lib/llvm-4.0/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -L/usr/lib/llvm-4.0/lib errcheck.o state.o lannotate.o patterns.o cgclosure.o linemsg.o symbols.o guards.o liveness.o callocators.o common.o allocators.o exceptions.o balance.o cprotect.o freshvars.o vectors.o errors.o -lLLVM-4.0 -o errcheck
WARNING:Did not recognize the compiler flag "-g3"
common.cpp:126: error: undefined reference to 'llvm::Linker::linkModules(llvm::Module&, std::__1::unique_ptr<llvm::Module, std::__1::default_delete<llvm::Module> >, unsigned int)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ERROR:Failed to compile using given arguments: [-stdlib=libc++ -I/usr/lib/llvm-4.0/include -std=c++0x -fuse-ld=gold -Wl,--no-keep-files-mapped -Wl,--no-map-whole-files -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections -O2 -DNDEBUG -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -g3 -MMD -DBCHECK_MAX_STATES=3000000 -DCALLOCATORS_MAX_STATES=1000000 -I/usr/include/llvm-3.8/ -I/usr/lib/llvm-4.0/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -L/usr/lib/llvm-4.0/lib errcheck.o state.o lannotate.o patterns.o cgclosure.o linemsg.o symbols.o guards.o liveness.o callocators.o common.o allocators.o exceptions.o balance.o cprotect.o freshvars.o vectors.o errors.o -lLLVM-4.0 -o errcheck]
<builtin>: recipe for target 'errcheck' failed
make: *** [errcheck] Error 1
Note that I got none of these errors with the revert of 1ff0458
This could be some some side effect of my building with different source trees? Apologize if this is noise but wanted you to see these errors just in case.
from rchk.
The linking error seems to be that the LLVM library is not found. I've tried in docker/18.04 using the steps as in the README and it worked for me. If you are building specially it might be related - and perhaps sensitive to setting LLVM in config.inc (how exactly are you building?) The warnings are probably because i need to refresh my makefiles (and perhaps differentiate more between options for clang++ and g++).
from rchk.
Okay, I'm sure there are some wires crossed on my end as a result of building in different configs. I'll try again with a fresh start and I'm sure all will be well.
from rchk.
Related Issues (20)
- linking module flags 'PIC Level': IDs have conflicting values HOT 3
- Problems building/running on Gentoo HOT 3
- Puzzled about "results will be incomplete" HOT 1
- Is it possible to restrict the analysis to certain functions only? HOT 1
- False positive for conditional protection HOT 3
- ... as it has address taken, results will be incomplete ... HOT 10
- objcopy: stai2D6Q: Failed to find link section for section HOT 5
- Warnings compiling rchk HOT 1
- Run check on a local package HOT 1
- protect stack is too deep/unsupported form of unprotect HOT 7
- ERROR: too many states (abstraction error?) in function strptime_internal HOT 1
- Local ~/.Rprofile may break singularity image HOT 1
- Local results from run with singularity differ from CRAN results HOT 2
- Container always checking CRAN version instead of local tarball HOT 1
- Installation (Fedora 34): missing `llvm/Support/StringPool.h` HOT 4
- Incorrect analysis around C++ constructors and destructors HOT 4
- Values protected by assignment HOT 10
- Can we let rchk know that a function preserves its argument? HOT 7
- Explicit protection cancels implicit protection HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rchk.