dmlc / xgboost

Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow
https://xgboost.readthedocs.io/en/stable/
Apache License 2.0
26.23k stars 8.72k forks source link

building xgboost #2271

Closed geoHeil closed 7 years ago

geoHeil commented 7 years ago

can't compile xgboost on OS X with current (homebrew) installed gcc7

Environment info

Operating System: osx 10.12

Compiler:

> $ which gcc
/usr/bin/gcc

geoheil@e251-197 ~                                                   [17:22:10]
> $ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

logs below:

make -j4                                                                                                               [±master ✓]
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/c_api/c_api_error.o src/c_api/c_api_error.cc >build/c_api/c_api_error.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/c_api/c_api_error.cc -o build/c_api/c_api_error.o
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/logging.cc -o build/logging.o
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/c_api/c_api.cc -o build/c_api/c_api.o
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/learner.cc -o build/learner.o
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/common/common.o src/common/common.cc >build/common/common.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/common/common.cc -o build/common/common.o
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/common/hist_util.o src/common/hist_util.cc >build/common/hist_util.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/common/hist_util.cc -o build/common/hist_util.o
In file included from dmlc-core/include/dmlc/././parameter.h:25:0,
                 from dmlc-core/include/dmlc/./registry.h:14,
                 from dmlc-core/include/dmlc/data.h:16,
                 from include/xgboost/data.h:11,
                 from src/c_api/c_api.cc:3:
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/././parameter.h:513:7:   required from here
dmlc-core/include/dmlc/./././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/././parameter.h:872:9:   required from here
dmlc-core/include/dmlc/./././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/./././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/././parameter.h:877:13:   required from here
dmlc-core/include/dmlc/./././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from dmlc-core/include/dmlc/./parameter.h:25:0,
                 from dmlc-core/include/dmlc/registry.h:14,
                 from include/xgboost/./gbm.h:11,
                 from include/xgboost/learner.h:16,
                 from src/learner.cc:8:
