dmlc / XGBoost.jl

XGBoost Julia Package
Other
289 stars 110 forks source link

Error building on Julia 1.1 | Mac and NextJournal #65

Closed mapmeld closed 5 years ago

mapmeld commented 5 years ago

I haven't been able to build XGBoost on either platform due to this error with DMatrix; I am new to Julia so please let me know if I might just be Doing It Wrong

julia> Pkg.add("XGBoost")
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
 Installed XGBoost ─ v0.3.1
  Updating `~/.julia/environments/v1.1/Project.toml`
  [009559a3] + XGBoost v0.3.1
  Updating `~/.julia/environments/v1.1/Manifest.toml`
  [009559a3] + XGBoost v0.3.1
  Building XGBoost → `~/.julia/packages/XGBoost/udvqz/deps/build.log`
...

Here's the error itself

c++ -c -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -fPIC -DDISABLE_OPENMP src/data/data.cc -o build/data/data.o
│ In file included from src/data/data.cc:10:
│ src/data/./simple_dmatrix.h:19:7: error: exception specification of overriding function is more lax than base version
│ class SimpleDMatrix : public DMatrix {
│       ^
│ include/xgboost/data.h:347:11: note: overridden virtual function is here
│   virtual ~DMatrix() = default;
│           ^
│ 1 error generated.
│ make: *** [build/data/data.o] Error 1
│ [ Info: Using the latest stable version (0.80) of the XGBoost library
│ [ Info: Attempting to create directory /Users/ndoiron404/.julia/packages/XGBoost/udvqz/deps/src
│ [ Info: Changing directory to /Users/ndoiron404/.julia/packages/XGBoost/udvqz/deps/src
│ [ Info: Changing directory to /Users/ndoiron404/.julia/packages/XGBoost/udvqz/deps/src
│ [ Info: Changing directory to /Users/ndoiron404/.julia/packages/XGBoost/udvqz/deps/src/xgboost
│ [ Info: Changing directory to /Users/ndoiron404/.julia/packages/XGBoost/udvqz/deps/src/xgboost
│ ERROR: LoadError: failed process: Process(`bash build.sh`, ProcessExited(2)) [2]
│ Stacktrace:
│  [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
│  [2] pipeline_error at ./process.jl:785 [inlined]
│  [3] #run#515(::Bool, ::Function, ::Cmd) at ./process.jl:726
│  [4] run(::Cmd) at ./process.jl:724
│  [5] run(::BinDeps.SynchronousStepCollection) at /Users/ndoiron404/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:521 (repeats 2 times)
│  [6] run(::FileRule) at /Users/ndoiron404/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:483
│  [7] run(::BinDeps.SynchronousStepCollection) at /Users/ndoiron404/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:521
│  [8] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at /Users/ndoiron404/.julia/packages/BinDeps/ZEval/src/dependencies.jl:944
│  [9] satisfy!(::BinDeps.LibraryDependency) at /Users/ndoiron404/.julia/packages/BinDeps/ZEval/src/dependencies.jl:922
│  [10] top-level scope at /Users/ndoiron404/.julia/packages/BinDeps/ZEval/src/dependencies.jl:977
│  [11] include at ./boot.jl:326 [inlined]
│  [12] include_relative(::Module, ::String) at ./loading.jl:1038
│  [13] include(::Module, ::String) at ./sysimg.jl:29
│  [14] include(::String) at ./client.jl:403
│  [15] top-level scope at none:0
│ in expression starting at /Users/ndoiron404/.julia/packages/XGBoost/udvqz/deps/build.jl:37
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075
dmoliveira commented 5 years ago

The same problem for me... and mine is Ubuntu.

_ In file included from src/data/data.cc:10:
_ src/data/./simple_dmatrix.h:19:7: error: looser throw specifier for 'virtual xgboost::data::SimpleDMatrix::~SimpleDMatrix() noexcept (false)'
_  class SimpleDMatrix : public DMatrix {
_        ^~~~~~~~~~~~~
_ In file included from src/data/data.cc:5:
_ include/xgboost/data.h:347:11: note: overridden function is 'virtual xgboost::DMatrix::~DMatrix() noexcept'
_    virtual ~DMatrix() = default;
_            ^
_ make: *** [Makefile:143: build/data/data.o] Error 1
_ [ Info: Using the latest stable version (0.80) of the XGBoost library
_ [ Info: Attempting to create directory /root/.julia/packages/XGBoost/udvqz/deps/src
_ [ Info: Directory /root/.julia/packages/XGBoost/udvqz/deps/src already exists
_ [ Info: Changing directory to /root/.julia/packages/XGBoost/udvqz/deps/src
_ [ Info: Changing directory to /root/.julia/packages/XGBoost/udvqz/deps/src
_ [ Info: Changing directory to /root/.julia/packages/XGBoost/udvqz/deps/src/xgboost
_ [ Info: Changing directory to /root/.julia/packages/XGBoost/udvqz/deps/src/xgboost
_ ERROR: LoadError: failed process: Process(`bash build.sh`, ProcessExited(2)) [2]
_ Stacktrace:
_  [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
_  [2] pipeline_error at ./process.jl:785 [inlined]
_  [3] #run#515(::Bool, ::Function, ::Cmd) at ./process.jl:726
_  [4] run(::Cmd) at ./process.jl:724
_  [5] run(::BinDeps.SynchronousStepCollection) at /root/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:521 (repeats 2 times)
_  [6] run(::FileRule) at /root/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:483
_  [7] run(::BinDeps.SynchronousStepCollection) at /root/.julia/packages/BinDeps/ZEval/src/BinDeps.jl:521
_  [8] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at /root/.julia/packages/BinDeps/ZEval/src/dependencies.jl:944
_  [9] satisfy!(::BinDeps.LibraryDependency) at /root/.julia/packages/BinDeps/ZEval/src/dependencies.jl:922
_  [10] top-level scope at /root/.julia/packages/BinDeps/ZEval/src/dependencies.jl:977
_  [11] include at ./boot.jl:326 [inlined]
_  [12] include_relative(::Module, ::String) at ./loading.jl:1038
_  [13] include(::Module, ::String) at ./sysimg.jl:29
_  [14] include(::String) at ./client.jl:403
_  [15] top-level scope at none:0
_ in expression starting at /root/.julia/packages/XGBoost/udvqz/deps/build.jl:37
_ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075
trivialfis commented 5 years ago

I'm not an expert in Julia, could you provide more details? Like are you building with master branch? BTW, is the Julia package using CMake?

trivialfis commented 5 years ago

Okay, now I understand how Julia pkg is built. Will try to upgrade XGBoost version when time allows.

aviks commented 5 years ago

this is fixed by #66.

mapmeld commented 5 years ago

Thanks!