Warnings: https://github.com/Microsoft/LightGBM/pull/1522#issuecomment-404970003
They should be fixed:
@guolinke
I think all these warning should be fixed, at least set some ignore tags in cmake.
Errors: https://github.com/Microsoft/LightGBM/pull/1522#issuecomment-404973928 https://github.com/Microsoft/LightGBM/pull/1522#issuecomment-404983245
ping @guolinke @chivee @henry0312
@chivee Thank you!
Unfortunately, AppleClang 8.0 fails with segfault: https://github.com/Microsoft/LightGBM/pull/1522#issuecomment-404983245
Maybe one of these points is the reason that 8.0 (Xcode 8) crashes and 8.1 (Xcode 8.3) not?
New Features
The Apple LLVM compiler now supports nullability annotations on function and method parameters with an array type, and provides additional warnings for incomplete and suspicious nullability annotations. (25846421)
Resolved Issues
The compiler properly completes type information for forward-declared classes from C++ precompiled headers. (30173654)
Anyway, I think that it doesn't value to dig into this problem and just leave min version 8.1.
@StrikerRUS Then we could change the title and leave it for people searching for answers.
@chivee "... and below" is already answered by you previously :-)
according to this , thread_local was supported since AppleClang 8. I think we might set the minimum version to that.
However, warnings https://github.com/Microsoft/LightGBM/pull/1522#issuecomment-404970003 are still not fixed.
To be honest, I'd like close this issue after fixing warnings. 8.1 is good version to start support and users are protected from 8.0 segfaults by these lines
https://github.com/Microsoft/LightGBM/blob/c78f26ed9e20575ab770d0dfa2800d9438c0f4c6/CMakeLists.txt#L28-L30
@StrikerRUS Yes, I mean to change to the title so that the user knows well why we don't offer the support of version below 8.1
@chivee Of course, as you wish!
Apologies if this is a potential noob question, but it appears that LightGBM just isn't going to support compilers lower than clang 8.1, correct? I'm running on a Mac Pro 2009, which cannot (officially) update to clang 8.1, but is stuck at 8.0... Is there a work around?
build $ cmake ..
CMake Error at CMakeLists.txt:30 (message):
Insufficient AppleClang version
Hi @brigoodwinan !
Unfortunately, you are absolutely right...
LightGBM requires Apple Clang >= 8.1. We tried to compile it with 8.0, but got segfault during compilation: https://github.com/Microsoft/LightGBM/issues/1557#issuecomment-409523338 and https://github.com/Microsoft/LightGBM/pull/1522#issuecomment-404983245. We don't know the exact reasons of the segfault and have decided to prevent users' problems by prohibition of compilation with 8.0. You can find my personal guesses in this https://github.com/Microsoft/LightGBM/issues/1557#issuecomment-413155253.
In case you have a strong wish to try to compile LightGBM with Apple Clang 8.0, you can remove these lines from the CMakeLists.txt file which is located in the root folder of the project:
https://github.com/Microsoft/LightGBM/blob/c306c7b9f3121f3f12aa5ee7f8f7c88d904b933e/CMakeLists.txt#L29-L31
UPD: Oh, I forgot to say, that the real work around in your case, which will allow you to use LightGBM, is compilation with gcc. Please take a look at the corresponding installation guide section.
For anyone who comes across this thread using OSX:
Follow the main installation instructions for gcc: use Homebrew to install cmake and gcc, then (temporarily) set your variables as follows (these are the gcc versions as of 2019-01).
export CC=/usr/local/Cellar/gcc/8.2.0/bin/gcc-8
export CXX=/usr/local/Cellar/gcc/8.2.0/bin/g++-8
export PATH=/usr/bin:$PATH
I think I had to do this because Xcode (8.0) is installed, and it forces the default compiler to clang.
Then you should be able to mkdir build, cd build, and cmake ..
Thanks for your help @StrikerRUS!
Most helpful comment
For anyone who comes across this thread using OSX:
Follow the main installation instructions for gcc: use Homebrew to install cmake and gcc, then (temporarily) set your variables as follows (these are the gcc versions as of 2019-01).
I think I had to do this because Xcode (8.0) is installed, and it forces the default compiler to clang.
Then you should be able to
mkdir build,cd build, andcmake ..Thanks for your help @StrikerRUS!