I tried to install XGBoost with GPU support in R on Windows 7. I followed the installation guide here (http://xgboost.readthedocs.io/en/latest/build.html#installing-r-package-with-gpu-support) and was all fine until the last step. I have spent past few days on searching and could not find solutions. Can somebody please help me?
This was the procedure I followed, in Git Bash:
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git submodule init
git submodule update
mkdir build
cd build
cmake .. -G"Visual Studio 14 2015 Win64" -DUSE_CUDA=ON -DR_LIB=ON -DLIBR_EXECUTABLE="C:/Program Files/R/R-3.4.1/bin/x64/R.exe"
cmake --build . --target install --config Release
Got below errors at the last step
"C:\Users\geng\xgboost\build\install.vcxproj" (default target) (1) ->
(PostBuildEvent target) ->
EXEC : warning : running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-
34~1.2/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-34~1.2/share/make/winshlib.mk" SHL
IB="xgboost.dll" WIN=64 TCLBIN=64 OBJECTS=""' had status 127 [C:\Users\geng\xgb
oost\build\install.vcxproj]
"C:\Users\geng\xgboost\build\install.vcxproj" (default target) (1) ->
(PostBuildEvent target) ->
EXEC : error : compilation failed for package 'xgboost' [C:\Users\geng\xgboos
t\build\install.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.ta
rgets(133,5): error MSB3073: The command "setlocal\r [C:\Users\geng\xgboost\bui
ld\install.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targ
ets(133,5): error MSB3073: "C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=
Release -P cmake_install.cmake\r [C:\Users\geng\xgboost\build\install.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targ
ets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd\r [C:\Users\geng\x
gboost\build\install.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targ
ets(133,5): error MSB3073: :cmEnd\r [C:\Users\geng\xgboost\build\install.vcxpro
j]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targ
ets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :c
mDone\r [C:\Users\geng\xgboost\build\install.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targ
ets(133,5): error MSB3073: :cmErrorLevel\r [C:\Users\geng\xgboost\build\install
.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targ
ets(133,5): error MSB3073: exit /b %1\r [C:\Users\geng\xgboost\build\install.vc
xproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targ
ets(133,5): error MSB3073: :cmDone\r [C:\Users\geng\xgboost\build\install.vcxpr
oj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targ
ets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd\r [C:\Users\geng\x
gboost\build\install.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targ
ets(133,5): error MSB3073: :VCEnd" exited with code -1. [C:\Users\geng\xgboost\
build\install.vcxproj]
166 Warning(s)
2 Error(s)
If I executed this instead (cmake --build . --target xgboost --config Release), there was no error. However, I have no clue what I should do from here. If I simply do something like this:
cd R-package
"C:/Program Files/R/R-3.4.2/bin/R.exe" CMD INSTALL .
It ended with a different error like below. I do not know what I did wrong, would really appreciate your help. Thank you very much in advance!
geng#g20user MINGW64 ~/xgboost/build/R-package (master)
$ "C:/Program Files/R/R-3.4.2/bin/R.exe" CMD INSTALL .
* installing to library 'C:/Users/geng/Documents/R/win-library/3.4'
* installing *source* package 'xgboost' ...
** libs
*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-34~1.2/etc/
i386/Makeconf" -f "C:/PROGRA~1/R/R-34~1.2/share/make/winshlib.mk" SHLIB="xgboost
.dll" OBJECTS=""' had status 127
ERROR: compilation failed for package 'xgboost'
* removing 'C:/Users/geng/Documents/R/win-library/3.4/xgboost'
Never mind, I found out the reason. It was related to my Rtools setup. I reinstalled it and make sure the PATH has following two items, then problem solved.
c:\Rtools\bin;c:\Rtools\mingw_64\bin
Related
Running a pihole on a currently unsupported OS (Raspian 9). I attempted to run a distro upgrade:
apt dist-upgrade -y
However it told me there was an issue with two dependencies:
The following packages have unmet dependencies:
libfreetype6-dev : Depends: libfreetype6 (= 2.6.3-3.2+deb9u2) but 2.6.3-3.2+deb9u1 is installed
sqlite3 : Depends: libsqlite3-0 (= 3.16.2-5+deb9u3) but 3.16.2-5+deb9u1 is installed
I tried running the recommended fix:
'apt --fix-broken install'
Resulting in:
dpkg-deb (subprocess): decompressing archive member: internal gzip read error: '<fd:4>:
invalid distance too far back'
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: error: subprocess tar returned error exit status 2
Traceback (most recent call last):
File "/usr/share/apt-listchanges/DebianFiles.py", line 124, in readdeb
output = subprocess.check_output(command)
File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 398, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['dpkg-deb', '-f',
'/var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb', 'Package', 'Source',
'Version', 'Architecture', 'Status']' returned non-zero exit status 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/apt-listchanges", line 243, in <module>
main(config)
File "/usr/bin/apt-listchanges", line 101, in main
pkg = DebianFiles.Package(deb)
File "/usr/share/apt-listchanges/DebianFiles.py", line 215, in __init__
parser.readdeb(self.path)
File "/usr/share/apt-listchanges/DebianFiles.py", line 128, in readdeb
{'what': file, 'errmsg': str(ex)}) from ex
NameError: name 'file' is not defined
E: Invalid archive member header
E: Prior errors apply to /var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb
debconf: apt-extracttemplates failed: No such file or directory
dpkg: warning: files list file for package 'libsqlite3-0:armhf' missing; assuming package
has no files currently installed
(Reading database ... 134985 files and directories currently installed.)
Preparing to unpack .../libfreetype6_2.6.3-3.2+deb9u2_armhf.deb ...
Unpacking libfreetype6:armhf (2.6.3-3.2+deb9u2) over (2.6.3-3.2+deb9u1) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/libfreetype6_2.6.3-
3.2+deb9u2_armhf.deb (--unpack):
cannot copy extracted data for './usr/lib/arm-linux-gnueabihf/libfreetype.so.6.12.3' to
'/usr/lib/arm-linux-gnueabihf/libfreetype.so.6.12.3.dpkg-new': unexpected end of file or stream
dpkg-deb (subprocess): decompressing archive member: internal gzip read error: '<fd:4>: invalid distance too far back'
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: error: subprocess tar returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb (--unpack):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/libfreetype6_2.6.3-3.2+deb9u2_armhf.deb
/var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I attempted the following:
Reconfigure dpkg database
sudo dpkg --configure -a
Force install the software
sudo apt-get install -f
Remove software package
sudo apt-get remove --purge package_name
Remove and overwrite
sudo ls -l /var/lib/dpkg/info | grep -i package_name
sudo mv /var/lib/dpkg/info/package_name.* /tmp
sudo apt-get update
sudo dpkg -i --force-overwrite /var/cache/apt/archives/full_name_of_package
None of this worked.
I tried just manually updating the packages and received dependency errors - the issue is trying to update one results in a dependency error for the other and vice versa:
sqlite3 : Depends: libsqlite3-0 (= 3.16.2-5+deb9u3) but 3.16.2-5+deb9u1 is to b e installed
libfreetype6-dev : Depends: libfreetype6 (= 2.6.3-3.2+deb9u2) but 2.6.3-3.2+deb 9u1 is to be installed
Any idea how to update these two packages when I they apparently require the other one to be updated to update themselves?
Thanks!
I have been trying to install openpose on google colab using the following script.
import os
from os.path import exists, join, basename, splitext
git_repo_url = 'https://github.com/CMU-Perceptual-Computing-Lab/openpose.git'
project_name = splitext(basename(git_repo_url))[0]
if not exists(project_name):
# see: https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/949
# install new CMake becaue of CUDA10
!wget -q https://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.tar.gz
!tar xfz cmake-3.13.0-Linux-x86_64.tar.gz --strip-components=1 -C /usr/local
# clone openpose
!git clone -q --depth 1 $git_repo_url
!sed -i 's/execute_process(COMMAND git checkout master WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}\/3rdparty\/caffe)/execute_process(COMMAND git checkout f019d0dfe86f49d1140961f8c7dec22130c83154 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}\/3rdparty\/caffe)/g' openpose/CMakeLists.txt
# install system dependencies
!apt-get -qq install -y libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler libgflags-dev libgoogle-glog-dev liblmdb-dev opencl-headers ocl-icd-opencl-dev libviennacl-dev
# install python dependencies
!pip install -q youtube-dl
# build openpose
!cd openpose && rm -rf build || true && mkdir build && cd build && cmake .. && make -j`nproc`
Here is a link to that colab notebook Link to colab notebook . Worked fine there. However, when I try the same script on my own colab notebook I get the following error.
[ 82%] Building CXX object src/caffe/CMakeFiles/caffe.dir/util/io.cpp.o
[ 82%] Building CXX object src/caffe/CMakeFiles/caffe.dir/util/math_functions.cpp.o
[ 83%] Building CXX object src/caffe/CMakeFiles/caffe.dir/util/signal_handler.cpp.o
[ 83%] Building CXX object src/caffe/CMakeFiles/caffe.dir/util/upgrade_proto.cpp.o
[ 84%] Linking CXX shared library ../../lib/libcaffe.so
CMake Error: failed to create symbolic link '../../lib/libcaffe.so': operation not supported on socket
CMake Error: cmake_symlink_library: System Error: Operation not supported
src/caffe/CMakeFiles/caffe.dir/build.make:2215: recipe for target 'lib/libcaffe.so.1.0.0' failed
make[5]: *** [lib/libcaffe.so.1.0.0] Error 1
make[5]: *** Deleting file 'lib/libcaffe.so.1.0.0'
CMakeFiles/Makefile2:240: recipe for target 'src/caffe/CMakeFiles/caffe.dir/all' failed
make[4]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/openpose_lib.dir/build.make:110: recipe for target 'caffe/src/openpose_lib-stamp/openpose_lib-build' failed
make[2]: *** [caffe/src/openpose_lib-stamp/openpose_lib-build] Error 2
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/openpose_lib.dir/all' failed
make[1]: *** [CMakeFiles/openpose_lib.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Don't know why I get this error.
CMake Error: failed to create symbolic link '../../lib/libcaffe.so': operation not supported on socket
Any help would be appreciated. Thanks in advance.
There is probably some version issue of cmake, CUDA and cuDNN. Check for compatibility.
I'm having trouble getting a package that I have written to install (on a Windows 10 machine).
I'm running R CMD build packagename (no errors), then R CMD check packagename_0.1.0.tar.gz (or R CMD INSTALL packagename)
After a number of successful log entries, the output reads
* checking whether package 'packagename' can be installed ...Warning: running command '"C:/PROGRA~1/R/R-3.4.0/bin/x64/Rcmd.exe" INSTALL -l
"C:/Work/parsimony_inapp/packagename.Rcheck" --no-html
"C:\Work\PARSIM~1\packagename.Rcheck\00_pkg_src\packagename"' had status 1
ERROR
Installation failed.
00install.out reports the error:
C:/MinGW/bin/gcc -shared -s -static-libgcc -o packagename.dll tmp.def fitch.o reorder.o -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-
4.9.3/local330/lib -LC:/PROGRA~1/R/R-3.4.0/bin/x64 -lR
C:/PROGRA~1/R/R-3.4.0/bin/x64/R.dll: file not recognized: File format not
recognized
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'packagename'
Oddly, I can install the package from GitHub using devtools::github_install('path/to/package').
Advice I've found elsewhere doesn't help:
setwd() in Rprofile - not present
Set R_WIN_NO_JUNCTIONS - no effect
I've updated to the latest version of R (3.4.0), RTools (34) and Cygwin, and checked that my PATH environment variable contains (in order) C:\Rtools\bin; C:\Rtools\mingw_32\bin; C:\Program Files\R\R-3.4.0\bin; C:\Program Files\R\R-3.4.0\bin\x64.
I've tried including and excluding C:\cygwin64\bin and C:\MinGW\msys\1.0\bin from the path, and have tried installations of Rtools with and without the Cygwin dlls, and have tried uninstalling Cygwin completely.
I'm trying to use the qmlrs Rust bindings to Qt, but I cannot compile. I've installed all dependencies.
Rust 1.9.0
Cargo 0.10.0-nightly (10ddd7d 2016-04-08)
Cargo build log:
error: failed to run custom build command for `qmlrs v0.1.1`
Process didn't exit successfully: `/home/pedro/Documents/repositories
/rust-sample/target/debug/build/qmlrs-e7d90e9b9c603e6f/build-script-
build` (exit code: 101)
--- stdout
cargo:rustc-link-lib=static=qmlrswrapper
cargo:rustc-link-lib=dylib=stdc++
cargo:rustc-link-search=native=/home/pedro/.cargo/registry/src/github.com-
88ac128001ac3a9a/qmlrs-0.1.1/ext/libqmlrswrapper/build
--- stderr
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value:
"`\"pkg-config\" \"--libs\" \"--cflags\" \"Qt5Core Qt5Gui Qt5Qml
Qt5Quick\"` did not exit successfully: exit code: 1\n--- stdout\nPackage
Qt5Qml was not found in the pkg-config search path.\nPerhaps you should
add the directory containing `Qt5Qml.pc\'\nto the PKG_CONFIG_PATH
environment variable\nNo package \'Qt5Qml\' found\nPackage Qt5Quick was
not found in the pkg-config search path.\nPerhaps you should add the
directory containing `Qt5Quick.pc\'\nto the PKG_CONFIG_PATH environment
variable\nNo package \'Qt5Quick\' found\n"', ../src/libcore/result.rs:746
note: Run with `RUST_BACKTRACE=1` for a backtrace.
You should install a Qt's -dev package that provides the file. Here's a hint how you can find relevant package using apt-file (in case you are using Debian-derived distribution).
In your case the error message says
Perhaps you should add the directory containing Qt5Qml.pc, so:
$ sudo apt install apt-file && sudo apt update
$ apt-file search Qt5Qml.pc
>>> qtdeclarative5-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/Qt5Qml.pc
$ sudo apt install qtdeclarative5-dev
I try to install SimpleDB::Class from cpan as sudo cpan SimpleDB::Class. it needs a dependency Memcached::libmemcached. so i try to install it, but it have the following errors.
CCLD clients/memstat
CC tests/atomsmasher.o
CCLD tests/atomsmasher
CXX tests/tests_hashplus-hash_plus.o
./config/depcomp: line 611: exec: g++: not found
make[2]: *** [tests/tests_hashplus-hash_plus.o] Error 127
make[2]: Leaving directory `/home/vanitha/.cpan/build/Memcached-libmemcached-0.4406- Oq4Z_m/src/libmemcached'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/vanitha/.cpan/build/Memcached-libmemcached-0.4406- Oq4Z_m/src/libmemcached'
make: *** [install] Error 2
Unable to build libmemcached: Error running cd src/libmemcached && make install
Aborted.
No 'Makefile' created TIMB/Memcached-libmemcached-0.4406.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
could not read metadata file. Falling back to other methods to determine prerequisites
exec: g++: not found - this is the error
Try this first of all: sudo apt-get install g++