-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submodules are not updated when R package is in a different directory to .gitmodules file #233
Comments
I have implemented the trick above but it doesn't work. > remotes::install_github("dmlc/xgboost/R-package")
Downloading GitHub repo dmlc/xgboost@master
'/usr/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules https://github.com/dmlc/dmlc-core /tmp/Rtmp3p3kcp/remotesee15e5dbae6/dmlc-xgboost-9b9e298/R-package/../dmlc-core
Clonage dans '/tmp/Rtmp3p3kcp/remotesee15e5dbae6/dmlc-xgboost-9b9e298/R-package/../dmlc-core'...
'/usr/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules https://github.com/dmlc/rabit /tmp/Rtmp3p3kcp/remotesee15e5dbae6/dmlc-xgboost-9b9e298/R-package/../rabit
Clonage dans '/tmp/Rtmp3p3kcp/remotesee15e5dbae6/dmlc-xgboost-9b9e298/R-package/../rabit'...
'/usr/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules https://github.com/NVlabs/cub /tmp/Rtmp3p3kcp/remotesee15e5dbae6/dmlc-xgboost-9b9e298/R-package/../cub
Clonage dans '/tmp/Rtmp3p3kcp/remotesee15e5dbae6/dmlc-xgboost-9b9e298/R-package/../cub'...
✔ checking for file ‘/tmp/Rtmp3p3kcp/remotesee15e5dbae6/dmlc-xgboost-9b9e298/R-package/DESCRIPTION’ ...
─ preparing ‘xgboost’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ running ‘cleanup’
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘xgboost_1.0.0.1.tar.gz’
Installing package into ‘/home/geantvert/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package ‘xgboost’ ...
configure: creating ./config.status
config.status: creating src/Makevars
** libs
Makevars:17: -DXGBOOST_STRICT_R_MODE=1
Makevars:17: -DDMLC_LOG_BEFORE_THROW=0
Makevars:17: -DDMLC_ENABLE_STD_THREAD=1
Makevars:17: -DDMLC_DISABLE_STDIN=1
Makevars:17: -DDMLC_LOG_CUSTOMIZE=1
Makevars:17: -DXGBOOST_CUSTOMIZE_LOGGER=1
Makevars:17: -DRABIT_CUSTOMIZE_MSG_
Makevars:17: -DRABIT_STRICT_CXX98_
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I../..//include -I../..//dmlc-core/include -I../..//rabit/include -I../../ -DXGBOOST_STRICT_R_MODE=1 -DDMLC_LOG_BEFORE_THROW=0 -DDMLC_ENABLE_STD_THREAD=1 -DDMLC_DISABLE_STDIN=1 -DDMLC_LOG_CUSTOMIZE=1 -DXGBOOST_CUSTOMIZE_LOGGER=1 -DRABIT_CUSTOMIZE_MSG_ -DRABIT_STRICT_CXX98_ -fopenmp -pthread -fpic -g -O2 -fdebug-prefix-map=/build/r-base-el7SHG/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c xgboost_R.cc -o xgboost_R.o
xgboost_R.cc:2:10: fatal error: dmlc/logging.h: Aucun fichier ou dossier de ce type
#include <dmlc/logging.h>
^~~~~~~~~~~~~~~~
compilation terminated.
make: *** [/usr/lib/R/etc/Makeconf:169: xgboost_R.o] Error 1
ERROR: compilation failed for package ‘xgboost’
* removing ‘/home/geantvert/R/x86_64-pc-linux-gnu-library/3.5/xgboost’
* restoring previous ‘/home/geantvert/R/x86_64-pc-linux-gnu-library/3.5/xgboost’
Erreur : Failed to install 'xgboost' from GitHub:
(converti depuis l'avis) installation of package ‘/tmp/Rtmp3p3kcp/fileee13629f27d/xgboost_1.0.0.1.tar.gz’ had non-zero exit status |
This was referenced Jul 26, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The xgboost example from the README fails because the submodules are not updated.
The .gitmodules file is not being found because it lives in the parent directory of the "R-package" subdirectory.
In this situation (for xgboost) the .gitmodules file is in the
bundle
directory and this:remotes/R/install-remote.R
Lines 52 to 55 in 0ae9774
needs to be
My hacky fix was to look for the .gitmodules in the parent directory of
source
if not found.source
is also modified so the modules are updated in the correct directory.remotes/R/submodule.R
Lines 88 to 91 in 97bbf81
becomes:
Then this works:
Session Info
The text was updated successfully, but these errors were encountered: