GithubHelp home page GithubHelp logo

error building on ubuntu 18.04 about rchk HOT 8 CLOSED

kalibera avatar kalibera commented on August 15, 2024
error building on ubuntu 18.04

from rchk.

Comments (8)

jjallaire avatar jjallaire commented on August 15, 2024

The error occurs in code from the most recent commit: 1ff0458

from rchk.

jjallaire avatar jjallaire commented on August 15, 2024

If I revert that commit then it all builds fine.

from rchk.

kalibera avatar kalibera commented on August 15, 2024

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.

kalibera avatar kalibera commented on August 15, 2024

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.

jjallaire avatar jjallaire commented on August 15, 2024

Yes, that works. Thanks!

from rchk.

jjallaire avatar jjallaire commented on August 15, 2024

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.

kalibera avatar kalibera commented on August 15, 2024

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.

jjallaire avatar jjallaire commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.