dmlc-core/include/dmlc/././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/./parameter.h:513:7:   required from here
dmlc-core/include/dmlc/././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/./parameter.h:872:9:   required from here
dmlc-core/include/dmlc/././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/data/data.o src/data/data.cc >build/data/data.d
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/./parameter.h:877:13:   required from here
dmlc-core/include/dmlc/././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/data/data.cc -o build/data/data.o
In file included from dmlc-core/include/dmlc/././parameter.h:25:0,
                 from dmlc-core/include/dmlc/./registry.h:14,
                 from dmlc-core/include/dmlc/data.h:16,
                 from include/xgboost/data.h:11,
                 from src/common/./hist_util.h:10,
                 from src/common/hist_util.cc:10:
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/././parameter.h:513:7:   required from here
dmlc-core/include/dmlc/./././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/././parameter.h:872:9:   required from here
dmlc-core/include/dmlc/./././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/./././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/././parameter.h:877:13:   required from here
dmlc-core/include/dmlc/./././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from dmlc-core/include/dmlc/././parameter.h:25:0,
                 from dmlc-core/include/dmlc/./registry.h:14,
                 from dmlc-core/include/dmlc/data.h:16,
                 from include/xgboost/data.h:11,
                 from src/data/data.cc:5:
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/././parameter.h:513:7:   required from here
dmlc-core/include/dmlc/./././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/././parameter.h:872:9:   required from here
dmlc-core/include/dmlc/./././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/./././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/././parameter.h:877:13:   required from here
dmlc-core/include/dmlc/./././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/data/simple_csr_source.o src/data/simple_csr_source.cc >build/data/simple_csr_source.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/data/simple_csr_source.cc -o build/data/simple_csr_source.o
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/data/simple_dmatrix.o src/data/simple_dmatrix.cc >build/data/simple_dmatrix.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/data/simple_dmatrix.cc -o build/data/simple_dmatrix.o
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/data/sparse_page_dmatrix.o src/data/sparse_page_dmatrix.cc >build/data/sparse_page_dmatrix.d
In file included from dmlc-core/include/dmlc/././parameter.h:25:0,
                 from dmlc-core/include/dmlc/./registry.h:14,
                 from dmlc-core/include/dmlc/data.h:16,
                 from include/xgboost/data.h:11,
                 from src/data/./simple_csr_source.h:12,
                 from src/data/simple_csr_source.cc:7:
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/././parameter.h:513:7:   required from here
dmlc-core/include/dmlc/./././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/././parameter.h:872:9:   required from here
dmlc-core/include/dmlc/./././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/./././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/././parameter.h:877:13:   required from here
dmlc-core/include/dmlc/./././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/data/sparse_page_dmatrix.cc -o build/data/sparse_page_dmatrix.o
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/data/sparse_page_raw_format.o src/data/sparse_page_raw_format.cc >build/data/sparse_page_raw_format.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/data/sparse_page_raw_format.cc -o build/data/sparse_page_raw_format.o
In file included from dmlc-core/include/dmlc/././parameter.h:25:0,
                 from dmlc-core/include/dmlc/./registry.h:14,
                 from dmlc-core/include/dmlc/data.h:16,
                 from include/xgboost/data.h:11,
                 from src/data/simple_dmatrix.cc:7:
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/././parameter.h:513:7:   required from here
dmlc-core/include/dmlc/./././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/././parameter.h:872:9:   required from here
dmlc-core/include/dmlc/./././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/data/sparse_page_source.o src/data/sparse_page_source.cc >build/data/sparse_page_source.d
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/./././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/././parameter.h:877:13:   required from here
dmlc-core/include/dmlc/./././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/data/sparse_page_source.cc -o build/data/sparse_page_source.o
In file included from dmlc-core/include/dmlc/././parameter.h:25:0,
                 from dmlc-core/include/dmlc/./registry.h:14,
                 from dmlc-core/include/dmlc/data.h:16,
                 from include/xgboost/data.h:11,
                 from src/data/./sparse_page_dmatrix.h:11,
                 from src/data/sparse_page_dmatrix.cc:13:
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/././parameter.h:513:7:   required from here
dmlc-core/include/dmlc/./././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/././parameter.h:872:9:   required from here
dmlc-core/include/dmlc/./././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/./././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/././parameter.h:877:13:   required from here
dmlc-core/include/dmlc/./././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from dmlc-core/include/dmlc/././parameter.h:25:0,
                 from dmlc-core/include/dmlc/./registry.h:14,
                 from dmlc-core/include/dmlc/data.h:16,
                 from include/xgboost/data.h:11,
                 from src/data/sparse_page_raw_format.cc:6:
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/././parameter.h:513:7:   required from here
dmlc-core/include/dmlc/./././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/././parameter.h:872:9:   required from here
dmlc-core/include/dmlc/./././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/./././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/././parameter.h:877:13:   required from here
dmlc-core/include/dmlc/./././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from dmlc-core/include/dmlc/././parameter.h:25:0,
                 from dmlc-core/include/dmlc/./registry.h:14,
                 from dmlc-core/include/dmlc/data.h:16,
                 from include/xgboost/data.h:11,
                 from src/data/./sparse_page_source.h:11,
                 from src/data/sparse_page_source.cc:11:
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/././parameter.h:513:7:   required from here
dmlc-core/include/dmlc/./././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/././parameter.h:872:9:   required from here
dmlc-core/include/dmlc/./././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/./././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/././parameter.h:877:13:   required from here
dmlc-core/include/dmlc/./././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/data/sparse_page_writer.o src/data/sparse_page_writer.cc >build/data/sparse_page_writer.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/data/sparse_page_writer.cc -o build/data/sparse_page_writer.o
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/gbm/gblinear.o src/gbm/gblinear.cc >build/gbm/gblinear.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/gbm/gblinear.cc -o build/gbm/gblinear.o
In file included from dmlc-core/include/dmlc/././parameter.h:25:0,
                 from dmlc-core/include/dmlc/./registry.h:14,
                 from dmlc-core/include/dmlc/data.h:16,
                 from include/xgboost/data.h:11,
                 from src/data/./sparse_batch_page.h:12,
                 from src/data/sparse_page_writer.cc:8:
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/././parameter.h:513:7:   required from here
dmlc-core/include/dmlc/./././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/././parameter.h:872:9:   required from here
dmlc-core/include/dmlc/./././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/./././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/././parameter.h:877:13:   required from here
dmlc-core/include/dmlc/./././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from dmlc-core/include/dmlc/parameter.h:25:0,
                 from src/gbm/gblinear.cc:9:
