Skip to content
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

Windows: Compiler issue while installing in R ; Errors in 'ymake_conf.py' #30

Closed
Mrugankakarte opened this issue Jul 19, 2017 · 8 comments
Labels

Comments

@Mrugankakarte
Copy link

Windows 10 Home Single Language
R-version: 3.4.1 -- 'Single Candle'
Platform: x86_64-w64-mingw32/x64 (64-bit)
Python: 3.5.2
Visual Studio 2017 Community Edition

> devtools::install()
Installing catboost
"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD  \
  INSTALL "C:/Users/Mrugank/catboost/catboost/R-package"  \
  --library="C:/Users/Mrugank/Documents/R/win-library/3.4" --install-tests 

* installing *source* package 'catboost' ...
** libs
  running 'src/Makefile.win' ...
/cygdrive/c/Users/Mrugank/catboost/catboost/R-package/src/../../../ya.bat make -r -o ../../..
2017-07-19T15:39:16.270000 [MainThread] Info: Attention! Using system user-defined compiler: cl.exe (check CC and CXX env vars).

Config was not generated due to errors in C:\Users\Mrugank\catboost\build\ymake_conf.py
ERROR:root:In toolchain theyknow, detected system cl compiler from VS version 15.0
Traceback (most recent call last):
  File "C:\Users\Mrugank\catboost\build\ymake_conf.py", line 2290, in <module>
    main()
  File "C:\Users\Mrugank\catboost\build\ymake_conf.py", line 2277, in main
    tc_params["platform"]["target"]["arch"])
  File "C:\Users\Mrugank\catboost\build\ymake_conf.py", line 757, in print_full_build_type
    tc = Toolchain(toolchain_name)
  File "C:\Users\Mrugank\catboost\build\ymake_conf.py", line 660, in __init__
    self.toolchain_by_cxx_compiler_file_name()
  File "C:\Users\Mrugank\catboost\build\ymake_conf.py", line 698, in toolchain_by_cxx_compiler_file_name
    cxx_info[3](self)
  File "C:\Users\Mrugank\catboost\build\ymake_conf.py", line 706, in detect_msvc_
    detect_msvc(self)
  File "C:\Users\Mrugank\catboost\build\ymake_conf.py", line 1590, in detect_msvc
    vc_key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\Vc7")
WindowsError: [Error 2] The system cannot find the file specified

make: *** [libcatboostr.dll] Error 1
Warning: running command 'make --no-print-directory -f "Makefile.win"' had status 2
ERROR: compilation failed for package 'catboost'
* removing 'C:/Users/Mrugank/Documents/R/win-library/3.4/catboost'
Error: Command failed (1)

If I build and then install, I get following error

> devtools::build()
"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD  \
  build "C:\Users\Mrugank\catboost\catboost\R-package" --no-resave-data --no-manual 

* checking for file 'C:\Users\Mrugank\catboost\catboost\R-package/DESCRIPTION' ... OK
* preparing 'catboost':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'catboost_0.1.1.2.tar.gz'

[1] "C:/Users/Mrugank/catboost/catboost/catboost_0.1.1.2.tar.gz"
> setwd("C:/Users/Mrugank/catboost/catboost")
> install.packages("catboost_0.1.1.2.tar.gz")
Warning in install.packages :
  cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES.rds': HTTP status was '404 Not Found'
Installing package into ‘C:/Users/Mrugank/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘catboost_0.1.1.2.tar.gz’ is not available (for R version 3.4.1)
@Mrugankakarte Mrugankakarte changed the title Windows: Compiler issue while installing in R Windows: Compiler issue while installing in R ; Errors in 'ymake_conf.py' Jul 19, 2017
@ferrr
Copy link

ferrr commented Jul 19, 2017

You also need Visual C++ 2015 Build Tools. Our integration with R on Windows is kinda fragile, but it works. We are investigating alternatives to improve this. For now, R binding installation is much more stable on Darwin and Linux.

@Mrugankakarte
Copy link
Author

Mrugankakarte commented Jul 19, 2017

@ferrr Thanks a lot..Its working now.
Got something in between..you might want to take a look at it.

------- [CC] $(S)\catboost\libs\data\load_data.cpp
c:\users\mrugank\catboost\catboost\libs\data\load_data.cpp(114): warning C4265: 'TPoolBuilder': class has virtual functions, but destructor is not virtual

         instances of this class may not be destructed correctly
|84.6%| [CC] $(S)\catboost\libs\algo\metric.cpp
|84.9%| [LD] $(B)\contrib\tools\protoc\protoc.{exe, pdb}
...

@grayskripko
Copy link
Contributor

grayskripko commented Jul 19, 2017

I installed both 2015 and 2017 (for Windows 10).
2015 components: Desktop development with C++, Visual Studio extension development.
2017 components: Windows 10 SDK as a part of Visual C++ build tools.
I'm sure some components are redundant but it has worked

@jurbanhost
Copy link

jurbanhost commented Jul 20, 2017

Visual C++ 2017 Build Tools only worked for me, not 2015

Please tell me which component should be installed from Visual C++ 2017 Build Tools ? I have VS 2017 Community Edition with installed VC 2017 tools for build classic C++ applications - but problem still there.

@Mrugankakarte
Copy link
Author

Just go to the link provided by ferr at top. Install from there....its about 4GB ....I did same and my problem was solved

@grayskripko
Copy link
Contributor

image

@jurbanhost
Copy link

jurbanhost commented Jul 20, 2017

thanks, grayskripko! I installed them, and got this:

/cygdrive/c/Users/xxx/AppData/Local/Temp/RtmpMJgk0D/devtools3b0838d8799f/catboost-catboost-39fb9df/catboost/R-package/src/../../../ya.bat make -r -o ../../..
2017-07-20T17:29:07.315000 [MainThread] Info: Attention! Using system user-defined compiler: cl.exe (check CC and CXX env vars).

Config was not generated due to errors in C:\Users\xxx\AppData\Local\Temp\RtmpMJgk0D\devtools3b0838d8799f\catboost-catboost-39fb9df\build\ymake_conf.py
ERROR:root:In toolchain theyknow, detected system cl compiler from VS version 15.0
ERROR:root:Could not find VC shared version 14.0 for C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\cl.exe

@jurbanhost
Copy link

@grayskripko thanks a lot, successfull, Visual C++ 2015 Build Tools working for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants