Discussion and troubleshooting on PyPI (pip) installation (the newest 0.6 version)

After some good tries (#1445), the PyPI xgboost installation is updated to the most recent code https://pypi.python.org/pypi/xgboost/ and Mac/Linux users can install it via pip install xgboost. I recommend using Anaconda or Miniconda python release for easier dependency resolution on numpy scipy and scikit-learn, and update pip (setuptools) to the most recent version.
Before typing pip install xgboost and happy waiting, please follow the instruction on the PyPI page as copied here:

Since this package contains C++ source code, pip needs a C++ compiler from the system to compile the source code on-the-fly. Please follow the following instruction for each supported platform.
Note for Mac OS X users: please install gcc from brew by brew tap homebrew/versions; brew install gcc --without-multilib firstly.
Note for Linux users: please install gcc by sudo apt-get install build-essential firstly or using the corresponding package manager of the system.
Note for windows users: this pip installation may not work on some windows environment, and it may cause unexpected errors. pip installation on windows is currently disabled for further investigation, please install from Github.

If everything is fine, after hearing CPU fan noise for couple of minutes (it is compiling on the fly), one should see something like this:

This package is tested with Mac OS X 10.10, ubuntu 14/16 and CentOS 7 with no problem. Please report any issues or installation difficulties here, with detailed information. For having the debug output, please use pip install -v xgboost. Thanks.

1、gcc-6.1.0_1 already installed
2、Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/n2/q3c3s28n7ybbmt2glbsb4s5h0000gn/T/pip-build-Yu8pqZ/xgboost

CentOS Linux release 7.0.1406 (Core)（x64）
2.Linux version 3.10.0-123.8.1.el7.x86_64<EMAIL_ADDRESS>(gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Mon Sep 22 19:06:58 UTC 2014
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-DzjokQ/xgboost/

@hemoely can you provide the full log somewhere, e.g. dropbox? P.S. you have g++ too, right?
@byronliwei what is your system, Ubuntu, Mac or CentOS? also, can you provide the full log somewhere, e.g. dropbox?

Mac ，，thank you
Collecting xgboost
Using cached xgboost-0.6a2.tar.gz
Complete output from command python setup.py egg_info:
rm -f -rf build build_plugin lib bin ~ /~ //~ ///~ /.o //.o ///.o xgboost
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
/bin/sh: clang-omp++: command not found
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
-----------------------------
Building multi-thread xgboost failed
Start to build single-thread xgboost
rm -f -rf build build_plugin lib bin ~ /~ //~ ///~ /.o //.o ///.o xgboost
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
Successfully build single-thread xgboost
If you want multi-threaded version
See additional instructions in doc/build.md
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/n2/q3c3s28n7ybbmt2glbsb4s5h0000gn/T/pip-build-_5FFp6/xgboost/setup.py", line 29, in
LIB_PATH = libpath'find_lib_path'
File "/private/var/folders/n2/q3c3s28n7ybbmt2glbsb4s5h0000gn/T/pip-build-_5FFp6/xgboost/xgboost/libpath.py", line 45, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
builtin.XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
List of candidates:
/private/var/folders/n2/q3c3s28n7ybbmt2glbsb4s5h0000gn/T/pip-build-_5FFp6/xgboost/xgboost/libxgboost.so
/private/var/folders/n2/q3c3s28n7ybbmt2glbsb4s5h0000gn/T/pip-build-_5FFp6/xgboost/xgboost/../../lib/libxgboost.so
/private/var/folders/n2/q3c3s28n7ybbmt2glbsb4s5h0000gn/T/pip-build-_5FFp6/xgboost/xgboost/./lib/libxgboost.so
----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/n2/q3c3s28n7ybbmt2glbsb4s5h0000gn/T/pip-build-_5FFp6/xgboost/

@byronliwei seems like you don't have either gcc-5 or clang-omp, so the compiling fails. Please install either one from brew.

@byronliwei           brew install clang-omp

I am hoping this is the right place for the following problem: (If not please let me know where to post this)
I have OSX El Capitan 10.11.5, Anaconda Python 3.5.
I have done install and uninstall multiple times with brew install gcc --without-multilib
brew installs gcc6 and xgboost needs gcc5. Here’s the exact error I am getting:
Python 3.5.2 |Anaconda 4.1.1 (x86_64)| (default, Jul  2 2016, 17:52:12)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import xgboost
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "//anaconda/lib/python3.5/site-packages/xgboost/__init__.py", line 11, in <module>
    from .core import DMatrix, Booster
  File "//anaconda/lib/python3.5/site-packages/xgboost/core.py", line 112, in <module>
    _LIB = _load_lib()
  File "//anaconda/lib/python3.5/site-packages/xgboost/core.py", line 106, in _load_lib
    lib = ctypes.cdll.LoadLibrary(lib_path[0])
  File "//anaconda/lib/python3.5/ctypes/__init__.py", line 425, in LoadLibrary
    return self._dlltype(name)
  File "//anaconda/lib/python3.5/ctypes/__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(//anaconda/lib/python3.5/site-packages/xgboost/./lib/libxgboost.so, 6): Library not loaded: /usr/local/opt/gcc/lib/gcc/5/libgomp.1.dylib
  Referenced from: //anaconda/lib/python3.5/site-packages/xgboost/./lib/libxgboost.so
  Reason: image not found

Do I need to use brew install gcc5  --without-multilib and create a link (like this one [http://stackoverflow.com/questions/28970935/osx-replace-gcc-version-4-2-1-with-4-9-installed-via-homebrew/28982564#28982564]) ?
Any help really appreciated. Thank you!

Makefile in Mac now requires gcc-5, maybe we should just ask gcc-6?

Hi,
I got the following error when I tried to install xgboost.
Do you know why I got the following eroor?
I am using Mac and I have run "brew tap homebrew/versions; brew install gcc --without-multilib"
Thanks in advance!
Collecting xgboost
1 location(s) to search for versions of xgboost:

https://pypi.python.org/simple/xgboost/
Getting page https://pypi.python.org/simple/xgboost/
Looking up "https://pypi.python.org/simple/xgboost/" in the cache
Current age based on date: 39
Freshness lifetime from max-age: 600
Freshness lifetime from request max-age: 600
The response is "fresh", returning cached response
600 > 39
Analyzing links from page https://pypi.python.org/simple/xgboost/
Found link https://pypi.python.org/packages/16/ac/dd16a3206de8658a5e0076174941ae642ee10c958c53a35a7500993ca936/xgboost-0.4a15.tar.gz#md5=bcab760af5ac7f20e88bde7426423565 (from https://pypi.python.org/simple/xgboost/), version: 0.4a15
Found link https://pypi.python.org/packages/20/95/c089ee1be6574ed8167f0bfbd5f78c1adc7b1403ba3977d5ae98003882af/xgboost-0.4a22.tar.gz#md5=cb858cf85fe9f4263e9b523c4900c3f9 (from https://pypi.python.org/simple/xgboost/), version: 0.4a22
Found link https://pypi.python.org/packages/21/5c/a221a2ea13ee14acd1ddc59e213fc788ebd2e7550249adbb12934367aa58/xgboost-0.4a28.tar.gz#md5=fd8ffedd172b5cb917483df76e6efe7a (from https://pypi.python.org/simple/xgboost/), version: 0.4a28
Found link https://pypi.python.org/packages/34/85/456a1a8c762f646671043e446a59efbce02b5f408f522c4ef8793e860c5e/xgboost-0.6a2.tar.gz#md5=c486211efa29b95771c74f5d8701ca4a (from https://pypi.python.org/simple/xgboost/), version: 0.6a2
Found link https://pypi.python.org/packages/4a/cc/9556005199e9f550c97bc1e81bff64431c952a9968f78651ba48b9687243/xgboost-0.4a26.tar.gz#md5=e5b1f7c477e5238e7b491153449b33b2 (from https://pypi.python.org/simple/xgboost/), version: 0.4a26
Found link https://pypi.python.org/packages/4f/70/a236e5170ab7f72cf49554400d841a2046d7c712e2cf6524a435612469a4/xgboost-0.4a25.tar.gz#md5=bf3d633fa88ae7923794dd5da0600388 (from https://pypi.python.org/simple/xgboost/), version: 0.4a25
Found link https://pypi.python.org/packages/58/85/94517fb4933fbc66c87df3f0166c48e421b1d3d082d8d0b29960f4e3b643/xgboost-0.4a30.tar.gz#md5=5f4e812ba3a1faa85514993e56c1b4b8 (from https://pypi.python.org/simple/xgboost/), version: 0.4a30
Found link https://pypi.python.org/packages/65/4e/05d8fe3dd568cf57fe76edb3018d2a7d8bc57611b8fef6dd2e4cfb6c794a/xgboost-0.4a12.tar.gz#md5=4d768e034a28590497bb79279f036946 (from https://pypi.python.org/simple/xgboost/), version: 0.4a12
Found link https://pypi.python.org/packages/6c/d7/b7e5027c95f1bd6676062af56bfbd53eee567f8384a4aa582330360a3989/xgboost-0.4a14.tar.gz#md5=a7c648933a47ae31f869b5c030c17c69 (from https://pypi.python.org/simple/xgboost/), version: 0.4a14
Found link https://pypi.python.org/packages/71/aa/206c86bc4be36832f8c73491d972a6c1bcdcd2717f1fb04d0bad0c61ae35/xgboost-0.4a23.tar.gz#md5=4f8a17ca86995ed51fc1a424618b94db (from https://pypi.python.org/simple/xgboost/), version: 0.4a23
Found link https://pypi.python.org/packages/7a/b4/fa38771ebd221dd83aa37864157daebb7d8446fd6c3614dc6f56932f9643/xgboost-0.4a19.tar.gz#md5=413d55d0534447e77064dbd1ad1ccb48 (from https://pypi.python.org/simple/xgboost/), version: 0.4a19
Found link https://pypi.python.org/packages/7e/16/d47c4ba06a5b4d364a7323013e040f3f21d50db2b50cfc962bad674b873f/xgboost-0.4a29.tar.gz#md5=4bf4eb1898cfc28bbd3b43e19c69fdf5 (from https://pypi.python.org/simple/xgboost/), version: 0.4a29
Found link https://pypi.python.org/packages/7f/36/e55ba853acc85d7ebaddec498c72c768bb2700415c5a2ea967a0b8dc8957/xgboost-0.6a1.tar.gz#md5=be2b2f4c6f439960da3f495da39b45e2 (from https://pypi.python.org/simple/xgboost/), version: 0.6a1
Found link https://pypi.python.org/packages/92/37/d7b963a6b307941e86758bd3330d62ace0c83eaf60fbacf8486a6e8d72da/xgboost-0.4a21.tar.gz#md5=45284beb53f5087e73dcf55ff1c5a026 (from https://pypi.python.org/simple/xgboost/), version: 0.4a21
Found link https://pypi.python.org/packages/97/7b/344e3b849bb041dca7c6cab66be8007f64cdceebcb41cda9f1e10bc651d9/xgboost-0.4a13.tar.gz#md5=5f53d51e4305c679192b3cabda2b0dbe (from https://pypi.python.org/simple/xgboost/), version: 0.4a13
Found link https://pypi.python.org/packages/b3/ec/110721470306e8c9199c46217cfff5c32ad1e7e8a2dabefa2603d79b32bc/xgboost-0.4a18.tar.gz#md5=9f70ca05843afb1d50522530f140d640 (from https://pypi.python.org/simple/xgboost/), version: 0.4a18
Found link https://pypi.python.org/packages/ca/58/2c3265f4824a8c3a33784e7236adb7808d3c647cfe962045fcc53d10d570/xgboost-0.4a24.tar.gz#md5=2bf0edfe62ddb3502c4f48df3428a7e0 (from https://pypi.python.org/simple/xgboost/), version: 0.4a24
Found link https://pypi.python.org/packages/cd/4d/9a9341759aa32358b794db9e21cd0825e9107e2fc7a641e285eb1b0b69b8/xgboost-0.4a20.tar.gz#md5=88721733e7c7026fa2e95de7165d4b86 (from https://pypi.python.org/simple/xgboost/), version: 0.4a20
Found link https://pypi.python.org/packages/ec/c1/93d27b079b5edd76bc93d6cefcf82e667942bb576a5f764742401febe161/xgboost-0.4a27.tar.gz#md5=cd091569f651c3c625c4a299cfc72e74 (from https://pypi.python.org/simple/xgboost/), version: 0.4a27
Using version 0.6a2 (newest of versions: 0.4a12, 0.4a13, 0.4a14, 0.4a15, 0.4a18, 0.4a19, 0.4a20, 0.4a21, 0.4a22, 0.4a23, 0.4a24, 0.4a25, 0.4a26, 0.4a27, 0.4a28, 0.4a29, 0.4a30, 0.6a1, 0.6a2)
Looking up "https://pypi.python.org/packages/34/85/456a1a8c762f646671043e446a59efbce02b5f408f522c4ef8793e860c5e/xgboost-0.6a2.tar.gz" in the cache
Current age based on date: 12635
Freshness lifetime from max-age: 31557600
The response is "fresh", returning cached response
31557600 > 12635
Using cached xgboost-0.6a2.tar.gz
Downloading from URL https://pypi.python.org/packages/34/85/456a1a8c762f646671043e446a59efbce02b5f408f522c4ef8793e860c5e/xgboost-0.6a2.tar.gz#md5=c486211efa29b95771c74f5d8701ca4a (from https://pypi.python.org/simple/xgboost/)
Running setup.py (path:/private/var/folders/qb/g_6lvtb15_b_60g185fxj5v40000gn/T/pip-build-dzdymwlh/xgboost/setup.py) egg_info for package xgboost
Running command python setup.py egg_info
rm -f -rf build build_plugin lib bin ~ /~ //~ ///~ /.o //.o ///*.o xgboost
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
/bin/sh: clang-omp++: command not found
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
Building multi-thread xgboost failed
Start to build single-thread xgboost
rm -f -rf build build_plugin lib bin ~ /~ //~ ///~ /.o //.o ///*.o xgboost
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
Successfully build single-thread xgboost
If you want multi-threaded version
See additional instructions in doc/build.md
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/qb/g_6lvtb15_b_60g185fxj5v40000gn/T/pip-build-dzdymwlh/xgboost/setup.py", line 29, in
LIB_PATH = libpath'find_lib_path'
File "/private/var/folders/qb/g_6lvtb15_b_60g185fxj5v40000gn/T/pip-build-dzdymwlh/xgboost/xgboost/libpath.py", line 45, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
List of candidates:
/private/var/folders/qb/g_6lvtb15_b_60g185fxj5v40000gn/T/pip-build-dzdymwlh/xgboost/xgboost/libxgboost.so
/private/var/folders/qb/g_6lvtb15_b_60g185fxj5v40000gn/T/pip-build-dzdymwlh/xgboost/xgboost/../../lib/libxgboost.so
/private/var/folders/qb/g_6lvtb15_b_60g185fxj5v40000gn/T/pip-build-dzdymwlh/xgboost/xgboost/./lib/libxgboost.so
Cleaning up...
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/qb/g_6lvtb15_b_60g185fxj5v40000gn/T/pip-build-dzdymwlh/xgboost/
Exception information:
Traceback (most recent call last):
File "//anaconda/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "//anaconda/lib/python3.5/site-packages/pip/commands/install.py", line 310, in run
wb.build(autobuilding=True)
File "//anaconda/lib/python3.5/site-packages/pip/wheel.py", line 750, in build
self.requirement_set.prepare_files(self.finder)
File "//anaconda/lib/python3.5/site-packages/pip/req/req_set.py", line 370, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "//anaconda/lib/python3.5/site-packages/pip/req/req_set.py", line 601, in _prepare_file
abstract_dist.prep_for_dist()
File "//anaconda/lib/python3.5/site-packages/pip/req/req_set.py", line 127, in prep_for_dist
self.req_to_install.run_egg_info()
File "//anaconda/lib/python3.5/site-packages/pip/req/req_install.py", line 425, in run_egg_info
command_desc='python setup.py egg_info')
File "//anaconda/lib/python3.5/site-packages/pip/utils/init.py", line 718, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/qb/g_6lvtb15_b_60g185fxj5v40000gn/T/pip-build-dzdymwlh/xgboost/

@liuxu1104 please install either gcc-5 or clang-omp from brew. the error log shows you have neither of these compilers.

@liuxu1104 seems like you have gcc-6 instead of gcc-5. maybe we should just require gcc-6 or clang-omp for Mac in PyPI, and discard gcc-5?

@phunterlau  Thank you ! I build it on OS X (El Capitan 10.11.5, Anaconda Python 3.5) and it worked. Also installed gcc5 brew install gcc5 --without-multilib  (There were few notes and warning, but I can import xgboost from python)

@phunterlau  Solved!
Thank you!

It's worth noting that clang-omp was removed from brew (https://github.com/Homebrew/homebrew-core/commit/c57e307), so anyone on updated OS X + homebrew will get a 'not found' error.

@davechallis so, should we just remove clang-omp support for future?

@phunterlau it looks like the opemmp functionality is available in current versions of LLVM, so using that instead should work (but I can't test it on older versions of Mac OS X easily, so not sure if homebrew has the same channels/software available for them).
I.e. brew install llvm provides /usr/local/opt/llvm/bin/clang and /usr/local/opt/llvm/bin/clang++, both of which support the -fopenmp flag.
Changing xgboost to then use these compilers (or gcc-6) on mac os x worked for me.

I've already installed gcc-6, but still cannot install xgboost with the error below,
so I follow your advice to install clang-omp from brew but it still failed.
`pip install xgboost
Collecting xgboost
Using cached xgboost-0.6a2.tar.gz
Complete output from command python setup.py egg_info:
rm -f -rf build build_plugin lib bin ~ /~ //~ ///~ /.o //.o ///.o xgboost
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
-----------------------------
Building multi-thread xgboost failed
Start to build single-thread xgboost
rm -f -rf build build_plugin lib bin ~ /~ //~ ///~ /.o //.o ///.o xgboost
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
Successfully build single-thread xgboost
If you want multi-threaded version
See additional instructions in doc/build.md
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-TbS11L/xgboost/setup.py", line 29, in
LIB_PATH = libpath'find_lib_path'
File "/private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-TbS11L/xgboost/xgboost/libpath.py", line 45, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
builtin.XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
List of candidates:
/private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-TbS11L/xgboost/xgboost/libxgboost.so
/private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-TbS11L/xgboost/xgboost/../../lib/libxgboost.so
/private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-TbS11L/xgboost/xgboost/./lib/libxgboost.so
----------------------------------------

`
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-TbS11L/xgboost/
Then I install clang-omp instead but still failed. The code is attached below
$ brew install clang-omp Error: No available formula with the name "clang-omp"  ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... Error: undefined method []' for nil:NilClass
Please report this bug:
https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/vendor/okjson.rb:202:in eat' /usr/local/Library/Homebrew/vendor/okjson.rb:165:in pairparse'
/usr/local/Library/Homebrew/vendor/okjson.rb:148:in block in objparse' /usr/local/Library/Homebrew/vendor/okjson.rb:145:in loop'
/usr/local/Library/Homebrew/vendor/okjson.rb:145:in objparse' /usr/local/Library/Homebrew/vendor/okjson.rb:119:in valparse'
/usr/local/Library/Homebrew/vendor/okjson.rb:191:in block in arrparse' /usr/local/Library/Homebrew/vendor/okjson.rb:188:in loop'
/usr/local/Library/Homebrew/vendor/okjson.rb:188:in arrparse' /usr/local/Library/Homebrew/vendor/okjson.rb:120:in valparse'
/usr/local/Library/Homebrew/vendor/okjson.rb:166:in pairparse' /usr/local/Library/Homebrew/vendor/okjson.rb:148:in block in objparse'
/usr/local/Library/Homebrew/vendor/okjson.rb:145:in loop' /usr/local/Library/Homebrew/vendor/okjson.rb:145:in objparse'
/usr/local/Library/Homebrew/vendor/okjson.rb:102:in textparse' /usr/local/Library/Homebrew/vendor/okjson.rb:46:in decode'
/usr/local/Library/Homebrew/utils/json.rb:10:in load' /usr/local/Library/Homebrew/utils/github.rb:176:in open'
/usr/local/Library/Homebrew/cmd/search.rb:133:in block in search_tap' /usr/local/Library/Homebrew/cmd/search.rb:151:in yield'
/usr/local/Library/Homebrew/cmd/search.rb:151:in search_tap' /usr/local/Library/Homebrew/cmd/search.rb:117:in block (2 levels) in search_taps'`
What should I do next? Please help. Thanks!

@rayquazasnow seems like you have gcc-6 while the current pip install xgboost requires either gcc-5 or clang-omp++ since brew provided gcc-5 at that time. Meanwhile, you can install from github, or brew install --with-clang llvm for having clang++ . I will find a stable version and update PyPI to gcc-6 along with other fixes.

@phunterlau thanks for your advice. I successfully installed llvm by brew install --with-clang llvm. However, pip install xgboost still can not work(the same error code shown above). Should I uninstall gcc-6 and install gcc-5 instead?

@rayquazasnow please post the new error message from pip before downgrade gcc. Or, install from github.

@phunterlau Here is the new error after I install llvm. Still with the message "/bin/sh: clang-omp++: command not found"
$ pip install xgboost
Collecting xgboost
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/xgboost/
Using cached xgboost-0.6a2.tar.gz
Complete output from command python setup.py egg_info:
rm -f -rf build build_plugin lib bin ~ /~ //~ ///~ /.o //.o ///.o xgboost
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
/bin/sh: clang-omp++: command not found
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
-----------------------------
Building multi-thread xgboost failed
Start to build single-thread xgboost
rm -f -rf build build_plugin lib bin ~ /~ //~ ///~ /.o //.o ///.o xgboost
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
Successfully build single-thread xgboost
If you want multi-threaded version
See additional instructions in doc/build.md
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-cEIF0a/xgboost/setup.py", line 29, in
LIB_PATH = libpath'find_lib_path'
File "/private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-cEIF0a/xgboost/xgboost/libpath.py", line 45, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
builtin.XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
List of candidates:
/private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-cEIF0a/xgboost/xgboost/libxgboost.so
/private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-cEIF0a/xgboost/xgboost/../../lib/libxgboost.so
/private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-cEIF0a/xgboost/xgboost/./lib/libxgboost.so
----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-cEIF0a/xgboost/

@rayquazasnow can you try which clang-omp++ and see the result? It should be something like this or the installation didn't work:
$ which clang-omp++
/usr/local/bin/clang-omp++

@phunterlau there is no response with which clang-omp++. It seems like the installation didn't work.
$ brew install --with-clang llvm
/usr/local/bin/brew: line 28: /usr/local/Library/Homebrew/brew.sh: No such file or directory
$ brew install clang++
/usr/local/bin/brew: line 28: /usr/local/Library/Homebrew/brew.sh: No such file or directory
$ which clang
/usr/bin/clang
$ which llvm
$ which clang++
/usr/bin/clang++

@rayquazasnow you might want to install or re-install brew firstly, seems like your brew installation was broken.

I did brew install gcc6 --without-multilib. That got it rolling.

I didn't quite get why clang-omp or gcc is needed in Mac.
The log says that the single threaded version has been built, but it still can't find the library.
It says:
Successfully build single-thread xgboost
If you want multi-threaded version
See additional instructions in doc/build.md

but finally gives:
__builtin__.XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
List of candidates:
/private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-cEIF0a/xgboost/xgboost/libxgboost.so
/private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-cEIF0a/xgboost/xgboost/../../lib/libxgboost.so
/private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-cEIF0a/xgboost/xgboost/./lib/libxgboost.so

So, as I see it the issue is something else. It should be installing xgboost with the single threaded version.
I can install xgboost from git without gcc nor clang-omp++ ... using just the bash build.sh

@AbdealiJK if there is no gcc or clang-omp, the script would call the default clang from Xcode which only supports single thread and loses the advantage of XGBoost parallelization.

@phunterlau while I completely agree with that, I don't see why the installation failure happens. I don't understand why the error would be:
builtin.XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?

@phunterlau I was checking the pypi package to understand the problem and found that the way of calling make without openmp was invalid (and it always used -fopenmp). And that the default gcc/g++ was never an option.
Modifying it with these diffs worked for me:
--- a/xgboost-0.6a2/xgboost/Makefile
+++ b/xgboost-0.6a2_modified/xgboost/Makefile
@@ -43,8 +43,8 @@ endif
 # it is useful for pip install compiling-on-the-fly
 OS := $(shell uname)
 ifeq ($(OS), Darwin)
-export CC = $(if $(shell which gcc-5),gcc-5,clang-omp)
-export CXX = $(if $(shell which g++-5),g++-5,clang-omp++)
+export CC = $(if $(shell which gcc-5),gcc-5,$(if $(shell which clang-omp),clang-omp,gcc))
+export CXX = $(if $(shell which g++-5),g++-5,$(if $(shell which clang-omp++),clang-omp++,g++))
 endif

--- a/xgboost-0.6a2/xgboost/build-python.sh
+++ b/xgboost-0.6a2_modified/xgboost/build-python.sh
@@ -22,7 +22,7 @@ else
     echo "Building multi-thread xgboost failed"
     echo "Start to build single-thread xgboost"
     make clean
-    make lib/libxgboost.so -j4 no_omp=1
+    make lib/libxgboost.so -j4 config=make/minimum.mk
     echo "Successfully build single-thread xgboost"
     echo "If you want multi-threaded version"
     echo "See additional instructions in doc/build.md"

 export LDFLAGS= -pthread -lm $(ADD_LDFLAGS) $(DMLC_LDFLAGS) $(PLUGIN_LDFLAGS)

@AbdealiJK Thanks. PyPI 's makefile was quick-n-dirty way and it didn't consider all scenarios . Would you like to send a PR for updating this?

Would love to, but I'm not sure what to modify - because the github build.sh and Makefile uses the correct versions.
The pypi package seems to have a different structure and different files than github (maybe they just need to be updated?)

@AbdealiJK oh, now I remember it: PyPI version was a little bit outdated, it was created before the Makefile fix. Let me update it. Thanks.

Would you consider uploading official prebuild wheel packages to pypi? It would make windows and mac users installation easier. Now windows users can get unofficial builds at http://www.lfd.uci.edu/~gohlke/pythonlibs/#xgboost

@xgdgsc precompiled package is good. Is the Windows precompiled package made by you or someone that you know? can you add the recipe to the official guideline so other people can start using it? I have seen much pain on this issue list when installing windows version.  As to precompiled PyPI build for Mac/Linux, we have to separate them since PyPI doesn't tell difference between platforms. Definitely a good idea, in short.

That package is not made by me or anyone I know, but that page is famous among windows python users. I would suggest uploading precompiled packages to pypi just like what I do here. Pip would automatically select the right wheel package when user install. This way we just add the warning of installing the VC redistribution packages if loading the prebuilt binary failed. Another option is to use conda-forge to build the packages for anaconda users.

I am trying to install xgboost and below is the result.
[root@hostname bdinstalldir]# pip2.7 install xgboost
Downloading/unpacking xgboost
Could not find a version that satisfies the requirement xgboost (from versions: 0.4a15, 0.4a22, 0.4a28, 0.6a2, 0.4a26, 0.4a25, 0.4a30, 0.4a12, 0.4a14, 0.4a23, 0.4a19, 0.4a29, 0.6a1, 0.4a21, 0.4a13, 0.4a18, 0.4a24, 0.4a20, 0.4a27)
Cleaning up...
No distributions matching the version for xgboost
Storing debug log for failure in /root/.pip/pip.log
[root@hostname bdinstalldir]#
Checked for gcc and we have following gcc's on node.
[root@hostname bdinstalldir]# rpm -qa | grep -i gcc
gcc-4.4.7-17.el6.x86_64
libgcc-4.4.7-17.el6.x86_64
compat-gcc-34-c++-3.4.6-19.el6.x86_64
gcc-gnat-4.4.7-17.el6.x86_64
compat-gcc-34-3.4.6-19.el6.x86_64
libgcc-4.4.7-17.el6.i686
gcc-java-4.4.7-17.el6.x86_64
devtoolset-3-gcc-c++-4.9.1-10.el6.x86_64
gcc-c++-4.4.7-17.el6.x86_64
gcc-gfortran-4.4.7-17.el6.x86_64
gcc-objc++-4.4.7-17.el6.x86_64
devtoolset-3-gcc-4.9.1-10.el6.x86_64
gcc-objc-4.4.7-17.el6.x86_64
[root@hostname site-packages]# print xgboost.file
-bash: print: command not found
[root@hostname site-packages]#
Tried with --pre  option and it didn't work as shown below.
[root@hostname  bdinstalldir]# pip2.7 install --pre xgboost
Downloading/unpacking xgboost
Downloading xgboost-0.6a2.tar.gz (1.2MB): 1.2MB downloaded
Running setup.py (path:/tmp/pip_build_root/xgboost/setup.py) egg_info for package xgboost
rm -f -rf build build_plugin lib bin ~ /~ //~ ///~ /.o //.o ///.o xgboost
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -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++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/c_api/c_api_error.cc -o build/c_api/c_api_error.o
g++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/logging.cc -o build/logging.o
g++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/c_api/c_api.cc -o build/c_api/c_api.o
g++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/learner.cc -o build/learner.o
In file included from src/c_api/./c_api_error.h:9,
from src/c_api/c_api_error.cc:6:
dmlc-core/include/dmlc/base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from include/xgboost/data.h:10,
from src/c_api/c_api.cc:3:
dmlc-core/include/dmlc/base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from dmlc-core/include/dmlc/logging.h:15,
from include/xgboost/logging.h:11,
from src/learner.cc:7:
dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from dmlc-core/include/dmlc/logging.h:15,
from include/xgboost/logging.h:11,
from src/logging.cc:7:
dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from src/c_api/c_api_error.cc:7:
src/c_api/../common/thread_local.h: In static member function ‘static T xgboost::common::ThreadLocalStore::Get()’:
src/c_api/../common/thread_local.h:44: error: ‘nullptr’ was not declared in this scope
make: *** [build/c_api/c_api_error.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from src/c_api/c_api.cc:3:
include/xgboost/data.h: In constructor ‘xgboost::DMatrix::DMatrix()’:
include/xgboost/data.h:234: error: ‘nullptr’ was not declared in this scope
In file included from src/c_api/c_api.cc:15:
src/c_api/../data/simple_csr_source.h: At global scope:
src/c_api/../data/simple_csr_source.h:65: error: expected ‘;’ before ‘override’
src/c_api/../data/simple_csr_source.h:67: error: expected ‘;’ before ‘override’
src/c_api/../data/simple_csr_source.h:69: error: expected ‘;’ before ‘override’
In file included from src/c_api/c_api.cc:16:
src/c_api/../common/thread_local.h: In static member function ‘static T* xgboost::common::ThreadLocalStore::Get()’:
src/c_api/../common/thread_local.h:44: error: ‘nullptr’ was not declared in this scope
In file included from include/xgboost/./gbm.h:17,
from include/xgboost/learner.h:16,
from src/learner.cc:8:
include/xgboost/././data.h: In constructor ‘xgboost::DMatrix::DMatrix()’:
include/xgboost/././data.h:234: error: ‘nullptr’ was not declared in this scope
In file included from src/c_api/c_api.cc:18:
src/c_api/../common/io.h: At global scope:
src/c_api/../common/io.h:30: error: expected ‘;’ before ‘override’
src/c_api/c_api.cc:267: error: expected ‘;’ before end of line
src/c_api/c_api.cc:267: error: expected ‘}’ before end of line
In file included from src/c_api/c_api.cc:18:
src/c_api/../common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’:
src/c_api/../common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’
src/c_api/../common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’
src/c_api/c_api.cc: At global scope:
src/c_api/c_api.cc:267: error: expected unqualified-id before end of line
src/c_api/c_api.cc:267: error: expected ‘}’ before end of line
src/c_api/c_api.cc:267: error: expected ‘}’ before end of line
src/c_api/c_api.cc:267: error: expected declaration before end of line
In file included from src/learner.cc:17:
src/./common/io.h: At global scope:
src/./common/io.h:30: error: expected ‘;’ before ‘override’
src/learner.cc:484: error: expected ‘;’ before end of line
src/learner.cc:484: error: expected ‘}’ before end of line
In file included from src/learner.cc:17:
src/./common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’:
src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’
src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’
src/learner.cc: At global scope:
src/learner.cc:484: error: expected unqualified-id before end of line
src/learner.cc:484: error: expected ‘}’ before end of line
src/learner.cc:484: error: expected ‘}’ before end of line
src/learner.cc:484: error: expected declaration before end of line
make: *** [build/c_api/c_api.o] Error 1
make: *** [build/learner.o] Error 1
-----------------------------
Building multi-thread xgboost failed
Start to build single-thread xgboost
rm -f -rf build build_plugin lib bin ~ /~ //~ ///~ /.o //.o ///.o xgboost
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -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++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/c_api/c_api_error.cc -o build/c_api/c_api_error.o
g++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/learner.cc -o build/learner.o
g++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/c_api/c_api.cc -o build/c_api/c_api.o
g++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/logging.cc -o build/logging.o
In file included from src/c_api/./c_api_error.h:9,
from src/c_api/c_api_error.cc:6:
dmlc-core/include/dmlc/base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from include/xgboost/data.h:10,
from src/c_api/c_api.cc:3:
dmlc-core/include/dmlc/base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from dmlc-core/include/dmlc/logging.h:15,
from include/xgboost/logging.h:11,
from src/logging.cc:7:
dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from dmlc-core/include/dmlc/logging.h:15,
from include/xgboost/logging.h:11,
from src/learner.cc:7:
dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from src/c_api/c_api_error.cc:7:
src/c_api/../common/thread_local.h: In static member function ‘static T xgboost::common::ThreadLocalStore::Get()’:
src/c_api/../common/thread_local.h:44: error: ‘nullptr’ was not declared in this scope
make: *** [build/c_api/c_api_error.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from include/xgboost/./gbm.h:17,
from include/xgboost/learner.h:16,
from src/learner.cc:8:
include/xgboost/././data.h: In constructor ‘xgboost::DMatrix::DMatrix()’:
include/xgboost/././data.h:234: error: ‘nullptr’ was not declared in this scope
In file included from src/c_api/c_api.cc:3:
include/xgboost/data.h: In constructor ‘xgboost::DMatrix::DMatrix()’:
include/xgboost/data.h:234: error: ‘nullptr’ was not declared in this scope
In file included from src/learner.cc:17:
src/./common/io.h: At global scope:
src/./common/io.h:30: error: expected ‘;’ before ‘override’
src/learner.cc:484: error: expected ‘;’ before end of line
src/learner.cc:484: error: expected ‘}’ before end of line
In file included from src/learner.cc:17:
src/./common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’:
src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’
src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’
src/learner.cc: At global scope:
src/learner.cc:484: error: expected unqualified-id before end of line
src/learner.cc:484: error: expected ‘}’ before end of line
src/learner.cc:484: error: expected ‘}’ before end of line
src/learner.cc:484: error: expected declaration before end of line
In file included from src/c_api/c_api.cc:15:
src/c_api/../data/simple_csr_source.h: At global scope:
src/c_api/../data/simple_csr_source.h:65: error: expected ‘;’ before ‘override’
src/c_api/../data/simple_csr_source.h:67: error: expected ‘;’ before ‘override’
src/c_api/../data/simple_csr_source.h:69: error: expected ‘;’ before ‘override’
In file included from src/c_api/c_api.cc:16:
src/c_api/../common/thread_local.h: In static member function ‘static T* xgboost::common::ThreadLocalStore::Get()’:
src/c_api/../common/thread_local.h:44: error: ‘nullptr’ was not declared in this scope
In file included from src/c_api/c_api.cc:18:
src/c_api/../common/io.h: At global scope:
src/c_api/../common/io.h:30: error: expected ‘;’ before ‘override’
src/c_api/c_api.cc:267: error: expected ‘;’ before end of line
src/c_api/c_api.cc:267: error: expected ‘}’ before end of line
In file included from src/c_api/c_api.cc:18:
src/c_api/../common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’:
src/c_api/../common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’
src/c_api/../common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’
src/c_api/c_api.cc: At global scope:
src/c_api/c_api.cc:267: error: expected unqualified-id before end of line
src/c_api/c_api.cc:267: error: expected ‘}’ before end of line
src/c_api/c_api.cc:267: error: expected ‘}’ before end of line
src/c_api/c_api.cc:267: error: expected declaration before end of line
make: *** [build/learner.o] Error 1
make: *** [build/c_api/c_api.o] Error 1
Successfully build single-thread xgboost
If you want multi-threaded version
See additional instructions in doc/build.md
Traceback (most recent call last):
File "", line 17, in
File "/tmp/pip_build_root/xgboost/setup.py", line 29, in
LIB_PATH = libpath'find_lib_path'
File "/tmp/pip_build_root/xgboost/xgboost/libpath.py", line 45, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
builtin.XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
List of candidates:
/tmp/pip_build_root/xgboost/xgboost/libxgboost.so
/tmp/pip_build_root/xgboost/xgboost/../../lib/libxgboost.so
/tmp/pip_build_root/xgboost/xgboost/./lib/libxgboost.so
Complete output from command python setup.py egg_info:
rm -f -rf build build_plugin lib bin ~ /~ //~ ///~ /.o //.o ///*.o xgboost
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -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++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/c_api/c_api_error.cc -o build/c_api/c_api_error.o
g++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/logging.cc -o build/logging.o
g++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/c_api/c_api.cc -o build/c_api/c_api.o
g++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/learner.cc -o build/learner.o
In file included from src/c_api/./c_api_error.h:9,
             from src/c_api/c_api_error.cc:6:

dmlc-core/include/dmlc/base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from include/xgboost/data.h:10,
             from src/c_api/c_api.cc:3:

dmlc-core/include/dmlc/base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from dmlc-core/include/dmlc/logging.h:15,
             from include/xgboost/logging.h:11,

             from src/learner.cc:7:

dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from dmlc-core/include/dmlc/logging.h:15,
             from include/xgboost/logging.h:11,

             from src/logging.cc:7:

dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from src/c_api/c_api_error.cc:7:
src/c_api/../common/thread_local.h: In static member function ‘static T* xgboost::common::ThreadLocalStore::Get()’:
src/c_api/../common/thread_local.h:44: error: ‘nullptr’ was not declared in this scope
make: *** [build/c_api/c_api_error.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from src/c_api/c_api.cc:3:
include/xgboost/data.h: In constructor ‘xgboost::DMatrix::DMatrix()’:
include/xgboost/data.h:234: error: ‘nullptr’ was not declared in this scope
In file included from src/c_api/c_api.cc:15:
src/c_api/../data/simple_csr_source.h: At global scope:
src/c_api/../data/simple_csr_source.h:65: error: expected ‘;’ before ‘override’
src/c_api/../data/simple_csr_source.h:67: error: expected ‘;’ before ‘override’
src/c_api/../data/simple_csr_source.h:69: error: expected ‘;’ before ‘override’
In file included from src/c_api/c_api.cc:16:
src/c_api/../common/thread_local.h: In static member function ‘static T* xgboost::common::ThreadLocalStore::Get()’:
src/c_api/../common/thread_local.h:44: error: ‘nullptr’ was not declared in this scope
In file included from include/xgboost/./gbm.h:17,
             from include/xgboost/learner.h:16,

             from src/learner.cc:8:

include/xgboost/././data.h: In constructor ‘xgboost::DMatrix::DMatrix()’:
include/xgboost/././data.h:234: error: ‘nullptr’ was not declared in this scope
In file included from src/c_api/c_api.cc:18:
src/c_api/../common/io.h: At global scope:
src/c_api/../common/io.h:30: error: expected ‘;’ before ‘override’
src/c_api/c_api.cc:267: error: expected ‘;’ before end of line
src/c_api/c_api.cc:267: error: expected ‘}’ before end of line
In file included from src/c_api/c_api.cc:18:
src/c_api/../common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’:
src/c_api/../common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’
src/c_api/../common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’
src/c_api/c_api.cc: At global scope:
src/c_api/c_api.cc:267: error: expected unqualified-id before end of line
src/c_api/c_api.cc:267: error: expected ‘}’ before end of line
src/c_api/c_api.cc:267: error: expected ‘}’ before end of line
src/c_api/c_api.cc:267: error: expected declaration before end of line
In file included from src/learner.cc:17:
src/./common/io.h: At global scope:
src/./common/io.h:30: error: expected ‘;’ before ‘override’
src/learner.cc:484: error: expected ‘;’ before end of line
src/learner.cc:484: error: expected ‘}’ before end of line
In file included from src/learner.cc:17:
src/./common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’:
src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’
src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’
src/learner.cc: At global scope:
src/learner.cc:484: error: expected unqualified-id before end of line
src/learner.cc:484: error: expected ‘}’ before end of line
src/learner.cc:484: error: expected ‘}’ before end of line
src/learner.cc:484: error: expected declaration before end of line
make: *** [build/c_api/c_api.o] Error 1
make: *** [build/learner.o] Error 1

Building multi-thread xgboost failed
Start to build single-thread xgboost
rm -f -rf build build_plugin lib bin ~ /~ //~ ///~ /.o //.o ///*.o xgboost
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d
g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -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++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/c_api/c_api_error.cc -o build/c_api/c_api_error.o
g++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/learner.cc -o build/learner.o
g++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/c_api/c_api.cc -o build/c_api/c_api.o
g++ -c -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/logging.cc -o build/logging.o
In file included from src/c_api/./c_api_error.h:9,
             from src/c_api/c_api_error.cc:6:

dmlc-core/include/dmlc/base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from include/xgboost/data.h:10,
             from src/c_api/c_api.cc:3:

dmlc-core/include/dmlc/base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from dmlc-core/include/dmlc/logging.h:15,
             from include/xgboost/logging.h:11,

             from src/logging.cc:7:

dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from dmlc-core/include/dmlc/logging.h:15,
             from include/xgboost/logging.h:11,

             from src/learner.cc:7:

dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled
In file included from src/c_api/c_api_error.cc:7:
src/c_api/../common/thread_local.h: In static member function ‘static T* xgboost::common::ThreadLocalStore::Get()’:
src/c_api/../common/thread_local.h:44: error: ‘nullptr’ was not declared in this scope
make: *** [build/c_api/c_api_error.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from include/xgboost/./gbm.h:17,
             from include/xgboost/learner.h:16,

             from src/learner.cc:8:

include/xgboost/././data.h: In constructor ‘xgboost::DMatrix::DMatrix()’:
include/xgboost/././data.h:234: error: ‘nullptr’ was not declared in this scope
In file included from src/c_api/c_api.cc:3:
include/xgboost/data.h: In constructor ‘xgboost::DMatrix::DMatrix()’:
include/xgboost/data.h:234: error: ‘nullptr’ was not declared in this scope
In file included from src/learner.cc:17:
src/./common/io.h: At global scope:
src/./common/io.h:30: error: expected ‘;’ before ‘override’
src/learner.cc:484: error: expected ‘;’ before end of line
src/learner.cc:484: error: expected ‘}’ before end of line
In file included from src/learner.cc:17:
src/./common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’:
src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’
src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’
src/learner.cc: At global scope:
src/learner.cc:484: error: expected unqualified-id before end of line
src/learner.cc:484: error: expected ‘}’ before end of line
src/learner.cc:484: error: expected ‘}’ before end of line
src/learner.cc:484: error: expected declaration before end of line
In file included from src/c_api/c_api.cc:15:
src/c_api/../data/simple_csr_source.h: At global scope:
src/c_api/../data/simple_csr_source.h:65: error: expected ‘;’ before ‘override’
src/c_api/../data/simple_csr_source.h:67: error: expected ‘;’ before ‘override’
src/c_api/../data/simple_csr_source.h:69: error: expected ‘;’ before ‘override’
In file included from src/c_api/c_api.cc:16:
src/c_api/../common/thread_local.h: In static member function ‘static T* xgboost::common::ThreadLocalStore::Get()’:
src/c_api/../common/thread_local.h:44: error: ‘nullptr’ was not declared in this scope
In file included from src/c_api/c_api.cc:18:
src/c_api/../common/io.h: At global scope:
src/c_api/../common/io.h:30: error: expected ‘;’ before ‘override’
src/c_api/c_api.cc:267: error: expected ‘;’ before end of line
src/c_api/c_api.cc:267: error: expected ‘}’ before end of line
In file included from src/c_api/c_api.cc:18:
src/c_api/../common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’:
src/c_api/../common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’
src/c_api/../common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’
src/c_api/c_api.cc: At global scope:
src/c_api/c_api.cc:267: error: expected unqualified-id before end of line
src/c_api/c_api.cc:267: error: expected ‘}’ before end of line
src/c_api/c_api.cc:267: error: expected ‘}’ before end of line
src/c_api/c_api.cc:267: error: expected declaration before end of line
make: *** [build/learner.o] Error 1
make: *** [build/c_api/c_api.o] Error 1
Successfully build single-thread xgboost
If you want multi-threaded version
See additional instructions in doc/build.md
Traceback (most recent call last):
File "", line 17, in
File "/tmp/pip_build_root/xgboost/setup.py", line 29, in
LIB_PATH = libpath['find_lib_path']()

File "/tmp/pip_build_root/xgboost/xgboost/libpath.py", line 45, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))

builtin.XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
List of candidates:
/tmp/pip_build_root/xgboost/xgboost/libxgboost.so
/tmp/pip_build_root/xgboost/xgboost/../../lib/libxgboost.so
/tmp/pip_build_root/xgboost/xgboost/./lib/libxgboost.so

Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/xgboost
Traceback (most recent call last):
File "/usr/local/bin/pip2.7", line 9, in
load_entry_point('pip==1.5.4', 'console_scripts', 'pip2.7')()
File "/usr/local/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/init.py", line 185, in main
return command.main(cmd_args)
File "/usr/local/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 66: ordinal not in range(128)
[root@hostname  bdinstalldir]#
Thanks
Krishna

Do we need to upgrade gcc, can we any older version which can run with gcc 4.  Isn't  gcc OS related compiler.
Thanks
Krishna

@kishore432 you can try github install and manually edit the compiler requirement in Makefile

I was pip-installing xgboost 0.6a2 in a CentOS container where make was missing. The installation claimed to be successful, but of course the lib couldn't be loaded. I think it would help if installation problems caused an error at installation time, rather than at runtime.
Excerpts from the verbose pip output:
  Running setup.py (path:/tmp/pip-build-mv_qff2b/xgboost/setup.py) egg_info for package xgboost
    Running command python setup.py egg_info
    ./xgboost/build-python.sh: line 17: make: command not found
    ./xgboost/build-python.sh: line 18: make: command not found
    -----------------------------
    Building multi-thread xgboost failed
    Start to build single-thread xgboost
    ./xgboost/build-python.sh: line 24: make: command not found
    ./xgboost/build-python.sh: line 25: make: command not found
    Successfully build single-thread xgboost

...
Building wheels for collected packages: xgboost
  Running setup.py bdist_wheel for xgboost: started
  Destination directory: /tmp/tmpgcuwvdt8pip-wheel-
  Running command /usr/local/src/conda3_runtime/4.1.1/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mv_qff2b/xgboost/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpgcuwvdt8pip-wheel- --python-tag cp35
  ./xgboost/build-python.sh: line 17: make: command not found
  ./xgboost/build-python.sh: line 18: make: command not found
  -----------------------------
  Building multi-thread xgboost failed
  Start to build single-thread xgboost
  ./xgboost/build-python.sh: line 24: make: command not found
  ./xgboost/build-python.sh: line 25: make: command not found
  Successfully build single-thread xgboost

These error messages when pip-installing in a Python 3 environment are caused by print statements using Python 2 syntax. They don't seem to cause any harm though. In this case, I'm happy that the installation problem doesn't trigger an error at installation time.
Installing collected packages: xgboost
  *** Error compiling '/tmp/pip-build-eoltxht1/xgboost/xgboost/rabit/guide/basic.py'...
    File "/tmp/pip-build-eoltxht1/xgboost/xgboost/rabit/guide/basic.py", line 20
      print '@node[%d] before-allreduce: a=%s' % (rank, str(a))
                                             ^
  SyntaxError: invalid syntax

  *** Error compiling '/tmp/pip-build-eoltxht1/xgboost/xgboost/rabit/guide/broadcast.py'...
    File "/tmp/pip-build-eoltxht1/xgboost/xgboost/rabit/guide/broadcast.py", line 18
      print '@node[%d] before-broadcast: s=\"%s\"' % (rank, str(s))
                                                 ^
  SyntaxError: invalid syntax

  *** Error compiling '/tmp/pip-build-eoltxht1/xgboost/xgboost/rabit/test/local_recover.py'...
    File "/tmp/pip-build-eoltxht1/xgboost/xgboost/rabit/test/local_recover.py", line 16
      print '[%d] restart from version %d' % (rank, version)
                                         ^
  SyntaxError: invalid syntax

Successfully installed xgboost-0.6a2

I found the offending files here: https://github.com/dmlc/rabit/tree/master/guide

brew install gcc-5 solved all problems in MacOS Sierra 10.12.6.


Track migration from zPerms doesn't convert periods from track names like from group names

A user today came in with a track problem after zPerms migration - while groups are converted from rank.rankname.continuation to rank-rankname-continuation the group listings in tracks remain like the first while the the group names get changed, leaving promote commands to see no valid group in the track.

I think this is due to a user configuration error.
Seems like the migration just copies exactly what ZPermissions provides via it's API.


While I update my react app from 0.64.2 to 0.71.3 build failed with the exception app:installDevDebug

New Version
0.71.3
Old Version
0.64.2
Build Target(s)
java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to install on any devices
Output of react-native info
> Task :app:installDevDebug FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
785 actionable tasks: 780 executed, 5 up-to-date
Note: C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\lottie-react-native\src\android\src\main\java\com\airbnb\android\react\lottie\LottieAnimationViewManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\lottie-react-native\src\android\src\main\java\com\airbnb\android\react\lottie\LottieAnimationViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note<EMAIL_ADDRESS>uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note<EMAIL_ADDRESS>uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-code-push\android\app\src\main\java\com\microsoft\codepush\react\CodePushNativeModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\DocumentPickerModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-email-link\android\src\main\java\agency\flexible\react\modules\email\EmailModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-fbsdk-next\android\src\main\java\com\facebook\reactnative\androidsdk\FBProfileModule.java:50: warning: non-varargs call of varargs method with inexact argument type for last parameter;
                callback.invoke(null);
                                ^
  cast to Object for a varargs call
  cast to Object[] for a non-varargs call and to suppress this warning
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-fbsdk-next\android\src\main\java\com\facebook\reactnative\androidsdk\Utility.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
Note<EMAIL_ADDRESS>uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note<EMAIL_ADDRESS>uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note<EMAIL_ADDRESS>uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note<EMAIL_ADDRESS>uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note<EMAIL_ADDRESS>uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note<EMAIL_ADDRESS>uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-orientation\android\src\main\java\com\github\yamill\orientation\OrientationModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-razorpay\android\src\main\java\com\razorpay\rn\RazorpayModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-svg\android\src\main\java\com\horcrux\svg\VirtualView.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-video\android\src\main\java\com\brentvatne\react\ReactVideoViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: C:\Project_Repo\App_Frontend\IndigoLearn\android\app\src\debug\java\com\fin1\ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:installDevDebug'.
> java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to install on any devices.

Issue and Reproduction Steps
my package Json file
{   "name": "Fin1",   "version": "0.0.1",   "private": true,   "scripts": {     "android:dev": "ENVFILE=./env/.env.dev npx react-native run-android --variant=devDebug --appIdSuffix=dev",     "android:prod": "ENVFILE=./env/.env.prod npx react-native run-android --variant=prodDebug",     "android:prodBundle": "cd android && ENVFILE=./env/.env.prod ./gradlew clean && ./gradlew bundleProdRelease",     "android:prodApk": "cd android && ENVFILE=./env/.env.prod ./gradlew clean && ./gradlew assembleProdRelease",     "android:devRelease": "cd android && ENVFILE=./env/.env.dev ./gradlew clean && ./gradlew assembleDevRelease",     "ios:dev": "ENVFILE=./env/.env.dev react-native run-ios --scheme \"Fin1Dev\" --configuration \"Dev.Debug\"",     "codepush:androidDev": "appcenter codepush release-react -a IndigoLearn/1FIN-by-Indigolearn -d Dev -m -t 2.1.2",     "codepush:iosDev": "appcenter codepush release-react -a IndigoLearn/1FIN-by-Indigolearn-1 -d Dev -m -t 2.1.2",     "codepush:iosProd": "appcenter codepush release-react -a IndigoLearn-Prod/1FIN-By-IndigoLearn-1 -d Production -m -t 2.1.2",     "codepush:androidProd": "appcenter codepush release-react -a IndigoLearn-Prod/1FIN-By-IndigoLearn -d Production -m -t 2.1.2",     "start": "react-native start",     "test": "jest",     "lint": "eslint .",     "repo:cleanup": "rm -rf node_modules & rm -rf yarn.lock & yarn install & cd ios & rm -rf Podfile.lock & pod install & cd ..",     "android:winDev": "set \"ENVFILE=./env/.env.dev\" && npx react-native run-android --variant=devDebug --appIdSuffix=dev"   },   "dependencies": {     "@invertase/react-native-apple-authentication": "^2.2.2",     "@native-html/table-plugin": "^5.3.1",     "@react-native-async-storage/async-storage": "^1.17.12",     "@react-native-community/datetimepicker": "^6.7.5",     "@react-native-community/netinfo": "^9.3.7",     "@react-native-firebase/analytics": "^15.7.0",     "@react-native-firebase/app": "^15.7.0",     "@react-native-firebase/crashlytics": "^15.7.0",     "@react-native-firebase/dynamic-links": "^15.7.0",     "@react-native-firebase/messaging": "^15.7.0",     "@react-native-firebase/perf": "^15.7.0",     "@react-native-google-signin/google-signin": "^9.0.2",     "@react-native-masked-view/masked-view": "^0.2.8",     "@react-navigation/drawer": "^6.6.2",     "@react-navigation/native": "^6.1.6",     "@react-navigation/stack": "^6.3.16",     "axios": "^1.3.4",     "lottie-ios": "^4.1.3",     "lottie-react-native": "^5.1.5",     "metro": "^0.75.1",     "react": "18.2.0",     "react-native": "0.71.3",     "react-native-animatable": "^1.3.3",     "react-native-calendars": "^1.1293.0",     "react-native-canvas": "^0.1.38",     "react-native-cashfree-pg-sdk": "^2.0.2",     "react-native-circular-progress": "^1.3.8",     "react-native-code-push": "^7.1.0",     "react-native-config": "^1.5.0",     "react-native-deck-swiper": "^2.0.13",     "react-native-device-info": "^10.4.0",     "react-native-document-picker": "^8.1.3",     "react-native-email-link": "^1.14.3",     "react-native-exception-handler": "^2.10.10",     "react-native-fbsdk-next": "^11.1.0",     "react-native-file-viewer": "^2.1.5",     "react-native-flash-message": "^0.4.0",     "react-native-freshchat-sdk": "^4.2.2",     "react-native-fs": "^2.20.0",     "react-native-gesture-handler": "^2.9.0",     "react-native-gifted-charts": "^1.2.42",     "react-native-hyperlink": "^0.0.22",     "react-native-image-crop-picker": "^0.39.0",     "react-native-image-zoom-viewer": "^3.0.1",     "react-native-in-app-review": "^4.2.1",     "react-native-linear-gradient": "^2.6.2",     "react-native-material-ripple": "^0.9.1",     "react-native-modal": "^13.0.1",     "react-native-modal-datetime-picker": "^14.0.1",     "react-native-multicolor-progress-bar": "^2.0.0",     "react-native-offline": "^6.0.2",     "react-native-orientation": "^3.1.3",     "react-native-paper": "^5.2.0",     "react-native-pg-react-native-sdk": "^2.1.6",     "react-native-play-install-referrer": "^1.1.8",     "react-native-progress": "^5.0.0",     "react-native-razorpay": "^2.3.0",     "react-native-reanimated": "^2.14.4",     "react-native-render-html": "^6.3.4",     "react-native-restart": "^0.0.27",     "react-native-safe-area-context": "^4.5.0",     "react-native-screens": "^3.20.0",     "react-native-share": "^8.2.0",     "react-native-shimmer-placeholder": "^2.0.9",     "react-native-slider": "^0.11.0",     "react-native-sms-retriever": "^1.1.1",     "react-native-splash-screen": "^3.3.0",     "react-native-svg": "^13.8.0",     "react-native-swipe-gestures": "^1.0.5",     "react-native-swipeable-rating": "^0.2.1",     "react-native-swiper-flatlist": "^3.0.18",     "react-native-vector-icons": "^9.2.0",     "react-native-video": "file:../Resources/vdocipher_iOS/react-native-video-fix-fairplay",     "react-native-video-vdo": "file:../Resources/vdocipher_iOS/react-native-video-vdo-master",     "react-native-webview": "^11.26.1",     "react-native-youtube-iframe": "^2.2.2",     "react-navigation-backhandler": "^2.0.1",     "react-redux": "^8.0.5",     "recyclerlistview": "^4.2.0",     "redux": "^4.2.1",     "redux-persist": "^6.0.0",     "redux-thunk": "^2.4.2",     "vdocipher-rn-bridge": "^1.12.2"   },   "devDependencies": {     "@babel/core": "^7.20.12",     "@babel/runtime": "^7.20.13",     "@react-native-community/eslint-config": "^3.2.0",     "babel-jest": "^29.4.3",     "eslint": "^8.34.0",     "jest": "^29.4.3",     "metro-react-native-babel-preset": "^0.75.0",     "react-test-renderer": "18.2.0",     "redux-logger": "^3.0.6"   },   "jest": {     "preset": "react-native"   } }

java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to install on any devices.

Your build failed to install the app on the device.
I can't help you further with more debugging information.
Do you have a device connected? Can you share the output of adb devices?

yes my device connected
List of devices attached c7a98d09        device
but in metro, it gives me one error continuously
`Error: EPERM: operation not permitted, lstat 'C:\Project Repo\App_Frontend\IndigoLearn\android\app\build\intermediates\i ncremental\devDebug\mergeDevDebugResources\merged.dir\values-lv\values-lv.xml' Emitted 'error' event on NodeWatcher instance at:
at C:\Project Repo\App_Frontend\IndigoLearn\node_modules@react-native-community\cli-plugin-metro\node_modules\metro -file-map\src\watchers\NodeMatcher.js:235:14
at FSReqCallback, oncomplete (fs.js:192:21) {
errno: -4848,
code: EPERH
syscall: 'lstat',
path: C:\Project Repo\App Frontend\IndigoLearn\android\app\build\intermediates\incremental\devDebug\mergeDe DebugResources\serged.dir\values-ly\values-lv.xml'`
what does that means I Dont Know.

yes, List of devices attached
c7a98d09        device
it build successfully but sometime metro crash with the exception
`Error: EPERM: operation not permitted, lstat 'C:\Project Repo\App_Frontend\IndigoLearn\android\app\build\intermediates\i ncremental\devDebug\mergeDevDebugResources\merged.dir\values-lv\values-lv.xml' Emitted 'error' event on NodeWatcher instance at:
at C:\Project Repo\App_Frontend\IndigoLearn\node_modules@react-native-community\cli-plugin-metro\node_modules\metro -file-map\src\watchers\NodeMatcher.js:235:14
at FSReqCallback, oncomplete (fs.js:192:21) {
errno: -4848,
code: EPERH
syscall: 'stat',
path: C:\Project Repo\App Frontend\IndigoLearn\android\app\build\intermediates\incremental\devDebug\mergeDe DebugResources\serged.dir\values-ly\values-lv.xml'`
or sometime it build fail with the error
BUILD FAILED in 25s
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.

What went wrong:
Task 'installDebug' not found in project ':app'. Some candidates are: 'installDevDebug'.

Try:

Run gradlew tasks to get a list of available tasks.
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Get more help at https://help.gradle.org

Please let me know how you fixed the first error which said:
java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to install on any devices.


componentWillMount is deprecated in react 16.3

componentWillMount will be deprecated and replaced with UNSAFE_componentWillMount
because it is not safe for async rendering. see https://medium.com/@baphemot/whats-new-in-react-16-3-d2c9b7b6193b

We're aware of a lot of the changes involved, but we'll eventually create an umbrella issue for all the changes that need to be made :wink:
I'll leave this open until then

FWIW, migration strategies are here
https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html
Let us know if some use case is missing.

should I manually be changed all WillMounts etc to DidMount's?

Folding this issue into https://github.com/styled-components/styled-components/issues/1655


feat: Add checks on FillBlock squareSize

Add check on FillBlock -> squareSize arg:

Check squareSize should be > 2
Check squareSize is a pow of 2

Closes #867

Codecov Report

Merging #980 (b7c3d14) into main (29e0a27) will increase coverage by 3.60%.
The diff coverage is 58.33%.

@@            Coverage Diff             @@
##             main     #980      +/-   ##
==========================================
+ Coverage   26.13%   29.73%   +3.60%
==========================================
  Files          77       72       -5
  Lines        9353     8202    -1151
==========================================
- Hits         2444     2439       -5
+ Misses       6680     5533    -1147
- Partials      229      230       +1

Impacted Files
Coverage Δ

app/app.go
6.49% <ø> (ø)

x/payment/types/events.go
0.00% <ø> (ø)

x/qgb/handler.go
0.00% <0.00%> (ø)

x/qgb/module.go
7.27% <ø> (+0.12%)
:arrow_up:

x/qgb/types/codec.go
0.00% <ø> (ø)

x/qgb/types/genesis.pb.go
1.13% <ø> (ø)

x/qgb/types/query.pb.go
0.86% <ø> (ø)

pkg/shares/split_sparse_shares.go
70.00% <25.00%> (+2.03%)
:arrow_up:

testutil/testnode/node_interaction_api.go
60.17% <100.00%> (-1.65%)
:arrow_down:

x/payment/keeper/keeper.go
64.70% <100.00%> (+2.20%)
:arrow_up:

... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


EFCore throws DetachedLazyLoading exception when IQueryable has a static method call

EFCore throws DetachedLazyLoading exception when I try something like below,
var   employeeDtos = (from device in context.Set<EmployeeDevice>()
                                select DtoFactory.CreateEmployeeDto(device)).ToList();

Is this by design? This is a big problem for us as we are trying to migrate an existing code-base with Linq2Sql (this was a common pattern through out that code-base).
Exception message:
System.InvalidOperationException: 'Error generated for warning 'Microsoft.EntityFrameworkCore.Infrastructure.DetachedLazyLoadingWarning: An attempt was made to lazy-load navigation property 'Employee' on detached entity of type 'EmployeeDevice'. Lazy-loading is not supported for detached entities or entities that are loaded with 'AsNoTracking()'.'. This exception can be suppressed or logged by passing event ID 'CoreEventId.DetachedLazyLoadingWarning' to the 'ConfigureWarnings' method in 'DbContext.OnConfiguring' or 'AddDbContext'.'

Stack trace:
   at Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition`2.Log[TLoggerCategory](IDiagnosticsLogger`1 logger, WarningBehavior warningBehavior, TParam1 arg1, TParam2 arg2, Exception exception)
   at Microsoft.EntityFrameworkCore.Internal.CoreLoggerExtensions.DetachedLazyLoadingWarning(IDiagnosticsLogger`1 diagnostics, DbContext context, Object entityType, String navigationName)
   at Microsoft.EntityFrameworkCore.Internal.LazyLoader.ShouldLoad(Object entity, String navigationName, NavigationEntry& navigationEntry)
   at Microsoft.EntityFrameworkCore.Internal.LazyLoader.Load(Object entity, String navigationName)
   at TestHostForCastException.EmployeeDevice.get_Employee() in C:\EFCoreTestBed\DataContext.cs:line 56
   at TestHostForCastException.DtoFactory.CreateEmployeeDto(EmployeeDevice device) in C:\EFCoreTestBed\DtoFactory.cs:line 7
   at lambda_method(Closure , QueryContext , EmployeeDevice )
   at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ProjectionShaper.TypedProjectionShaper`3.Shape(QueryContext queryContext, ValueBuffer& valueBuffer)
   at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ProjectionShaper.TypedProjectionShaper`3.Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IShaper<TOut>.Shape(QueryContext queryContext, ValueBuffer& valueBuffer)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer)
   at Microsoft.EntityFrameworkCore.Storage.Internal.NoopExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()

Steps to reproduce
Repro included at https://github.com/avinash-phaniraj-readify/EFCoreTestBed/tree/DetachedNavProperty
Further technical details
EF Core version: 2.1
Database Provider: EntityFrameworkCore.SqlServerCompact35
Operating system: Windows 10.0.17134
IDE: Visual Studio 2017 15.7.4

Maybe just rephrase to:
var   employeeDtos = (from device in context.Set<EmployeeDevice>().ToList()
                            select DtoFactory.CreateEmployeeDto(device)).ToList();

Thanks @ErikEJ for your response. Yes, indeed we could do that. But our problem is the massive (millions of LOC) legacy code-base which does not have full test coverage. We can try to fix places we know, but there is a good chance of missing many other places.
Is there any possibility that EFCore will support this kind of usage in the future?

@RoshanJeewantha Have you tried disabling the exception as detailed in the message?

@ajcvickers The data needs to be loaded, so suppressing the exception won’t help.
In the query above, is it possible to force device to be tracked somehow? If required, we could do query rewriting to include an additional method (e.g. TrackProjectionInputs()).

You are using a static method DtoFactory.CreateEmployeeDto which is not of type Expression<Func<>> hence it is opaque to query translation pipeline. That requires us to call the client code (your method) with passing in right parameter. Since it is inside client code while executing queries, the navigations won't be populated in it. Only navigations which are visible to EF Core in Expression tree are expanded and filled in appropriately.
You can convert your method to be of type Expression<Func<>> then EF Core can use the method inside ExpressionTree. Or as @ErikEJ posted, you need to call ToList() before writing custom select like that, (which has no perf penalty since we are going to do the same under the hood for opaque methods). And to have navigations populated before calling into your method, you can use Include before calling first ToList.

@smitpatel I appreciate the predicament, but the reality is that LINQ to SQL dealt with this scenario. I acknowledge the workarounds, I'm just wondering if there's a more global way of solving this.
It seems to me that, logically, we're asking for the LazyLoader.ShouldLoad() code to effectively be:
if (!entityIsTracked && !entityIsReferencedInProjection) {
   // add DetachedLazyLoadingWarning
}

How you'd determine entityWasProjected... I don't know. I'd imagine if you don't want to treat the entity as tracked (which is fair enough), that the entity could still be recorded as projected.
I could be totally misunderstanding, but as I said, LINQ to SQL was able to solve this problem (and I get that they're totally different libraries).
Looking forward to hearing your thoughts.

I'm thinking about doing this via expression re-writing. Is there a way of identifying whether a given expression is going to result in client-side execution?

@optiks, @smitpatel and I talked about this and we are not sure there is a way to workaround it by only rewriting the expression.
Given the current behavior, the entity needs to be tracked in order for lazy loading to work, so you need to make sure the entity is returned in the top-most projection that EF Core executes, and the method is invoked after EF Core has finished materialized that row, each of the IEnumerable.MoveNext() methods from EF Core need to return before you can invoke the client method.
That leaves you with something like this:
var employees = from device in context.Set<EmployeeDevice>()
                                select device; // entity needs to be materialized
var employeeDtos = employees.AsEnumerable()
    .Select(device => DtoFactory.CreateEmployeeDto(device)).ToList();

Of course if you know beforehand what navigation properties CreateEmployeeDto is going to dereference, you may choose to use Include() to make sure they are loaded, but that is an orthogonal.
Anyway, I would like to clarify that I agree that some of the design choices we made in the EF Core implementaiton (FWIW, a lot of the complexity derives from the idea that that devices should not be tracked because it isn't in the results of the final projection) make dealing with this particular scenario a bit difficult. We are going to keep this scenario in mind for some thinking we are doing to improve (and hopefully simplify) the design of our LINQ implementation in EF Core 3.0, which we are tracking at https://github.com/aspnet/EntityFrameworkCore/issues/12795.

@divega, just to clarify, the expression re-writing would be to transparently insert the .ToList().AsQueryable().
Where it gets tricky is that some methods are evaluated and then passed into the query as parameters. e.g. .Where(x => x.LastAccessed < DateUtility.Now()). In that case we don’t want to force materialisation, because it’ll result in an inefficient query, which is why I was wondering if there’s a way of checking whether a given expression would result in client-side execution :)

@optiks Besides a few cases explained in https://github.com/aspnet/EntityFrameworkCore/issues/12672, and unless x.SomeDate is a client-only property (e.g. a property that isn't mapped to column in the database) a query like this:
var q = xs.Where(x => x.SomeDate < DateUtility.Now());

Should cause DateUtility.Now() to be evaluated on the client then the value passed to a parameter. I.e. the query should still have a WHERE clause and be efficient.
For the cases in which a filter predicate is really evaluated on the client, EF Core produces client-evaluation warnings. You should definitively check your logs to see if those can occur in cases in which a large number of rows could be returned and filtered on the client. You may even decide to turn those wranings into errors. That is documented at https://docs.microsoft.com/en-us/ef/core/querying/client-eval.
I don't think you need to be concerned as much with that case, because if you are going to try to workaround this you should only be looking at what happens in the top-most Select() anyway.
Besides that, you are not going to be able to resolve this introducing a call to ToList().AsQueryable() in the expression three and then passing that to EF Core's LINQ provider. ToList() in that possition in the expression tree is not supported by EF Core.
Assuming you are already wrapping EF Core's query provider, what you will have to do is is rewrite the query to remove the top Select() from the query expression that you pass to EF Core, then evaluate that projection in memory on your own.

@divega Here's what I was thinking: https://github.com/avinash-phaniraj-readify/EFCoreTestBed/tree/spike/AutomagicMaterialization
Obviously it needs to be generalised, but it appears to work. Can you see foresee any issues with this approach?

@divega When using .ConfigureWarnings(warnings => warnings.Throw(RelationalEventId.QueryClientEvaluationWarning)), it'd be great to be able to not throw for specific usages. Is this possible? Otherwise if client evaluation is required in even one case, throwing will need to be removed.

@optiks I have been also thinking about how to provide more finely-grained control over client evaluation. However my conclusion was that an extension methods that you can include in the query (e.g. just to give you an idea AsServerOnly() or AsEvaluateOn(QueryEvaluationEnum)) would be much more approachable. Thoughts on this?

Here's what I was thinking...

@optiks yes, I think that approach implements the same thing I had in mind. I was misunderstood you when you said you would rewrite the expression tree because I assumed that you would then try to pass it to our query provider, but you are actually evaluating ToList().AsQueryable().Select(...) using LINQ to Objects, and only the rest of the query with our provider.
Keep in mind that when you call expression.Compile().Invoke() this is triggering the evaluation of ToList() and that triggers the evaluation of the EF Core side of the query.

@divega, I've now integrated the spike into our code base, and it's looking good 👍 .

Cool. Also, consider restricting this approach to only the top-most projection. AFAIR, that should be sufficient for LINQ to SQL parity.

@divega, yep, done. I've got some test cases if you're interested.

@optiks I have been thinking a bit more about the workaround and wondering about its performance impact. As usual, measuring is key, avoid premature optimization, etc., but if the impact is significant, and if you are not doing this already, consider that you shouldn't need to apply the workaround to all queries. You can probably add logic to recognize the pattern to decide whether you need it.

Thanks @divega. I've emailed some more context around our specific workaround.

We ended up giving up on this approach, as we lost the EF Core null-coalescing benefits. We've now also increased the scope of our transformation to deal with existing performance issues, which means we now Include() any required navigations up-front.
This is still a design issue though IMO.


Add a license file

I had a quick discussion with Philipp about this for DeepOBS and we decided to go with the MIT License. I saw that for BackPACK you use it as well.
Btw. I also added the MIT License to the Cockpit, but we can change this.


feat: change fallback to sonatype

fixes #16

@all-contributors please add @PierreDemailly for code, doc


HHH-10085 HHH-10143 - Fix issues with Criteria and case expressions

https://hibernate.atlassian.net/browse/HHH-10143
https://hibernate.atlassian.net/browse/HHH-10085

Applied upstream.


SpatialRuleLookup fails for small areas

If the area is rather small like core/files/monaco.osm.gz we get:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
	at com.graphhopper.routing.util.spatialrules.SpatialRuleLookupArray.getRuleContainerIndex(SpatialRuleLookupArray.java:125)
	at com.graphhopper.routing.util.spatialrules.SpatialRuleLookupArray.isBorderTile(SpatialRuleLookupArray.java:135)
	at com.graphhopper.routing.util.spatialrules.SpatialRuleLookupArray.lookupRule(SpatialRuleLookupArray.java:103)

Maybe the loop in isBorderTile should pick the min(2, lookupArray[0].length) somehow?

Ah, or just the equals is missing in getRuleContainerIndex? xIndex >= lookupArray.length

Is this fixed? I tried monaco with the current master and did not receive an exception.

Again my mistake: have accidentally committed this in the landmark change :/
https://github.com/graphhopper/graphhopper/commit/e085c0b3f3b1e8a3b5942d0938218bec40a357f3#diff-b6259a4439e6674e5604699ad102c0de


Can't delete own message

Message toSend = new MessageBuilder().append("aa").build();   channel.sendMessage(toSend).queue();     message.delete().complete();       toSend.delete().queueAfter(5, TimeUnit.SECONDS);
The last line returns a NPE.
at net.dv8tion.jda.core.entities.impl.MessageImpl.delete(MessageImpl.java:471)

Message is being sent. If I try to delete it with TextChannel#deleteMessageById it returns a 400 saying "snowflake should be less than or equal to <a big number starting with 9>"

You can't delete messages from message builder, these messages have no ID assigned and thus cannot be modified or deleted.
You need to use the response message from sendMessage:
channel.sendMessage(toSend).queue( message -> message.delete().queueAfter(5, TimeUnit.SECONDS) );

Oh, yes, I was wondering what the "-1" in MessageBuilder was for.

It does now not works

Go to discord.gg/0hMr4ce0tIl3SLv5 to receive support

maybe you're bot doesn't have permissions for deleting message


Divide two static classes

Remove static worker instances holder.
Remove static worker instance id generator.

Coverage increased (+0.02%) to 13.92% when pulling 6d1a9124071b66485d6bb62d6beb0662a9285c9a on peng-yongsheng:feature/remove_static_instance_holder into 16aca37e70baad8d967c919dab5acc2ae6aca834 on apache:master.


How do add external js libraries?

Hi,
How can I add external js libraries using this helm chart?
Thank you
Dan

Don’t know can you do it with n8n

Don’t know can you do it with n8n

https://community.n8n.io/t/help-not-been-able-to-import-external-modules/686/10
Seems like it's messy...
On Tue, Jan 5, 2021, at 2:11 PM, Vadim Bauer wrote:

Don’t know can you do it with n8n?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/8gears/n8n-helm-chart/issues/2#issuecomment-754839621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD4PP67ZULBD5MUUZ3HGQTSYNP5TANCNFSM4VVKTDSA.

https://community.n8n.io/t/help-not-been-able-to-import-external-modules/686/10
Seems like it's messy...
On Tue, Jan 5, 2021, at 2:11 PM, Vadim Bauer wrote:

Don’t know can you do it with n8n?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/8gears/n8n-helm-chart/issues/2#issuecomment-754839621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD4PP67ZULBD5MUUZ3HGQTSYNP5TANCNFSM4VVKTDSA.

There are a few options:
Side Car Container before n8n start:

Git Checkout
S3 Bucket
Container that contains only the data and copies them on start to runtime.

Traditional Vol:
4. Volume Mount, question is how to get data in there?
Opt. 3 is the easiest and most versatile. git and s3 have the challenge to add credentials and so on.

There are a few options:
Side Car Container before n8n start:

Git Checkout
S3 Bucket
Container that contains only the data and copies them on start to runtime.

Traditional Vol:
4. Volume Mount, question is how to get data in there?
Opt. 3 is the easiest and most versatile. git and s3 have the challenge to add credentials and so on.

@DanTulovsky where you able ro resolve the issue?

Sorry, I have up on n8n (for other reasons), so I didn't try.
On Tue, Mar 23, 2021, at 12:35 PM, Vadim Bauer wrote:

@DanTulovsky https://github.com/DanTulovsky where you able ro resolve the issue?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/8gears/n8n-helm-chart/issues/2#issuecomment-805050859, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD4PP35LH5R7JZFGP5KVQ3TFC7OFANCNFSM4VVKTDSA.

I created a new image, it's literally 2 lines of code.
Just publish it and set it in the config

@Vad1mo Is there any option without building a custom image to install external js library? We would need the exif-js module installed.

Well, it is two line of code (FROM and RUN) but then you have to maintain it to keep it up to date, so not so great.
We could do an upgrade script and a template repo (image builder with up-to-date n8n with custom deps) but it would require some tests and I'm not sure how to approach it in this case.

Thanks! Those were exactly my concerns. If at all possible, I don't want to have to maintain a custom image.
Something like image builder would probably be the most sustainable solution.