dmlc-core/include/dmlc/./optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/parameter.h:513:7:   required from here
dmlc-core/include/dmlc/./optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/parameter.h:872:9:   required from here
dmlc-core/include/dmlc/./optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/./optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/parameter.h:877:13:   required from here
dmlc-core/include/dmlc/./optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/gbm/gbm.o src/gbm/gbm.cc >build/gbm/gbm.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/gbm/gbm.cc -o build/gbm/gbm.o
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/gbm/gbtree.o src/gbm/gbtree.cc >build/gbm/gbtree.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/gbm/gbtree.cc -o build/gbm/gbtree.o
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/metric/elementwise_metric.o src/metric/elementwise_metric.cc >build/metric/elementwise_metric.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/metric/elementwise_metric.cc -o build/metric/elementwise_metric.o
In file included from dmlc-core/include/dmlc/./parameter.h:25:0,
                 from dmlc-core/include/dmlc/registry.h:14,
                 from include/xgboost/gbm.h:11,
                 from src/gbm/gbm.cc:6:
dmlc-core/include/dmlc/././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/./parameter.h:513:7:   required from here
dmlc-core/include/dmlc/././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/./parameter.h:872:9:   required from here
dmlc-core/include/dmlc/././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/./parameter.h:877:13:   required from here
dmlc-core/include/dmlc/././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/metric/metric.o src/metric/metric.cc >build/metric/metric.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/metric/metric.cc -o build/metric/metric.o
In file included from dmlc-core/include/dmlc/./parameter.h:25:0,
                 from dmlc-core/include/dmlc/registry.h:14,
                 from include/xgboost/metric.h:10,
                 from src/metric/elementwise_metric.cc:7:
dmlc-core/include/dmlc/././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/./parameter.h:513:7:   required from here
dmlc-core/include/dmlc/././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/./parameter.h:872:9:   required from here
dmlc-core/include/dmlc/././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/./parameter.h:877:13:   required from here
dmlc-core/include/dmlc/././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from dmlc-core/include/dmlc/parameter.h:25:0,
                 from src/gbm/gbtree.cc:8:
dmlc-core/include/dmlc/./optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/parameter.h:513:7:   required from here
dmlc-core/include/dmlc/./optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/parameter.h:872:9:   required from here
dmlc-core/include/dmlc/./optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/./optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/parameter.h:877:13:   required from here
dmlc-core/include/dmlc/./optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/metric/multiclass_metric.o src/metric/multiclass_metric.cc >build/metric/multiclass_metric.d
In file included from dmlc-core/include/dmlc/./parameter.h:25:0,
                 from dmlc-core/include/dmlc/registry.h:14,
                 from include/xgboost/metric.h:10,
                 from src/metric/metric.cc:6:
dmlc-core/include/dmlc/././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/./parameter.h:513:7:   required from here
dmlc-core/include/dmlc/././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/./parameter.h:872:9:   required from here
dmlc-core/include/dmlc/././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/./parameter.h:877:13:   required from here
dmlc-core/include/dmlc/././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/metric/multiclass_metric.cc -o build/metric/multiclass_metric.o
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/metric/rank_metric.o src/metric/rank_metric.cc >build/metric/rank_metric.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/metric/rank_metric.cc -o build/metric/rank_metric.o
In file included from dmlc-core/include/dmlc/./parameter.h:25:0,
                 from dmlc-core/include/dmlc/registry.h:14,
                 from include/xgboost/metric.h:10,
                 from src/metric/multiclass_metric.cc:7:
dmlc-core/include/dmlc/././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/./parameter.h:513:7:   required from here
dmlc-core/include/dmlc/././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/./parameter.h:872:9:   required from here
dmlc-core/include/dmlc/././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/./parameter.h:877:13:   required from here
dmlc-core/include/dmlc/././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/objective/multiclass_obj.o src/objective/multiclass_obj.cc >build/objective/multiclass_obj.d
In file included from dmlc-core/include/dmlc/./parameter.h:25:0,
                 from dmlc-core/include/dmlc/registry.h:14,
                 from include/xgboost/metric.h:10,
                 from src/metric/rank_metric.cc:7:
