Comments (17)
What does your Make.user for Julia look like?
from cxx.jl.
Is this fixed by putting all the llvm includes in angle brackets?
from cxx.jl.
Hi sorry for the late reply, I was away for a while.
My Make.user
file is
LLVM_ASSERTIONS=1
#LLVM_VER=svn
BUILD_LLVM_CLANG=1
BUILD_LLDB=1
LLDB_VER=master
USE_LLVM_SHLIB=1
#LLDB_DISABLE_PYTHON=1
#LLVM_DEBUG=1
@Keno, you suggest going through all .h files and change the include directives?
from cxx.jl.
No, just in bootstrap.cpp
from cxx.jl.
mm no, I still get the redefinition error.
from cxx.jl.
Can I see the output of
julia> ENV["VERBOSE"] = "1"
julia> Pkg.build("Cxx")
from cxx.jl.
Sure, here it goes (truncated after a few lines, it just continues..)
julia> Pkg.build("Cxx")
INFO: Building Cxx
Tuning for julia installation at: /data/phd/github/julia.4/usr/bin
g++ -m64 -fno-rtti -DLIBRARY_EXPORTS -fPIC -O0 -g -std=c++11 -I/data/phd/github/julia.4/usr/bin/../../usr/include -I/data/phd/github/julia.4/usr/bin/../../src/support -I/data/phd/github/julia.4/usr/include -I/data/phd/github/julia.4/usr/bin/../../deps/llvm-3.3/tools/clang/lib -c ../src/bootstrap.cpp -o build/bootstrap.o
In file included from /usr/include/llvm/IR/ValueMap.h:30:0,
from ../src/bootstrap.cpp:14:
/usr/include/llvm/IR/ValueHandle.h:27:7: error: redefinition of ‘class llvm::PointerLikeTypeTraits<llvm::ValueHandleBase**>’
class PointerLikeTypeTraits<ValueHandleBase**> {
^
In file included from /data/phd/github/julia.4/usr/bin/../../usr/include/llvm/ADT/ValueMap.h:31:0,
from /data/phd/github/julia.4/usr/bin/../../usr/include/llvm/ExecutionEngine/ExecutionEngine.h:22,
from ../src/bootstrap.cpp:13:
/data/phd/github/julia.4/usr/bin/../../usr/include/llvm/Support/ValueHandle.h:27:7: error: previous definition of ‘class llvm::PointerLikeTypeTraits<llvm::ValueHandleBase**>’
class PointerLikeTypeTraits<ValueHandleBase**> {
^
In file included from /usr/include/llvm/IR/ValueMap.h:30:0,
from ../src/bootstrap.cpp:14:
/usr/include/llvm/IR/ValueHandle.h:41:7: error: redefinition of ‘class llvm::ValueHandleBase’
class ValueHandleBase {
^
In file included from /data/phd/github/julia.4/usr/bin/../../usr/include/llvm/ADT/ValueMap.h:31:0,
from /data/phd/github/julia.4/usr/bin/../../usr/include/llvm/ExecutionEngine/ExecutionEngine.h:22,
from ../src/bootstrap.cpp:13:
/data/phd/github/julia.4/usr/bin/../../usr/include/llvm/Support/ValueHandle.h:41:7: error: previous definition of ‘class llvm::ValueHandleBase’
class ValueHandleBase {
^
In file included from /usr/include/llvm/IR/ValueMap.h:30:0,
from ../src/bootstrap.cpp:14:
/usr/include/llvm/IR/ValueHandle.h:145:7: error: redefinition of ‘class llvm::WeakVH’
class WeakVH : public ValueHandleBase {
^
In file included from /data/phd/github/julia.4/usr/bin/../../usr/include/llvm/ADT/ValueMap.h:31:0,
from /data/phd/github/julia.4/usr/bin/../../usr/include/llvm/ExecutionEngine/ExecutionEngine.h:22,
from ../src/bootstrap.cpp:13:
/data/phd/github/julia.4/usr/bin/../../usr/include/llvm/Support/ValueHandle.h:145:7: error: previous definition of ‘class llvm::WeakVH’
class WeakVH : public ValueHandleBase {
^
In file included from /usr/include/llvm/IR/ValueMap.h:30:0,
from ../src/bootstrap.cpp:14:
/usr/include/llvm/IR/ValueHandle.h:166:19: error: redefinition of ‘struct llvm::simplify_type<llvm::WeakVH>’
template<> struct simplify_type<WeakVH> {
^
In file included from /data/phd/github/julia.4/usr/bin/../../usr/include/llvm/ADT/ValueMap.h:31:0,
from cxx.jl.
That looks ok, but looking back in your Make.user, I see LLVM_VER
commented out. Cxx.jl
requires LLVM svn and won't work with 3.3.
from cxx.jl.
@Keno, good point.
Now I tried with Make.user:
LLVM_ASSERTIONS=1
LLVM_VER=svn
BUILD_LLVM_CLANG=1
BUILD_LLDB=1
LLDB_VER=master
USE_LLVM_SHLIB=1
#LLDB_DISABLE_PYTHON=1
#LLVM_DEBUG=1
and after doing make I get an error:
Already up-to-date.
Already up-to-date.
Already up-to-date.
Already up-to-date.
Already up-to-date.
/bin/sh: line 3: ../configure: No such file or directory
Makefile:504: recipe for target 'llvm-svn/build_Release+Asserts/config.status' failed
make[2]: *** [llvm-svn/build_Release+Asserts/config.status] Error 127
Makefile:101: recipe for target 'julia-release' failed
make[1]: *** [julia-release] Error 2
Makefile:49: recipe for target 'release' failed
make: *** [release] Error 2
[cjb@laptop julia.4]$ make
Already up-to-date.
Already up-to-date.
Already up-to-date.
Already up-to-date.
Already up-to-date.
/bin/sh: line 3: ../configure: No such file or directory
Makefile:504: recipe for target 'llvm-svn/build_Release+Asserts/config.status' failed
make[2]: *** [llvm-svn/build_Release+Asserts/config.status] Error 127
Makefile:101: recipe for target 'julia-release' failed
make[1]: *** [julia-release] Error 2
Makefile:49: recipe for target 'release' failed
make: *** [release] Error 2
from cxx.jl.
@cbecker if possible, just have your Make.user look like the following:
override LLDB_VER=master
override LLVM_VER=svn
override LLVM_ASSERTIONS=1
override BUILD_LLVM_CLANG=1
override BUILD_LLDB=1
override USE_LLVM_SHLIB=1
override LLDB_DISABLE_PYTHON=1
from cxx.jl.
Hi, that seems to fix it.
I got some errors with lpthread, but then they disappeared.
As in the readme of the git repo, I added the pthread library dependence, but afterwards doing make
on julia's source code root folder would not process anything else.
I am running now make test
, seems fine so far.
however, now I can do the following, though I still get some errors:
./julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.4.0-dev+2839 (2015-01-21 02:39 UTC)
_/ |\__'_|_|_|\__'_| | Commit 8b4e9e9 (0 days old master)
|__/ | x86_64-unknown-linux-gnu
julia> Pkg.build("Cxx")
INFO: Building Cxx
Tuning for julia installation at: /data/phd/github/julia.4/usr/bin
Not building debug library because corresponding julia DEBUG library does not exist.
To build, simply run the build again once the library at
/data/phd/github/julia.4/usr/bin/../../usr/lib/libjulia-debug.so
has been built.
julia> using Cxx
ERROR: LoadError: LoadError: Could not find C++ standard library
in include at ./boot.jl:249
in include_from_node1 at ./loading.jl:128
in include at ./boot.jl:249
in include_from_node1 at ./loading.jl:128
in reload_path at ./loading.jl:152
in _require at ./loading.jl:67
in require at ./loading.jl:52
in print at ./string.jl
while loading /home/cjb/.julia/v0.4/Cxx/src/initialization.jl, in expression starting on line 251
while loading /home/cjb/.julia/v0.4/Cxx/src/Cxx.jl, in expression starting on line 152
from cxx.jl.
could ERROR: LoadError: LoadError: Could not find C++ standard library
be because CXX.jl is only looking for stdlibs in system folders, and in this case julia is only residing in its local folder?
from cxx.jl.
I think I found the problem, it has to do with the include/library folders. My system has the following include path: /usr/include/c++/4.9.2/x86_64-unknown-linux-gnu/
, that is c++ + version + triple
While Cxx.jl looks for something like triple + c++ + version
. Therefore, include paths do not work. This issue is in initialization.jl
. I will submit a patch soon.
from cxx.jl.
The fix is here.
Everything was working fine, until I pulled the newest master from Keno/Cxx.jl and now I get the folloowing error:
Warning: error initializing module Cxx:
BoundsError(a=Array{Cxx.ClangCompiler, 1}[], i=(1,))
But the include folders seem correct.
from cxx.jl.
I think it is related to: #74 (comment)
I saw the same error but haven't rebuilt LLVM yet, so I am not sure if it is related to that.
@Keno is this a new issue?
from cxx.jl.
Hadn't tested the new code on Linux. Should be fixed now.
from cxx.jl.
@Keno indeed, working now, that's great!
from cxx.jl.
Related Issues (20)
- cxxnew does not work with constructor arguments
- How to wrap templated C++ class with Cxx HOT 2
- Missing website
- Problem using boost c++ libraries, kills julia.
- undefined symbol: julia_type_to_llvm on julia 1.5.1 HOT 3
- Error building Cxx HOT 2
- Current Cxx.jl roadmap HOT 5
- Compatibility with Julia 1.6 HOT 3
- Cxx.jl seems not compatible with docker HOT 11
- build Cxx makes an error in Julia v1.6.1 HOT 2
- Plans for Julia 1.7 HOT 13
- Clang-repl: Incremental parsing support HOT 1
- Can I use Cxx REPL while by including
- Same code, worked in Julia Repl's Top Level, but failed inside a module
- Is the project still being developed? HOT 2
- Building Cxx Error HOT 3
- Upgrade CI
- undefined symbol: jl_LLVMContext HOT 1
- Precompile error: "undefined symbol: jl_LLVMContext" HOT 1
- Potential stable backend for Cxx.jl: CppInterOp
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 cxx.jl.