Comments (5)
It builds now. I had some other gcc on my path and removing that worked.
from llvm-general.
It requires Cabal 1.24 from my experience.
from llvm-general.
I've managed to build with cabal:
git clone https://github.com/bscarlet/llvm-general.git
cd llvm-general/
git checkout -b llvm-3.8 origin/llvm-3.8
cd llvm-general/
cabal sandbox init
cabal sandbox add-source ../llvm-general-pure/
cabal install --only-dep
cabal configure --extra-lib-dirs=/usr/local/Cellar/libffi/3.0.13/lib -v
cabal build
This is using GHC 7.10.3 and llvm38 from Homebrew.
from llvm-general.
I spoke to soon. llvm-general itself can be built and installed but when linking my application I still get problems like these:
Undefined symbols for architecture x86_64:
"llvm::TargetRegistry::lookupTarget(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, llvm::Triple&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)", referenced from:
_LLVM_General_LookupTarget in libHSllvm-general-3.8.0.0-92hcfz1GLY9CjTAtL9qzyA.a(TargetC.o)
"llvm::raw_fd_ostream::raw_fd_ostream(llvm::StringRef, std::error_code&, llvm::sys::fs::OpenFlags)", referenced from:
_LLVM_General_WithFileRawOStream in libHSllvm-general-3.8.0.0-92hcfz1GLY9CjTAtL9qzyA.a(RawOStreamC.o)
"llvm::Instruction::getAllMetadataImpl(llvm::SmallVectorImpl<std::pair<unsigned int, llvm::MDNode*> >&) const", referenced from:
_LLVM_General_GetMetadata in libHSllvm-general-3.8.0.0-92hcfz1GLY9CjTAtL9qzyA.a(InstructionC.o)
"std::__1::error_code::message() const", referenced from:
_LLVMPrintModuleToFile in libLLVMCore.a(Core.o)
_LLVMCreateMemoryBufferWithContentsOfFile in libLLVMCore.a(Core.o)
_LLVMCreateMemoryBufferWithSTDIN in libLLVMCore.a(Core.o)
llvm::Interpreter::create(std::__1::unique_ptr<llvm::Module, std::__1::default_delete<llvm::Module> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) in libLLVMInterpreter.a(Interpreter.o)
llvm::getLazyIRFileModule(llvm::StringRef, llvm::SMDiagnostic&, llvm::LLVMContext&, bool) in libLLVMIRReader.a(IRReader.o)
llvm::parseIR(llvm::MemoryBufferRef, llvm::SMDiagnostic&, llvm::LLVMContext&) in libLLVMIRReader.a(IRReader.o)
llvm::parseIRFile(llvm::StringRef, llvm::SMDiagnostic&, llvm::LLVMContext&) in libLLVMIRReader.a(IRReader.o)
...
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char, unsigned long) const", referenced from:
llvm::Module::print(llvm::raw_ostream&, llvm::AssemblyAnnotationWriter*, bool, bool) const in libLLVMCore.a(AsmWriter.o)
I'm guessing the the application itself also needs to play games with extraLibs
and ccOptions
to make things link?
from llvm-general.
Having to go through this again on a new machine I can confirm that building llvm-general works if you:
- Are on macOS Sierra.
- Use stack with
resolver: lts-6.20
(which uses GHC 7.10.3) - Depend on
llvm-general == 3.8.0.*
brew install [email protected]
- Use the system gcc (mine is
Apple LLVM version 8.0.0 (clang-800.0.42.1)
). - Add
extra-lib-dirs: [/usr/local/Cellar/libffi/3.0.13/lib]
to~/.stack/config.yaml
. - Just in case, make sure you are using the latest stack (1.3.2 in my case) and run
stack setup
in your project dir.
from llvm-general.
Related Issues (20)
- Internal error in Constant.hs HOT 7
- ‘readsPrec1’ is not a (visible) method of class ‘Read1’ HOT 2
- Stronger typing of Instruction and Operand HOT 1
- Segmentation fault when lowering to LLVM IR HOT 8
- Build problems on OSX HOT 18
- instance IsString Name HOT 2
- llvm-general-pure doesn't compile with GHC 8.0 HOT 16
- Project status HOT 8
- github repository seems to lag behind Hackage HOT 5
- llvm-3.8 branch does not support operand bundles
- llvm-3.9 travis build is failing HOT 4
- Abort build when compiling with library-profiling enabled
- Include lower-level representation suitable for ex. the GHC backend HOT 1
- GHC-8 compatible Hackage release? HOT 5
- Upload to hackage HOT 2
- Support pretty-printing to LLVM assembly HOT 4
- Missing C library: LLVM-3.9.1 HOT 7
- Question : how to create string constant in llvm-general-pure HOT 2
- fails to compile on 8.4.2 and probably (8.4.1) HOT 1
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 llvm-general.