dmlc-core/include/dmlc/././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/./parameter.h:513:7:   required from here
dmlc-core/include/dmlc/././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/./parameter.h:872:9:   required from here
dmlc-core/include/dmlc/././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/./parameter.h:877:13:   required from here
dmlc-core/include/dmlc/././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/objective/multiclass_obj.cc -o build/objective/multiclass_obj.o
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/objective/objective.o src/objective/objective.cc >build/objective/objective.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/objective/objective.cc -o build/objective/objective.o
In file included from dmlc-core/include/dmlc/parameter.h:25:0,
                 from src/objective/multiclass_obj.cc:8:
dmlc-core/include/dmlc/./optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/parameter.h:513:7:   required from here
dmlc-core/include/dmlc/./optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/parameter.h:872:9:   required from here
dmlc-core/include/dmlc/./optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/./optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/parameter.h:877:13:   required from here
dmlc-core/include/dmlc/./optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from dmlc-core/include/dmlc/./parameter.h:25:0,
                 from dmlc-core/include/dmlc/registry.h:14,
                 from include/xgboost/objective.h:10,
                 from src/objective/objective.cc:6:
dmlc-core/include/dmlc/././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/./parameter.h:513:7:   required from here
dmlc-core/include/dmlc/././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/./parameter.h:872:9:   required from here
dmlc-core/include/dmlc/././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/./parameter.h:877:13:   required from here
dmlc-core/include/dmlc/././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/objective/rank_obj.o src/objective/rank_obj.cc >build/objective/rank_obj.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/objective/rank_obj.cc -o build/objective/rank_obj.o
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/objective/regression_obj.o src/objective/regression_obj.cc >build/objective/regression_obj.d
In file included from dmlc-core/include/dmlc/./parameter.h:25:0,
                 from dmlc-core/include/dmlc/registry.h:14,
                 from include/xgboost/objective.h:10,
                 from src/objective/rank_obj.cc:9:
dmlc-core/include/dmlc/././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/./parameter.h:513:7:   required from here
dmlc-core/include/dmlc/././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/./parameter.h:872:9:   required from here
dmlc-core/include/dmlc/././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/./parameter.h:877:13:   required from here
dmlc-core/include/dmlc/././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/objective/regression_obj.cc -o build/objective/regression_obj.o
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/tree/tree_model.o src/tree/tree_model.cc >build/tree/tree_model.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/tree/tree_model.cc -o build/tree/tree_model.o
g++-7 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/tree/tree_updater.o src/tree/tree_updater.cc >build/tree/tree_updater.d
g++-7 -c -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp src/tree/tree_updater.cc -o build/tree/tree_updater.o
In file included from dmlc-core/include/dmlc/./parameter.h:25:0,
                 from dmlc-core/include/dmlc/registry.h:14,
                 from include/xgboost/objective.h:10,
                 from src/objective/regression_obj.cc:9:
dmlc-core/include/dmlc/././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/./parameter.h:513:7:   required from here
dmlc-core/include/dmlc/././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/./parameter.h:872:9:   required from here
dmlc-core/include/dmlc/././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/./parameter.h:877:13:   required from here
dmlc-core/include/dmlc/././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from dmlc-core/include/dmlc/parameter.h:25:0,
                 from include/xgboost/tree_model.h:11,
                 from src/tree/tree_model.cc:6:
dmlc-core/include/dmlc/./optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/parameter.h:513:7:   required from here
dmlc-core/include/dmlc/./optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/parameter.h:872:9:   required from here
dmlc-core/include/dmlc/./optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/./optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/./optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/parameter.h:877:13:   required from here
dmlc-core/include/dmlc/./optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/tree/tree_updater.cc:6:0:
include/xgboost/tree_updater.h:75:46: error: 'function' is not a member of 'std'
                                         std::function<TreeUpdater* ()> > {
                                              ^~~~~~~~
include/xgboost/tree_updater.h:75:46: note: suggested alternative: 'is_function'
                                         std::function<TreeUpdater* ()> > {
                                              ^~~~~~~~
                                              is_function
include/xgboost/tree_updater.h:75:46: error: 'function' is not a member of 'std'
include/xgboost/tree_updater.h:75:46: note: suggested alternative: 'is_function'
                                         std::function<TreeUpdater* ()> > {
                                              ^~~~~~~~
                                              is_function
include/xgboost/tree_updater.h:75:70: error: template argument 2 is invalid
                                         std::function<TreeUpdater* ()> > {
                                                                      ^
include/xgboost/tree_updater.h:75:72: error: expected '{' before '>' token
                                         std::function<TreeUpdater* ()> > {
                                                                        ^
include/xgboost/tree_updater.h:75:72: error: expected unqualified-id before '>' token
src/tree/tree_updater.cc: In static member function 'static xgboost::TreeUpdater* xgboost::TreeUpdater::Create(const string&)':
src/tree/tree_updater.cc:20:12: error: invalid use of incomplete type 'const struct xgboost::TreeUpdaterReg'
   return (e->body)();
            ^~
In file included from src/tree/tree_updater.cc:6:0:
include/xgboost/tree_updater.h:73:8: note: forward declaration of 'struct xgboost::TreeUpdaterReg'
 struct TreeUpdaterReg
        ^~~~~~~~~~~~~~
src/tree/tree_updater.cc:20:14: error: invalid use of incomplete type 'const struct xgboost::TreeUpdaterReg'
   return (e->body)();
              ^~~~
In file included from src/tree/tree_updater.cc:6:0:
include/xgboost/tree_updater.h:73:8: note: forward declaration of 'struct xgboost::TreeUpdaterReg'
 struct TreeUpdaterReg
        ^~~~~~~~~~~~~~
In file included from dmlc-core/include/dmlc/./parameter.h:25:0,
                 from dmlc-core/include/dmlc/registry.h:14,
                 from include/xgboost/tree_updater.h:11,
                 from src/tree/tree_updater.cc:6:
dmlc-core/include/dmlc/././optional.h: In instantiation of 'dmlc::optional<T>::~optional() [with T = int]':
dmlc-core/include/dmlc/./parameter.h:513:7:   required from here
dmlc-core/include/dmlc/././optional.h:60:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       reinterpret_cast<T*>(&val)->~T();
       ^~~~~~~~~~~~~~~~
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::value() const [with T = int]':
dmlc-core/include/dmlc/./parameter.h:872:9:   required from here
dmlc-core/include/dmlc/././optional.h:106:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/xgboost/tree_updater.h:11:0,
                 from src/tree/tree_updater.cc:6:
dmlc-core/include/dmlc/registry.h: In instantiation of 'dmlc::Registry<EntryType>::~Registry() [with EntryType = xgboost::TreeUpdaterReg]':
src/tree/tree_updater.cc:10:1:   required from here
dmlc-core/include/dmlc/registry.h:118:7: warning: possible problem detected in invocation of delete operator: [-Wdelete-incomplete]
       delete entry_list_[i];
       ^~~~~~
dmlc-core/include/dmlc/registry.h:118:7: warning: invalid use of incomplete type 'struct xgboost::TreeUpdaterReg'
In file included from src/tree/tree_updater.cc:6:0:
include/xgboost/tree_updater.h:73:8: note: forward declaration of 'struct xgboost::TreeUpdaterReg'
 struct TreeUpdaterReg
        ^~~~~~~~~~~~~~
In file included from include/xgboost/tree_updater.h:11:0,
                 from src/tree/tree_updater.cc:6:
dmlc-core/include/dmlc/registry.h:118:7: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
       delete entry_list_[i];
       ^~~~~~
In file included from dmlc-core/include/dmlc/./parameter.h:25:0,
                 from dmlc-core/include/dmlc/registry.h:14,
                 from include/xgboost/tree_updater.h:11,
                 from src/tree/tree_updater.cc:6:
dmlc-core/include/dmlc/././optional.h: In instantiation of 'const T& dmlc::optional<T>::operator*() const [with T = int]':
dmlc-core/include/dmlc/././optional.h:134:11:   required from 'std::ostream& dmlc::operator<<(std::ostream&, const dmlc::optional<T>&) [with T = int; std::ostream = std::basic_ostream<char>]'
dmlc-core/include/dmlc/./parameter.h:877:13:   required from here
dmlc-core/include/dmlc/././optional.h:97:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *reinterpret_cast<const T*>(&val);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [build/tree/tree_updater.o] Error 1
make: *** Waiting for unfinished jobs....
geoHeil commented 7 years ago

workaround for me is to install the old version of GCC via brew install gcc@6 --without-multilib Are there any plans to support gcc7?

OptimZ commented 7 years ago

I got the same problem with gcc7.1.0, and build successfully after changing to gcc6, thanks!