{
  "id": 22662,
  "title": "xgboost and Windows 10",
  "url": "/competitions/grupo-bimbo-inventory-demand/discussion/22662",
  "author_name": "",
  "post_date": "2016-08-03T08:10:36.977Z",
  "votes": null,
  "comment_count": 13,
  "views": 1143,
  "content": "<p>Has anyone been able to install xgboost on Windows <strong>recently</strong> (like this last month) ? </p>\n\n<p>I've been trying for the better part of 2 days now, following pretty much every set of instructions I could find on the web (including Kaggle forums). In the end, I feel like the current xgboost Windows installation procedure may be broken, but the fact that no one is talking about it in here makes me feel the problem might still be on my end.</p>\n\n<p>Without xgboost I feel like I can't compete on equal footing with everybody else, it kinda kills the motivation.</p>",
  "messages": [
    {
      "id": "129989",
      "postDate": "08/03/2016 08:10:36",
      "content": "<p>Has anyone been able to install xgboost on Windows <strong>recently</strong> (like this last month) ? </p>\n\n<p>I've been trying for the better part of 2 days now, following pretty much every set of instructions I could find on the web (including Kaggle forums). In the end, I feel like the current xgboost Windows installation procedure may be broken, but the fact that no one is talking about it in here makes me feel the problem might still be on my end.</p>\n\n<p>Without xgboost I feel like I can't compete on equal footing with everybody else, it kinda kills the motivation.</p>",
      "rawMarkdown": "Has anyone been able to install xgboost on Windows **recently** (like this last month) ? \r\n\r\nI've been trying for the better part of 2 days now, following pretty much every set of instructions I could find on the web (including Kaggle forums). In the end, I feel like the current xgboost Windows installation procedure may be broken, but the fact that no one is talking about it in here makes me feel the problem might still be on my end.\r\n\r\nWithout xgboost I feel like I can't compete on equal footing with everybody else, it kinda kills the motivation.",
      "votes": null
    },
    {
      "id": "130004",
      "postDate": "08/03/2016 10:08:58",
      "content": "<p>If you are using R, use the following:</p>\n\n<pre><code>install.packages(&quot;drat&quot;, repos=&quot;https://cran.rstudio.com&quot;)\ndrat:::addRepo(&quot;dmlc&quot;)\ninstall.packages(&quot;xgboost&quot;, repos=&quot;http://dmlc.ml/drat/&quot;, type=&quot;source&quot;)\n</code></pre>\n\n<p>Windows installation is slightly broken, although it is (really) compilable locally if you are using the right set of tools.</p>\n\n<p>Those are instructions for compiling xgboost in Windows, but if they are not working tell me so I can push an update accordingly as I didn't check whether the most recent versions have an issue: <a href=\"https://github.com/dmlc/xgboost/tree/master/R-package\">https://github.com/dmlc/xgboost/tree/master/R-package</a> (you can also raise an issue in xgboost's GitHub)</p>\n\n<p>If both drat and local compilation fails, you are left using premade packages: CRAN's xgboost and pip's xgboost (which have less functionalities but are guaranteed to work). On Windows, this is guaranteed to work 100% if you didn't make any bad changes to your Windows installation.</p>",
      "rawMarkdown": "If you are using R, use the following:\r\n\r\n    install.packages(\"drat\", repos=\"https://cran.rstudio.com\")\r\n    drat:::addRepo(\"dmlc\")\r\n    install.packages(\"xgboost\", repos=\"http://dmlc.ml/drat/\", type=\"source\")\r\n\r\nWindows installation is slightly broken, although it is (really) compilable locally if you are using the right set of tools.\r\n\r\nThose are instructions for compiling xgboost in Windows, but if they are not working tell me so I can push an update accordingly as I didn't check whether the most recent versions have an issue: https://github.com/dmlc/xgboost/tree/master/R-package (you can also raise an issue in xgboost's GitHub)\r\n\r\nIf both drat and local compilation fails, you are left using premade packages: CRAN's xgboost and pip's xgboost (which have less functionalities but are guaranteed to work). On Windows, this is guaranteed to work 100% if you didn't make any bad changes to your Windows installation.",
      "votes": null
    },
    {
      "id": "130007",
      "postDate": "08/03/2016 10:14:51",
      "content": "<p>I was struggling with installing xgboost in my windows system as well before I found the below link</p>\n\n<p><a href=\"https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en\">https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en</a></p>\n\n<p>The instructions are specific to the python installation Anaconda.</p>",
      "rawMarkdown": "I was struggling with installing xgboost in my windows system as well before I found the below link\r\n\r\nhttps://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en\r\n\r\nThe instructions are specific to the python installation Anaconda.",
      "votes": null
    },
    {
      "id": "130026",
      "postDate": "08/03/2016 12:39:47",
      "content": "<p>[quote=Laurae;130004]\nWindows installation is slightly broken, although it is (really) compilable locally if you are using the right set of tools.</p>\n\n<p>Those are instructions for compiling xgboost in Windows, but if they are not working tell me so I can push an update accordingly as I didn't check whether the most recent versions have an issue\n[/quote]</p>\n\n<p>First of all, thanks for the quick answer. Using R the way you suggested, I still get the same errors, which are :</p>\n\n<p>--</p>\n\n<blockquote>\n  <p>c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:396:83:\n  error: 'FILE* std::fopen(const char*, const char*)' should have been\n  declared inside 'std'</p>\n  \n  <p>c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:396:83:\n  error: declaration of 'FILE* std::fopen(const char*, const char*)'</p>\n  \n  <p>c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:395:17:\n  error: conflicts with previous declaration 'FILE* fopen(const char*,\n  const char*)'</p>\n  \n  <p>make: <em>*</em> [amalgamation/xgboost-all0.o] Error 1</p>\n  \n  <p>Warning: l'ex&#233;cution de la commande 'make -f &quot;Makevars.win&quot; -f\n  &quot;C:/PROGRA~1/R/R-32~1.4/etc/x64/Makeconf&quot; -f\n  &quot;C:/PROGRA~1/R/R-32~1.4/share/make/winshlib.mk&quot; CXX='$(CXX1X)\n&gt; $(CXX1XSTD)' CXXFLAGS='$(CXX1XFLAGS)' CXXPICFLAGS='$(CXX1XPICFLAGS)'\n  SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)' SHLIB_LD='$(SHLIB_CXX1XLD)'\n  SHLIB=&quot;xgboost.dll&quot; WIN=64 TCLBIN=64 ' renvoie un statut 2</p>\n  \n  <p>ERROR: compilation failed for package 'xgboost'</p>\n  \n  <ul>\n  <li>removing 'C:/Program Files/R/R-3.2.4/library/xgboost'</li>\n  </ul>\n  \n  <p>Warning in install.packages :</p>\n  \n  <p>running command '&quot;C:/PROGRA~1/R/R-32~1.4/bin/x64/R&quot; CMD INSTALL -l\n  &quot;C:\\Program Files\\R\\R-3.2.4\\library&quot;\n  C:\\Users\\Julien\\AppData\\Local\\Temp\\RtmpUHxmwL/downloaded_packages/xgboost_0.4-4.tar.gz'\n  had status 1</p>\n  \n  <p>Warning in install.packages :</p>\n  \n  <p>installation of package &#8216;xgboost&#8217; had non-zero exit status</p>\n</blockquote>\n\n<p>--</p>\n\n<p>I'm notifying it to you as you suggested. Now I'm going to check those premade packages, crossing fingers...</p>\n\n<p>[quote=Anupam Shrivastava;130007]</p>\n\n<p>I was struggling with installing xgboost in my windows system as well before I found the below link</p>\n\n<p><a href=\"https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en\">https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en</a></p>\n\n<p>The instructions are specific to the python installation Anaconda.</p>\n\n<p>[/quote]</p>\n\n<p>Thank you, unfortunately I already tried this one, I believe it worked at that moment in time, but not anymore (it seems).</p>",
      "rawMarkdown": "[quote=Laurae;130004]\r\nWindows installation is slightly broken, although it is (really) compilable locally if you are using the right set of tools.\r\n\r\nThose are instructions for compiling xgboost in Windows, but if they are not working tell me so I can push an update accordingly as I didn't check whether the most recent versions have an issue\r\n[/quote]\r\n\r\nFirst of all, thanks for the quick answer. Using R the way you suggested, I still get the same errors, which are :\r\n\r\n--\r\n\r\n> c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:396:83:\r\n> error: 'FILE* std::fopen(const char*, const char*)' should have been\r\n> declared inside 'std'\r\n> \r\n> c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:396:83:\r\n> error: declaration of 'FILE* std::fopen(const char*, const char*)'\r\n> \r\n> c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:395:17:\r\n> error: conflicts with previous declaration 'FILE* fopen(const char*,\r\n> const char*)'\r\n> \r\n> make: *** [amalgamation/xgboost-all0.o] Error 1\r\n> \r\n> Warning: l'exécution de la commande 'make -f \"Makevars.win\" -f\r\n> \"C:/PROGRA~1/R/R-32~1.4/etc/x64/Makeconf\" -f\r\n> \"C:/PROGRA~1/R/R-32~1.4/share/make/winshlib.mk\" CXX='$(CXX1X)\r\n> $(CXX1XSTD)' CXXFLAGS='$(CXX1XFLAGS)' CXXPICFLAGS='$(CXX1XPICFLAGS)'\r\n> SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)' SHLIB_LD='$(SHLIB_CXX1XLD)'\r\n> SHLIB=\"xgboost.dll\" WIN=64 TCLBIN=64 ' renvoie un statut 2\r\n> \r\n> ERROR: compilation failed for package 'xgboost'\r\n> \r\n> * removing 'C:/Program Files/R/R-3.2.4/library/xgboost'\r\n> \r\n> Warning in install.packages :\r\n> \r\n>   running command '\"C:/PROGRA~1/R/R-32~1.4/bin/x64/R\" CMD INSTALL -l\r\n> \"C:\\Program Files\\R\\R-3.2.4\\library\"\r\n> C:\\Users\\Julien\\AppData\\Local\\Temp\\RtmpUHxmwL/downloaded_packages/xgboost_0.4-4.tar.gz'\r\n> had status 1\r\n> \r\n> Warning in install.packages :\r\n> \r\n> installation of package ‘xgboost’ had non-zero exit status\r\n\r\n--\r\n\r\n\r\nI'm notifying it to you as you suggested. Now I'm going to check those premade packages, crossing fingers...\r\n\r\n[quote=Anupam Shrivastava;130007]\r\n\r\nI was struggling with installing xgboost in my windows system as well before I found the below link\r\n\r\nhttps://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en\r\n\r\nThe instructions are specific to the python installation Anaconda.\r\n\r\n[/quote]\r\n\r\nThank you, unfortunately I already tried this one, I believe it worked at that moment in time, but not anymore (it seems).",
      "votes": null
    },
    {
      "id": "130035",
      "postDate": "08/03/2016 13:00:52",
      "content": "<p>@juliencs, what are the errors you get with <a href=\"https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en\">https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en</a> ?</p>",
      "rawMarkdown": "juliencs, what are the errors you get with https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en ?",
      "votes": null
    },
    {
      "id": "130049",
      "postDate": "08/03/2016 14:02:44",
      "content": "<p>First errors  are the same ones as the ones I had with the R install (see my previous post), plus a whole lot more, I'll paste the whole thing below (tried some formatting on the text but still looks ugly). It's on a fresh installation of Anaconda, I uninstalled anything Python-related before resinstalling Anaconda. Error happens on the 'make -j4' step inside the dmlc-core folder.</p>\n\n<blockquote>\n  <p>In file included from <br>\n  c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/ <br>\n  ../../../../include/c++/4.6.3/cstdio:44:0, <br>\n                   from include/dmlc/io.h:8, <br>\n                   from src/io.cc:4: <br>\n   c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-m\n  ingw32/include/stdio.h:396:83: error: 'FILE* std::fopen(const char*,\n  const char*                  )' should have been declared inside 'std' <br>\n  c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-m\n  ingw32/include/stdio.h:396:83: error: declaration of 'FILE*\n  std::fopen(const cha                  r*, const char*)' <br>\n  c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-m\n  ingw32/include/stdio.h:395:17: error: conflicts with previous\n  declaration 'FILE*                   fopen(const char*, const char*)' <br>\n  src/io/input_split_base.cc: In member function 'void\n  dmlc::io::InputSplitBase::I                  nitInputFileInfo(const\n  string&amp;)': <br>\n  src/io/input_split_base.cc:112:12: warning: variable\n  'exact_match' set but not u                  sed\n  [-Wunused-but-set-variable] <br>\n  In file included from <br>\n  src/io/cached_input_split.h:16:0,\n                   from src/io.cc:13: <br>\n  include/dmlc/threadediter.h:210:3: error: 'thread' in namespace 'std' does not n                  ame a\n  type <br>\n   include/dmlc/threadediter.h:216:3: error: 'mutex' in namespace\n  'std' does not na                  me a type <br>\n  include/dmlc/threadediter.h:222:3: error: 'condition_variable' in\n  namespace 'std                  ' does not name a type\n  include/dmlc/threadediter.h:224:3: error: 'condition_variable' in\n  namespace 'std                  ' does not name a type <br>\n  include/dmlc/threadediter.h: In constructor\n  'dmlc::ThreadedIter::Threaded                  Iter(size_t)': <br>\n  include/dmlc/threadediter.h:82:9: error: class\n  'dmlc::ThreadedIter' does                   not have any field\n  named 'producer_thread_' <br>\n  include/dmlc/threadediter.h: In member\n  function 'virtual void dmlc::ThreadedIter <br>\n  ::BeforeFirst()': <br>\n  include/dmlc/threadediter.h:168:5: error:\n  'unique_lock' is not a member of 'std' <br>\n  include/dmlc/threadediter.h:168:22: error: 'mutex' is not a member of\n  'std' <br>\n  include/dmlc/threadediter.h:168:39: error: 'mutex_' was not\n  declared in this sco                  pe <br>\n  include/dmlc/threadediter.h:168:45: error: there are no arguments to\n  'lock' that                   depend on a template parameter, so a\n  declaration of 'lock' must be available [-fpermissive] <br>\n  include/dmlc/threadediter.h:168:45: note: (if you use\n  '-fpermissive', G++ will a                  ccept your code, but\n  allowing the use of an undeclared name is deprecated) <br>\n  include/dmlc/threadediter.h:178:7: error: 'producer_cond_' was not\n  declared in t                  his scope <br>\n  include/dmlc/threadediter.h:182:5: error: 'consumer_cond_' was not\n  declared in t                  his scope <br>\n  include/dmlc/threadediter.h:182:25: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h:189:17: error: 'producer_cond_'\n  was not declared in                   this scope <br>\n  include/dmlc/threadediter.h: In member function 'void\n  dmlc::ThreadedIter:                  :Destroy()': <br>\n  include/dmlc/threadediter.h:236:7: error: 'producer_thread_' was not\n  declared in                   this scope <br>\n  include/dmlc/threadediter.h:239:7: error: 'lock_guard' is not a member\n  of 'std' <br>\n  include/dmlc/threadediter.h:239:23: error: 'mutex' is not a\n  member of 'std' <br>\n  include/dmlc/threadediter.h:239:40: error: 'mutex_'\n  was not declared in this sco                  pe <br>\n  include/dmlc/threadediter.h:239:46: error: there are no arguments to\n  'lock' that                   depend on a template parameter, so a\n  declaration of 'lock' must be available [-fpermissive] <br>\n  include/dmlc/threadediter.h:243:9: error:\n  'producer_cond_' was not declared in t                  his scope <br>\n  include/dmlc/threadediter.h: In lambda function: <br>\n  include/dmlc/threadediter.h:295:9: error: 'unique_lock' is not a\n  member of 'std' <br>\n  include/dmlc/threadediter.h:295:26: error: 'mutex' is\n  not a member of 'std' <br>\n  include/dmlc/threadediter.h:295:43: error:\n  'mutex_' was not declared in this sco                  pe <br>\n  include/dmlc/threadediter.h:295:49: error: there are no arguments to\n  'lock' that                   depend on a template parameter, so a\n  declaration of 'lock' must be available [-fpermissive] <br>\n   include/dmlc/threadediter.h:297:9: error:\n  'producer_cond_' was not declared in t                  his scope <br>\n  include/dmlc/threadediter.h:297:29: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h:326:11: error: 'consumer_cond_'\n  was not declared in                   this scope <br>\n  include/dmlc/threadediter.h:333:11: error: 'consumer_cond_' was not\n  declared in                   this scope <br>\n  include/dmlc/threadediter.h:343:9: error: 'lock_guard' is not a member\n  of 'std' <br>\n  include/dmlc/threadediter.h:343:25: error: 'mutex' is not a\n  member of 'std' <br>\n  include/dmlc/threadediter.h:343:42: error: 'mutex_'\n  was not declared in this sco                  pe <br>\n  include/dmlc/threadediter.h:343:48: error: there are no arguments to\n  'lock' that                   depend on a template parameter, so a\n  declaration of 'lock' must be available [-fpermissive] <br>\n  include/dmlc/threadediter.h:352:19: error:\n  'consumer_cond_' was not declared in                   this scope <br>\n  include/dmlc/threadediter.h: In member function 'void\n  dmlc::ThreadedIter: <br>\n  :Init(std::function, std::function)': <br>\n  include/dmlc/threadediter.h:355:3: error: 'producer_thread_' was not\n  declared in                   this scope <br>\n  include/dmlc/threadediter.h:355:26: error: expected type-specifier <br>\n  include/dmlc/threadediter.h:355:26: error: expected ';' <br>\n  include/dmlc/threadediter.h: In member function 'bool\n  dmlc::ThreadedIter:                  :Next(DType**)': <br>\n  include/dmlc/threadediter.h:362:3: error: 'unique_lock' is not a\n  member of 'std' <br>\n  include/dmlc/threadediter.h:362:20: error: 'mutex' is\n  not a member of 'std' <br>\n  include/dmlc/threadediter.h:362:37: error:\n  'mutex_' was not declared in this sco                  pe <br>\n  include/dmlc/threadediter.h:362:43: error: there are no arguments to\n  'lock' that                   depend on a template parameter, so a\n  declaration of 'lock' must be available [-fpermissive] <br>\n  include/dmlc/threadediter.h:366:3: error:\n  'consumer_cond_' was not declared in t                  his scope <br>\n  include/dmlc/threadediter.h:366:23: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h:375:17: error: 'producer_cond_'\n  was not declared in                   this scope <br>\n  include/dmlc/threadediter.h: In member function 'void\n  dmlc::ThreadedIter:                  :Recycle(DType**)': <br>\n  include/dmlc/threadediter.h:387:5: error: 'lock_guard' is not a member\n  of 'std' <br>\n  include/dmlc/threadediter.h:387:21: error: 'mutex' is not a\n  member of 'std' <br>\n  include/dmlc/threadediter.h:387:38: error: 'mutex_'\n  was not declared in this sco                  pe <br>\n  include/dmlc/threadediter.h:387:44: error: there are no arguments to\n  'lock' that                   depend on a template parameter, so a\n  declaration of 'lock' must be available [-fpermissive] <br>\n  include/dmlc/threadediter.h:392:15: error:\n  'producer_cond_' was not declared in                   this scope <br>\n  include/dmlc/threadediter.h: In member function 'void\n  dmlc::ThreadedIter:                  :Destroy() [with DType =\n  dmlc::io::InputSplitBase::Chunk]': src/io/cached_input_split.h:58:26: \n  instantiated from here <br>\n  include/dmlc/threadediter.h:239:7: error:\n  'lock' was not declared in this scope <br>\n  include/dmlc/threadediter.h: In\n  member function 'void dmlc::ThreadedIter: <br>\n  :Recycle(DType**) [with DType = dmlc::io::InputSplitBase::Chunk]':\n  src/io/cached_input_split.h:68:43:   instantiated from here <br>\n  include/dmlc/threadediter.h:387:5: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h: In member function 'bool\n  dmlc::ThreadedIter:                  :Next(DType**) [with DType\n  = dmlc::io::InputSplitBase::Chunk]': src/io/cached_input_split.h:70:45:   instantiated from here <br>\n  include/dmlc/threadediter.h:362:3: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h: In member function 'void\n  dmlc::ThreadedIter:                  :BeforeFirst() [with DType\n  = dmlc::io::InputSplitBase::Chunk]': src/io/cached_input_split.h:81:32:   instantiated from here <br>\n  include/dmlc/threadediter.h:168:5: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h: In lambda function: <br>\n  include/dmlc/threadediter.h:290:36:   instantiated from\n  'dmlc::ThreadedIter\n  e&gt;::Init(std::function, std::function) [with\n  DType = dmlc <br>\n  ::io::InputSplitBase::Chunk]::' <br>\n  include/dmlc/threadediter.h:354:3:   instantiated from 'void\n  dmlc::ThreadedIter&lt; <br>\n  DType&gt;::Init(std::function, std::function)\n  [with DType =                   dmlc::io::InputSplitBase::Chunk]'\n  src/io/cached_input_split.h:160:6:   instantiated from here <br>\n  include/dmlc/threadediter.h:295:9: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h:290:36:   instantiated from\n  'dmlc::ThreadedIter\n  e&gt;::Init(std::function, std::function) [with\n  DType = dmlc <br>\n  ::io::InputSplitBase::Chunk]::' <br>\n  include/dmlc/threadediter.h:354:3:   instantiated from 'void\n  dmlc::ThreadedIter&lt; <br>\n  DType&gt;::Init(std::function, std::function)\n  [with DType =                   dmlc::io::InputSplitBase::Chunk]'\n  src/io/cached_input_split.h:160:6:   instantiated from here <br>\n  include/dmlc/threadediter.h:343:9: error: 'lock' was not declared in\n  this scope <br>\n  Makefile:75: recipe for target 'io.o' failed <br>\n  mingw32-make: <strong>* [io.o] Error 1 <br>\n  mingw32-make: *</strong> Waiting for unfinished jobs....</p>\n</blockquote>",
      "rawMarkdown": "First errors  are the same ones as the ones I had with the R install (see my previous post), plus a whole lot more, I'll paste the whole thing below (tried some formatting on the text but still looks ugly). It's on a fresh installation of Anaconda, I uninstalled anything Python-related before resinstalling Anaconda. Error happens on the 'make -j4' step inside the dmlc-core folder.\r\n\r\n> In file included from  \r\n> c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/              \r\n> ../../../../include/c++/4.6.3/cstdio:44:0,  \r\n>                  from include/dmlc/io.h:8,  \r\n>                  from src/io.cc:4:   \r\n c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-m\r\n> ingw32/include/stdio.h:396:83: error: 'FILE* std::fopen(const char*,\r\n> const char*                  )' should have been declared inside 'std'  \r\n> c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-m\r\n> ingw32/include/stdio.h:396:83: error: declaration of 'FILE*\r\n> std::fopen(const cha                  r*, const char*)'  \r\n> c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-m\r\n> ingw32/include/stdio.h:395:17: error: conflicts with previous\r\n> declaration 'FILE*                   fopen(const char*, const char*)'  \r\n> src/io/input_split_base.cc: In member function 'void\r\n> dmlc::io::InputSplitBase::I                  nitInputFileInfo(const\r\n> string&)':    \r\nsrc/io/input_split_base.cc:112:12: warning: variable\r\n> 'exact_match' set but not u                  sed\r\n> [-Wunused-but-set-variable]   \r\nIn file included from  \r\n> src/io/cached_input_split.h:16:0,\r\n>                  from src/io.cc:13:   \r\ninclude/dmlc/threadediter.h:210:3: error: 'thread' in namespace 'std' does not n                  ame a\r\n> type  \r\n include/dmlc/threadediter.h:216:3: error: 'mutex' in namespace\r\n> 'std' does not na                  me a type  \r\n> include/dmlc/threadediter.h:222:3: error: 'condition_variable' in\r\n> namespace 'std                  ' does not name a type\r\n> include/dmlc/threadediter.h:224:3: error: 'condition_variable' in\r\n> namespace 'std                  ' does not name a type  \r\n> include/dmlc/threadediter.h: In constructor\r\n> 'dmlc::ThreadedIter<DType>::Threaded                  Iter(size_t)':  \r\n> include/dmlc/threadediter.h:82:9: error: class\r\n> 'dmlc::ThreadedIter<DType>' does                   not have any field\r\n> named 'producer_thread_'   \r\ninclude/dmlc/threadediter.h: In member\r\n> function 'virtual void dmlc::ThreadedIter                 \r\n> <DType>::BeforeFirst()':   \r\ninclude/dmlc/threadediter.h:168:5: error:\r\n> 'unique_lock' is not a member of 'std'  \r\n> include/dmlc/threadediter.h:168:22: error: 'mutex' is not a member of\r\n> 'std'   \r\ninclude/dmlc/threadediter.h:168:39: error: 'mutex_' was not\r\n> declared in this sco                  pe  \r\n> include/dmlc/threadediter.h:168:45: error: there are no arguments to\r\n> 'lock' that                   depend on a template parameter, so a\r\n> declaration of 'lock' must be available [-fpermissive]     \r\ninclude/dmlc/threadediter.h:168:45: note: (if you use\r\n> '-fpermissive', G++ will a                  ccept your code, but\r\n> allowing the use of an undeclared name is deprecated)  \r\n> include/dmlc/threadediter.h:178:7: error: 'producer_cond_' was not\r\n> declared in t                  his scope  \r\n> include/dmlc/threadediter.h:182:5: error: 'consumer_cond_' was not\r\n> declared in t                  his scope  \r\n> include/dmlc/threadediter.h:182:25: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h:189:17: error: 'producer_cond_'\r\n> was not declared in                   this scope  \r\n> include/dmlc/threadediter.h: In member function 'void\r\n> dmlc::ThreadedIter<DType>:                  :Destroy()':  \r\n> include/dmlc/threadediter.h:236:7: error: 'producer_thread_' was not\r\n> declared in                   this scope  \r\n> include/dmlc/threadediter.h:239:7: error: 'lock_guard' is not a member\r\n> of 'std'   \r\ninclude/dmlc/threadediter.h:239:23: error: 'mutex' is not a\r\n> member of 'std'   \r\ninclude/dmlc/threadediter.h:239:40: error: 'mutex_'\r\n> was not declared in this sco                  pe  \r\n> include/dmlc/threadediter.h:239:46: error: there are no arguments to\r\n> 'lock' that                   depend on a template parameter, so a\r\n> declaration of 'lock' must be available [-fpermissive]   \r\ninclude/dmlc/threadediter.h:243:9: error:\r\n> 'producer_cond_' was not declared in t                  his scope  \r\n> include/dmlc/threadediter.h: In lambda function:  \r\n> include/dmlc/threadediter.h:295:9: error: 'unique_lock' is not a\r\n> member of 'std'   \r\ninclude/dmlc/threadediter.h:295:26: error: 'mutex' is\r\n> not a member of 'std'   \r\ninclude/dmlc/threadediter.h:295:43: error:\r\n> 'mutex_' was not declared in this sco                  pe  \r\n> include/dmlc/threadediter.h:295:49: error: there are no arguments to\r\n> 'lock' that                   depend on a template parameter, so a\r\n> declaration of 'lock' must be available [-fpermissive]  \r\n include/dmlc/threadediter.h:297:9: error:\r\n> 'producer_cond_' was not declared in t                  his scope  \r\n> include/dmlc/threadediter.h:297:29: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h:326:11: error: 'consumer_cond_'\r\n> was not declared in                   this scope  \r\n> include/dmlc/threadediter.h:333:11: error: 'consumer_cond_' was not\r\n> declared in                   this scope  \r\n> include/dmlc/threadediter.h:343:9: error: 'lock_guard' is not a member\r\n> of 'std'   \r\ninclude/dmlc/threadediter.h:343:25: error: 'mutex' is not a\r\n> member of 'std'   \r\ninclude/dmlc/threadediter.h:343:42: error: 'mutex_'\r\n> was not declared in this sco                  pe  \r\n> include/dmlc/threadediter.h:343:48: error: there are no arguments to\r\n> 'lock' that                   depend on a template parameter, so a\r\n> declaration of 'lock' must be available [-fpermissive]   \r\ninclude/dmlc/threadediter.h:352:19: error:\r\n> 'consumer_cond_' was not declared in                   this scope  \r\n> include/dmlc/threadediter.h: In member function 'void\r\n> dmlc::ThreadedIter<DType>:                 \r\n> :Init(std::function<bool(DType**)>, std::function<void()>)':  \r\n> include/dmlc/threadediter.h:355:3: error: 'producer_thread_' was not\r\n> declared in                   this scope  \r\n> include/dmlc/threadediter.h:355:26: error: expected type-specifier  \r\n> include/dmlc/threadediter.h:355:26: error: expected ';'  \r\n> include/dmlc/threadediter.h: In member function 'bool\r\n> dmlc::ThreadedIter<DType>:                  :Next(DType**)':  \r\n> include/dmlc/threadediter.h:362:3: error: 'unique_lock' is not a\r\n> member of 'std'   \r\ninclude/dmlc/threadediter.h:362:20: error: 'mutex' is\r\n> not a member of 'std'   \r\ninclude/dmlc/threadediter.h:362:37: error:\r\n> 'mutex_' was not declared in this sco                  pe  \r\n> include/dmlc/threadediter.h:362:43: error: there are no arguments to\r\n> 'lock' that                   depend on a template parameter, so a\r\n> declaration of 'lock' must be available [-fpermissive]   \r\ninclude/dmlc/threadediter.h:366:3: error:\r\n> 'consumer_cond_' was not declared in t                  his scope  \r\n> include/dmlc/threadediter.h:366:23: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h:375:17: error: 'producer_cond_'\r\n> was not declared in                   this scope  \r\n> include/dmlc/threadediter.h: In member function 'void\r\n> dmlc::ThreadedIter<DType>:                  :Recycle(DType**)':  \r\n> include/dmlc/threadediter.h:387:5: error: 'lock_guard' is not a member\r\n> of 'std'   \r\ninclude/dmlc/threadediter.h:387:21: error: 'mutex' is not a\r\n> member of 'std'   \r\ninclude/dmlc/threadediter.h:387:38: error: 'mutex_'\r\n> was not declared in this sco                  pe  \r\n> include/dmlc/threadediter.h:387:44: error: there are no arguments to\r\n> 'lock' that                   depend on a template parameter, so a\r\n> declaration of 'lock' must be available [-fpermissive]   \r\ninclude/dmlc/threadediter.h:392:15: error:\r\n> 'producer_cond_' was not declared in                   this scope  \r\n> include/dmlc/threadediter.h: In member function 'void\r\n> dmlc::ThreadedIter<DType>:                  :Destroy() [with DType =\r\n> dmlc::io::InputSplitBase::Chunk]': src/io/cached_input_split.h:58:26: \r\n> instantiated from here   \r\ninclude/dmlc/threadediter.h:239:7: error:\r\n> 'lock' was not declared in this scope   \r\ninclude/dmlc/threadediter.h: In\r\n> member function 'void dmlc::ThreadedIter<DType>:                 \r\n> :Recycle(DType**) [with DType = dmlc::io::InputSplitBase::Chunk]':\r\n> src/io/cached_input_split.h:68:43:   instantiated from here  \r\n> include/dmlc/threadediter.h:387:5: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h: In member function 'bool\r\n> dmlc::ThreadedIter<DType>:                  :Next(DType**) [with DType\r\n> = dmlc::io::InputSplitBase::Chunk]': src/io/cached_input_split.h:70:45:   instantiated from here  \r\n> include/dmlc/threadediter.h:362:3: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h: In member function 'void\r\n> dmlc::ThreadedIter<DType>:                  :BeforeFirst() [with DType\r\n> = dmlc::io::InputSplitBase::Chunk]': src/io/cached_input_split.h:81:32:   instantiated from here  \r\n> include/dmlc/threadediter.h:168:5: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h: In lambda function:  \r\n> include/dmlc/threadediter.h:290:36:   instantiated from\r\n> 'dmlc::ThreadedIter<DTyp                 \r\n> e>::Init(std::function<bool(DType**)>, std::function<void()>) [with\r\n> DType = dmlc                 \r\n> ::io::InputSplitBase::Chunk]::<lambda()>'  \r\n> include/dmlc/threadediter.h:354:3:   instantiated from 'void\r\n> dmlc::ThreadedIter<                 \r\n> DType>::Init(std::function<bool(DType**)>, std::function<void()>)\r\n> [with DType =                   dmlc::io::InputSplitBase::Chunk]'\r\n> src/io/cached_input_split.h:160:6:   instantiated from here  \r\n> include/dmlc/threadediter.h:295:9: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h:290:36:   instantiated from\r\n> 'dmlc::ThreadedIter<DTyp                 \r\n> e>::Init(std::function<bool(DType**)>, std::function<void()>) [with\r\n> DType = dmlc                 \r\n> ::io::InputSplitBase::Chunk]::<lambda()>'  \r\n> include/dmlc/threadediter.h:354:3:   instantiated from 'void\r\n> dmlc::ThreadedIter<                 \r\n> DType>::Init(std::function<bool(DType**)>, std::function<void()>)\r\n> [with DType =                   dmlc::io::InputSplitBase::Chunk]'\r\n> src/io/cached_input_split.h:160:6:   instantiated from here  \r\n> include/dmlc/threadediter.h:343:9: error: 'lock' was not declared in\r\n> this scope   \r\nMakefile:75: recipe for target 'io.o' failed   \r\nmingw32-make: *** [io.o] Error 1   \r\nmingw32-make: *** Waiting for unfinished jobs....",
      "votes": null
    },
    {
      "id": "130056",
      "postDate": "08/03/2016 14:15:37",
      "content": "<p>@juliencs, are you sure you have aliased make to be the one provided by mingw?  I am asking because your c++ compiler comes from rtools.  I guess that's why you are having issues.</p>\n\n<p>I am unfortunately not a R expert, hence cannot help you much if you insist on using tooling from rtools.  This tooling may be just fine, it is just that I am not familiar with it.</p>",
      "rawMarkdown": "juliencs, are you sure you have aliased make to be the one provided by mingw?  I am asking because your c++ compiler comes from rtools.  I guess that's why you are having issues.\r\n\r\nI am unfortunately not a R expert, hence cannot help you much if you insist on using tooling from rtools.  This tooling may be just fine, it is just that I am not familiar with it.",
      "votes": null
    },
    {
      "id": "130060",
      "postDate": "08/03/2016 14:39:42",
      "content": "<p>Hello,</p>\n\n<p>(long post)</p>\n\n<p>Please use the following instructions and tell me if it is working in bash (use GitHub Bash to make sure you are using the right one).</p>\n\n<p><strong>Before trying to do something, make sure the compiler you are USING is mingw from your mingw installation and NOT from R tools. If you are unsure, please run the following command in an R session:</strong></p>\n\n<pre><code>system('gcc -v')\n</code></pre>\n\n<p><strong>This should answer you something similar (pointing to your mingw installation, NOT R tools) like:</strong></p>\n\n<pre><code>Using built-in specs.\nCOLLECT_GCC=C:\\PROGRA~1\\MINGW-~1\\X86_64~1.0-P\\mingw64\\bin\\gcc.exe\nCOLLECT_LTO_WRAPPER=C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/5.3.0/lto-wrapper.exe\nTarget: x86_64-w64-mingw32\nConfigured with: ../../../src/gcc-5.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64 --with-gxx-include-dir=/mingw64/x86_64-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-isl-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/include -I/c/mingw530/prerequisites/x86_64-zlib-static/include -I/c/mingw530/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/include -I/c/mingw530/prerequisites/x86_64-zlib-static/include -I/c/mingw530/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/lib -L/c/mingw530/prerequisites/x86_64-zlib-static/lib -L/c/mingw530/prerequisites/x86_64-w64-mingw32-static/lib '\nThread model: posix\ngcc version 5.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) \n</code></pre>\n\n<p>Tested in MRO 3.3.0 (I wanted a clean installation to check if there were any errors), but I also use this for the regular R version 3.3.1 without any error.</p>\n\n<h1>Compilation of binaries</h1>\n\n<p>First, the typical commands (create a folder in C:/xgboost/xgboost):</p>\n\n<pre><code>mkdir C:/xgboost/xgboost\ncd C:/xgboost\ngit clone --recursive https://github.com/dmlc/xgboost\ncd xgboost\ngit submodule init\ngit submodule update\nalias make='mingw32-make'\ncd dmlc-core\nmake\ncd ../rabit\nmake lib/librabit_empty.a\ncd ..\n</code></pre>\n\n<p>Now, we will have manual steps to cover.</p>\n\n<p><em>Optional step (if you want to be safe): go to C:\\xgboost\\xgboost\\make, copy mingw64.mk, and name it mingw64_min.mk. Open that file in Notepad. Comment the last two lines (DMLC_CFLAGS and ADD_CFLAGS).</em></p>\n\n<p>Mandatory step: go to C:\\xgboost\\xgboost, copy and paste Makefile, and open the current Makefile. Replace all existing &quot;$(MAKE)&quot; by &quot;mingw32-make&quot;.</p>\n\n<p>Run the following commands in the GitHub Bash:</p>\n\n<pre><code>cp make/mingw64_min.mk config.mk\nmake\n</code></pre>\n\n<p>No error should arise, unless your mingw installation is broken somewhere. You must have it in your PATH.</p>\n\n<h1>Compilation for R</h1>\n\n<p>This is where it gets complicated. Make sure you have the administrator rights in your current Windows session.</p>\n\n<p>Open an R session as administrator, and run the following commands:</p>\n\n<pre><code>setwd('C:/xgboost/xgboost/R-package')\nlibrary(devtools)\ninstall()\n</code></pre>\n\n<p><strong>You should get an error about permissions (if it compiles without whining about permissions, then perfect).</strong> Still all good, it copied a lot of files we need to compile the R package. Go to C:\\xgboost\\xgboost\\R-package, right-click on the &quot;src&quot; folder, select &quot;Properties&quot;.</p>\n\n<ul>\n<li>Under the &quot;Security&quot; tab, click &quot;Edit&quot;</li>\n<li>Click &quot;Full control&quot; to all group or user names (click on each group, click Full control for each)</li>\n<li>Click OK twice</li>\n<li>Right-click on the &quot;src&quot; folder, select &quot;Properties&quot;</li>\n<li>Under the &quot;Security&quot; tab, click &quot;Advanced&quot;</li>\n<li>Check &quot;Replace all child object permission entries with inheritable permission entries from this object&quot; (it is the last box at the bottom left of the opened tab).</li>\n<li>Click OK twice</li>\n</ul>\n\n<p>Run the following command:</p>\n\n<pre><code>install()\n</code></pre>\n\n<p>Success, you installed xgboost in Windows! If it is still NOT working for some reason (for instance you are seeing double //), open C:\\xgboost\\xgboost\\R-package\\src\\Makevars.win with Notepad++, and remove the leading slash from all the -I$(PKGROOT) on line 25.</p>\n\n<p>If you want to test xgboost, run this:</p>\n\n<pre><code>library(xgboost)\nset.seed(11111)\nn=100\nncov=4\nz=matrix(replicate(n,rnorm(ncov)),nrow=n)\nalpha=c(-1,0.5,-0.25,-0.1)\nza=z%*%alpha\np=exp(za)/(1+exp(za))\nt=rbinom(n,1,p)\nxgb.train(list(objective=&quot;binary:logitraw&quot;), xgb.DMatrix(data=z,label=t), nrounds=10)\n</code></pre>",
      "rawMarkdown": "Hello,\r\n\r\n(long post)\r\n\r\nPlease use the following instructions and tell me if it is working in bash (use GitHub Bash to make sure you are using the right one).\r\n\r\n**Before trying to do something, make sure the compiler you are USING is mingw from your mingw installation and NOT from R tools. If you are unsure, please run the following command in an R session:**\r\n\r\n    system('gcc -v')\r\n\r\n**This should answer you something similar (pointing to your mingw installation, NOT R tools) like:**\r\n\r\n    Using built-in specs.\r\n    COLLECT_GCC=C:\\PROGRA~1\\MINGW-~1\\X86_64~1.0-P\\mingw64\\bin\\gcc.exe\r\n    COLLECT_LTO_WRAPPER=C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/5.3.0/lto-wrapper.exe\r\n    Target: x86_64-w64-mingw32\r\n    Configured with: ../../../src/gcc-5.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64 --with-gxx-include-dir=/mingw64/x86_64-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-isl-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/include -I/c/mingw530/prerequisites/x86_64-zlib-static/include -I/c/mingw530/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/include -I/c/mingw530/prerequisites/x86_64-zlib-static/include -I/c/mingw530/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/lib -L/c/mingw530/prerequisites/x86_64-zlib-static/lib -L/c/mingw530/prerequisites/x86_64-w64-mingw32-static/lib '\r\n    Thread model: posix\r\n    gcc version 5.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) \r\n\r\nTested in MRO 3.3.0 (I wanted a clean installation to check if there were any errors), but I also use this for the regular R version 3.3.1 without any error.\r\n\r\n# Compilation of binaries #\r\n\r\nFirst, the typical commands (create a folder in C:/xgboost/xgboost):\r\n\r\n    mkdir C:/xgboost/xgboost\r\n    cd C:/xgboost\r\n    git clone --recursive https://github.com/dmlc/xgboost\r\n    cd xgboost\r\n    git submodule init\r\n    git submodule update\r\n    alias make='mingw32-make'\r\n    cd dmlc-core\r\n    make\r\n    cd ../rabit\r\n    make lib/librabit_empty.a\r\n    cd ..\r\n\r\nNow, we will have manual steps to cover.\r\n\r\n*Optional step (if you want to be safe): go to C:\\xgboost\\xgboost\\make, copy mingw64.mk, and name it mingw64_min.mk. Open that file in Notepad. Comment the last two lines (DMLC_CFLAGS and ADD_CFLAGS).*\r\n\r\nMandatory step: go to C:\\xgboost\\xgboost, copy and paste Makefile, and open the current Makefile. Replace all existing \"$(MAKE)\" by \"mingw32-make\".\r\n\r\nRun the following commands in the GitHub Bash:\r\n\r\n    cp make/mingw64_min.mk config.mk\r\n    make\r\n\r\nNo error should arise, unless your mingw installation is broken somewhere. You must have it in your PATH.\r\n\r\n# Compilation for R #\r\n\r\nThis is where it gets complicated. Make sure you have the administrator rights in your current Windows session.\r\n\r\nOpen an R session as administrator, and run the following commands:\r\n\r\n    setwd('C:/xgboost/xgboost/R-package')\r\n    library(devtools)\r\n    install()\r\n\r\n**You should get an error about permissions (if it compiles without whining about permissions, then perfect).** Still all good, it copied a lot of files we need to compile the R package. Go to C:\\xgboost\\xgboost\\R-package, right-click on the \"src\" folder, select \"Properties\".\r\n\r\n* Under the \"Security\" tab, click \"Edit\"\r\n* Click \"Full control\" to all group or user names (click on each group, click Full control for each)\r\n* Click OK twice\r\n* Right-click on the \"src\" folder, select \"Properties\"\r\n* Under the \"Security\" tab, click \"Advanced\"\r\n* Check \"Replace all child object permission entries with inheritable permission entries from this object\" (it is the last box at the bottom left of the opened tab).\r\n* Click OK twice\r\n\r\nRun the following command:\r\n\r\n    install()\r\n\r\nSuccess, you installed xgboost in Windows! If it is still NOT working for some reason (for instance you are seeing double //), open C:\\xgboost\\xgboost\\R-package\\src\\Makevars.win with Notepad++, and remove the leading slash from all the -I$(PKGROOT) on line 25.\r\n\r\nIf you want to test xgboost, run this:\r\n\r\n    library(xgboost)\r\n    set.seed(11111)\r\n    n=100\r\n    ncov=4\r\n    z=matrix(replicate(n,rnorm(ncov)),nrow=n)\r\n    alpha=c(-1,0.5,-0.25,-0.1)\r\n    za=z%*%alpha\r\n    p=exp(za)/(1+exp(za))\r\n    t=rbinom(n,1,p)\r\n    xgb.train(list(objective=\"binary:logitraw\"), xgb.DMatrix(data=z,label=t), nrounds=10)",
      "votes": null
    },
    {
      "id": "130062",
      "postDate": "08/03/2016 14:43:17",
      "content": "<p>I am providing the verbose log here if needed for all the steps (no &quot;spoiler&quot; tag, and this makes Kaggle provide an error when trying to post &gt;_&gt;).</p>\n\n<p>On this link: <a href=\"http://pastebin.com/JasBcZ5N\">http://pastebin.com/JasBcZ5N</a> (can't post it apparently, Kaggle refuses the post?)</p>\n\n<p>Search for &quot;**&quot; to check the step you are in to see if it matches (approximately) what you have, and if it does not compile you can pinpoint where it stopped and what is the reason behind.</p>",
      "rawMarkdown": "I am providing the verbose log here if needed for all the steps (no \"spoiler\" tag, and this makes Kaggle provide an error when trying to post >_>).\r\n\r\nOn this link: http://pastebin.com/JasBcZ5N (can't post it apparently, Kaggle refuses the post?)\r\n\r\nSearch for \"**\" to check the step you are in to see if it matches (approximately) what you have, and if it does not compile you can pinpoint where it stopped and what is the reason behind.",
      "votes": null
    },
    {
      "id": "130065",
      "postDate": "08/03/2016 14:58:55",
      "content": "<p>@Laurae, he is using the compiler from rtools, which is why he has issues IMHO.  I made the same remark as you.</p>",
      "rawMarkdown": "Laurae, he is using the compiler from rtools, which is why he has issues IMHO.  I made the same remark as you.",
      "votes": null
    },
    {
      "id": "130067",
      "postDate": "08/03/2016 15:01:01",
      "content": "<p>You both nailed it, it wasn't the right compiler being used! Modified my PATH variable to have mingw ahead of Rtools, and the install worked like a charm. I've only tried the Python install.</p>\n\n<p>Hopefully other people arriving on this thread by googling these error messages won't lose as much time as I did on this problem.</p>\n\n<p>A big thank you to both of you.</p>",
      "rawMarkdown": "You both nailed it, it wasn't the right compiler being used! Modified my PATH variable to have mingw ahead of Rtools, and the install worked like a charm. I've only tried the Python install.\r\n\r\nHopefully other people arriving on this thread by googling these error messages won't lose as much time as I did on this problem.\r\n\r\nA big thank you to both of you.",
      "votes": null
    },
    {
      "id": "130068",
      "postDate": "08/03/2016 15:06:39",
      "content": "<p>[quote=juliencs;130067]</p>\n\n<p>You both nailed it, it wasn't the right compiler being used! Modified my PATH variable to have mingw ahead of Rtools, and the install worked like a charm. I've only tried the Python install.</p>\n\n<p>Hopefully other people arriving on this thread by googling these error messages won't lose as much time as I did on this problem.</p>\n\n<p>A big thank you to both of you.</p>\n\n<p>[/quote]</p>\n\n<p>That's great if you managed to compile and install it! Good 2 days of work :p</p>\n\n<p>You can now put back Rtools first if you need Rtools to be first when using R after you compiled/installed xgboost properly. Some R packages might break if it is not first (because these packages need compilation on the fly and are relying on Rtools before anything else).</p>\n\n<p>(tell us also if it installs in R properly if you are going to try to install it in R)</p>",
      "rawMarkdown": "[quote=juliencs;130067]\r\n\r\nYou both nailed it, it wasn't the right compiler being used! Modified my PATH variable to have mingw ahead of Rtools, and the install worked like a charm. I've only tried the Python install.\r\n\r\nHopefully other people arriving on this thread by googling these error messages won't lose as much time as I did on this problem.\r\n\r\nA big thank you to both of you.\r\n\r\n[/quote]\r\n\r\nThat's great if you managed to compile and install it! Good 2 days of work :p\r\n\r\nYou can now put back Rtools first if you need Rtools to be first when using R after you compiled/installed xgboost properly. Some R packages might break if it is not first (because these packages need compilation on the fly and are relying on Rtools before anything else).\r\n\r\n(tell us also if it installs in R properly if you are going to try to install it in R)",
      "votes": null
    },
    {
      "id": "130070",
      "postDate": "08/03/2016 15:36:25",
      "content": "<p>[quote=Laurae;130062]\nOn this link: <a href=\"http://pastebin.com/JasBcZ5N\">http://pastebin.com/JasBcZ5N</a> (can't post it apparently, Kaggle refuses the post?)\n[/quote]</p>\n\n<p>@Laurae sorry about that. We just made an update to allow Expert+ tiers the ability to have longer posts. Try it again, and it should go through. #freeperks :)</p>",
      "rawMarkdown": "[quote=Laurae;130062]\r\nOn this link: http://pastebin.com/JasBcZ5N (can't post it apparently, Kaggle refuses the post?)\r\n[/quote]\r\n\r\n@Laurae sorry about that. We just made an update to allow Expert+ tiers the ability to have longer posts. Try it again, and it should go through. #freeperks :)",
      "votes": null
    },
    {
      "id": "153942",
      "postDate": "01/04/2017 06:18:51",
      "content": "<p>I am unfortunately not a R expert, hence cannot help you much if you insist on using tooling from rtools. This tooling may be just fine, it is just that I am not familiar with it.</p>\n\n<p>Thanks</p>\n\n<p><a href=\"http://driverrestore.com/\">Driver restore</a></p>",
      "rawMarkdown": "I am unfortunately not a R expert, hence cannot help you much if you insist on using tooling from rtools. This tooling may be just fine, it is just that I am not familiar with it.\r\n\r\nThanks\r\n\r\n[Driver restore][1]\r\n\r\n\r\n  [1]: http://driverrestore.com/",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 130004,
      "author_name": "laurae2",
      "author_url": "",
      "post_date": "08/03/2016 10:08:58",
      "content": "<p>If you are using R, use the following:</p>\n\n<pre><code>install.packages(&quot;drat&quot;, repos=&quot;https://cran.rstudio.com&quot;)\ndrat:::addRepo(&quot;dmlc&quot;)\ninstall.packages(&quot;xgboost&quot;, repos=&quot;http://dmlc.ml/drat/&quot;, type=&quot;source&quot;)\n</code></pre>\n\n<p>Windows installation is slightly broken, although it is (really) compilable locally if you are using the right set of tools.</p>\n\n<p>Those are instructions for compiling xgboost in Windows, but if they are not working tell me so I can push an update accordingly as I didn't check whether the most recent versions have an issue: <a href=\"https://github.com/dmlc/xgboost/tree/master/R-package\">https://github.com/dmlc/xgboost/tree/master/R-package</a> (you can also raise an issue in xgboost's GitHub)</p>\n\n<p>If both drat and local compilation fails, you are left using premade packages: CRAN's xgboost and pip's xgboost (which have less functionalities but are guaranteed to work). On Windows, this is guaranteed to work 100% if you didn't make any bad changes to your Windows installation.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 130007,
      "author_name": "neural1708",
      "author_url": "",
      "post_date": "08/03/2016 10:14:51",
      "content": "<p>I was struggling with installing xgboost in my windows system as well before I found the below link</p>\n\n<p><a href=\"https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en\">https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en</a></p>\n\n<p>The instructions are specific to the python installation Anaconda.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 130026,
      "author_name": "juliencs",
      "author_url": "",
      "post_date": "08/03/2016 12:39:47",
      "content": "<p>[quote=Laurae;130004]\nWindows installation is slightly broken, although it is (really) compilable locally if you are using the right set of tools.</p>\n\n<p>Those are instructions for compiling xgboost in Windows, but if they are not working tell me so I can push an update accordingly as I didn't check whether the most recent versions have an issue\n[/quote]</p>\n\n<p>First of all, thanks for the quick answer. Using R the way you suggested, I still get the same errors, which are :</p>\n\n<p>--</p>\n\n<blockquote>\n  <p>c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:396:83:\n  error: 'FILE* std::fopen(const char*, const char*)' should have been\n  declared inside 'std'</p>\n  \n  <p>c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:396:83:\n  error: declaration of 'FILE* std::fopen(const char*, const char*)'</p>\n  \n  <p>c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:395:17:\n  error: conflicts with previous declaration 'FILE* fopen(const char*,\n  const char*)'</p>\n  \n  <p>make: <em>*</em> [amalgamation/xgboost-all0.o] Error 1</p>\n  \n  <p>Warning: l'ex&#233;cution de la commande 'make -f &quot;Makevars.win&quot; -f\n  &quot;C:/PROGRA~1/R/R-32~1.4/etc/x64/Makeconf&quot; -f\n  &quot;C:/PROGRA~1/R/R-32~1.4/share/make/winshlib.mk&quot; CXX='$(CXX1X)\n&gt; $(CXX1XSTD)' CXXFLAGS='$(CXX1XFLAGS)' CXXPICFLAGS='$(CXX1XPICFLAGS)'\n  SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)' SHLIB_LD='$(SHLIB_CXX1XLD)'\n  SHLIB=&quot;xgboost.dll&quot; WIN=64 TCLBIN=64 ' renvoie un statut 2</p>\n  \n  <p>ERROR: compilation failed for package 'xgboost'</p>\n  \n  <ul>\n  <li>removing 'C:/Program Files/R/R-3.2.4/library/xgboost'</li>\n  </ul>\n  \n  <p>Warning in install.packages :</p>\n  \n  <p>running command '&quot;C:/PROGRA~1/R/R-32~1.4/bin/x64/R&quot; CMD INSTALL -l\n  &quot;C:\\Program Files\\R\\R-3.2.4\\library&quot;\n  C:\\Users\\Julien\\AppData\\Local\\Temp\\RtmpUHxmwL/downloaded_packages/xgboost_0.4-4.tar.gz'\n  had status 1</p>\n  \n  <p>Warning in install.packages :</p>\n  \n  <p>installation of package &#8216;xgboost&#8217; had non-zero exit status</p>\n</blockquote>\n\n<p>--</p>\n\n<p>I'm notifying it to you as you suggested. Now I'm going to check those premade packages, crossing fingers...</p>\n\n<p>[quote=Anupam Shrivastava;130007]</p>\n\n<p>I was struggling with installing xgboost in my windows system as well before I found the below link</p>\n\n<p><a href=\"https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en\">https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en</a></p>\n\n<p>The instructions are specific to the python installation Anaconda.</p>\n\n<p>[/quote]</p>\n\n<p>Thank you, unfortunately I already tried this one, I believe it worked at that moment in time, but not anymore (it seems).</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 130035,
      "author_name": "cpmpml",
      "author_url": "",
      "post_date": "08/03/2016 13:00:52",
      "content": "<p>@juliencs, what are the errors you get with <a href=\"https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en\">https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en</a> ?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 130049,
      "author_name": "juliencs",
      "author_url": "",
      "post_date": "08/03/2016 14:02:44",
      "content": "<p>First errors  are the same ones as the ones I had with the R install (see my previous post), plus a whole lot more, I'll paste the whole thing below (tried some formatting on the text but still looks ugly). It's on a fresh installation of Anaconda, I uninstalled anything Python-related before resinstalling Anaconda. Error happens on the 'make -j4' step inside the dmlc-core folder.</p>\n\n<blockquote>\n  <p>In file included from <br>\n  c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/ <br>\n  ../../../../include/c++/4.6.3/cstdio:44:0, <br>\n                   from include/dmlc/io.h:8, <br>\n                   from src/io.cc:4: <br>\n   c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-m\n  ingw32/include/stdio.h:396:83: error: 'FILE* std::fopen(const char*,\n  const char*                  )' should have been declared inside 'std' <br>\n  c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-m\n  ingw32/include/stdio.h:396:83: error: declaration of 'FILE*\n  std::fopen(const cha                  r*, const char*)' <br>\n  c:\\rtools\\gcc-4.6.3\\bin../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-m\n  ingw32/include/stdio.h:395:17: error: conflicts with previous\n  declaration 'FILE*                   fopen(const char*, const char*)' <br>\n  src/io/input_split_base.cc: In member function 'void\n  dmlc::io::InputSplitBase::I                  nitInputFileInfo(const\n  string&amp;)': <br>\n  src/io/input_split_base.cc:112:12: warning: variable\n  'exact_match' set but not u                  sed\n  [-Wunused-but-set-variable] <br>\n  In file included from <br>\n  src/io/cached_input_split.h:16:0,\n                   from src/io.cc:13: <br>\n  include/dmlc/threadediter.h:210:3: error: 'thread' in namespace 'std' does not n                  ame a\n  type <br>\n   include/dmlc/threadediter.h:216:3: error: 'mutex' in namespace\n  'std' does not na                  me a type <br>\n  include/dmlc/threadediter.h:222:3: error: 'condition_variable' in\n  namespace 'std                  ' does not name a type\n  include/dmlc/threadediter.h:224:3: error: 'condition_variable' in\n  namespace 'std                  ' does not name a type <br>\n  include/dmlc/threadediter.h: In constructor\n  'dmlc::ThreadedIter::Threaded                  Iter(size_t)': <br>\n  include/dmlc/threadediter.h:82:9: error: class\n  'dmlc::ThreadedIter' does                   not have any field\n  named 'producer_thread_' <br>\n  include/dmlc/threadediter.h: In member\n  function 'virtual void dmlc::ThreadedIter <br>\n  ::BeforeFirst()': <br>\n  include/dmlc/threadediter.h:168:5: error:\n  'unique_lock' is not a member of 'std' <br>\n  include/dmlc/threadediter.h:168:22: error: 'mutex' is not a member of\n  'std' <br>\n  include/dmlc/threadediter.h:168:39: error: 'mutex_' was not\n  declared in this sco                  pe <br>\n  include/dmlc/threadediter.h:168:45: error: there are no arguments to\n  'lock' that                   depend on a template parameter, so a\n  declaration of 'lock' must be available [-fpermissive] <br>\n  include/dmlc/threadediter.h:168:45: note: (if you use\n  '-fpermissive', G++ will a                  ccept your code, but\n  allowing the use of an undeclared name is deprecated) <br>\n  include/dmlc/threadediter.h:178:7: error: 'producer_cond_' was not\n  declared in t                  his scope <br>\n  include/dmlc/threadediter.h:182:5: error: 'consumer_cond_' was not\n  declared in t                  his scope <br>\n  include/dmlc/threadediter.h:182:25: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h:189:17: error: 'producer_cond_'\n  was not declared in                   this scope <br>\n  include/dmlc/threadediter.h: In member function 'void\n  dmlc::ThreadedIter:                  :Destroy()': <br>\n  include/dmlc/threadediter.h:236:7: error: 'producer_thread_' was not\n  declared in                   this scope <br>\n  include/dmlc/threadediter.h:239:7: error: 'lock_guard' is not a member\n  of 'std' <br>\n  include/dmlc/threadediter.h:239:23: error: 'mutex' is not a\n  member of 'std' <br>\n  include/dmlc/threadediter.h:239:40: error: 'mutex_'\n  was not declared in this sco                  pe <br>\n  include/dmlc/threadediter.h:239:46: error: there are no arguments to\n  'lock' that                   depend on a template parameter, so a\n  declaration of 'lock' must be available [-fpermissive] <br>\n  include/dmlc/threadediter.h:243:9: error:\n  'producer_cond_' was not declared in t                  his scope <br>\n  include/dmlc/threadediter.h: In lambda function: <br>\n  include/dmlc/threadediter.h:295:9: error: 'unique_lock' is not a\n  member of 'std' <br>\n  include/dmlc/threadediter.h:295:26: error: 'mutex' is\n  not a member of 'std' <br>\n  include/dmlc/threadediter.h:295:43: error:\n  'mutex_' was not declared in this sco                  pe <br>\n  include/dmlc/threadediter.h:295:49: error: there are no arguments to\n  'lock' that                   depend on a template parameter, so a\n  declaration of 'lock' must be available [-fpermissive] <br>\n   include/dmlc/threadediter.h:297:9: error:\n  'producer_cond_' was not declared in t                  his scope <br>\n  include/dmlc/threadediter.h:297:29: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h:326:11: error: 'consumer_cond_'\n  was not declared in                   this scope <br>\n  include/dmlc/threadediter.h:333:11: error: 'consumer_cond_' was not\n  declared in                   this scope <br>\n  include/dmlc/threadediter.h:343:9: error: 'lock_guard' is not a member\n  of 'std' <br>\n  include/dmlc/threadediter.h:343:25: error: 'mutex' is not a\n  member of 'std' <br>\n  include/dmlc/threadediter.h:343:42: error: 'mutex_'\n  was not declared in this sco                  pe <br>\n  include/dmlc/threadediter.h:343:48: error: there are no arguments to\n  'lock' that                   depend on a template parameter, so a\n  declaration of 'lock' must be available [-fpermissive] <br>\n  include/dmlc/threadediter.h:352:19: error:\n  'consumer_cond_' was not declared in                   this scope <br>\n  include/dmlc/threadediter.h: In member function 'void\n  dmlc::ThreadedIter: <br>\n  :Init(std::function, std::function)': <br>\n  include/dmlc/threadediter.h:355:3: error: 'producer_thread_' was not\n  declared in                   this scope <br>\n  include/dmlc/threadediter.h:355:26: error: expected type-specifier <br>\n  include/dmlc/threadediter.h:355:26: error: expected ';' <br>\n  include/dmlc/threadediter.h: In member function 'bool\n  dmlc::ThreadedIter:                  :Next(DType**)': <br>\n  include/dmlc/threadediter.h:362:3: error: 'unique_lock' is not a\n  member of 'std' <br>\n  include/dmlc/threadediter.h:362:20: error: 'mutex' is\n  not a member of 'std' <br>\n  include/dmlc/threadediter.h:362:37: error:\n  'mutex_' was not declared in this sco                  pe <br>\n  include/dmlc/threadediter.h:362:43: error: there are no arguments to\n  'lock' that                   depend on a template parameter, so a\n  declaration of 'lock' must be available [-fpermissive] <br>\n  include/dmlc/threadediter.h:366:3: error:\n  'consumer_cond_' was not declared in t                  his scope <br>\n  include/dmlc/threadediter.h:366:23: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h:375:17: error: 'producer_cond_'\n  was not declared in                   this scope <br>\n  include/dmlc/threadediter.h: In member function 'void\n  dmlc::ThreadedIter:                  :Recycle(DType**)': <br>\n  include/dmlc/threadediter.h:387:5: error: 'lock_guard' is not a member\n  of 'std' <br>\n  include/dmlc/threadediter.h:387:21: error: 'mutex' is not a\n  member of 'std' <br>\n  include/dmlc/threadediter.h:387:38: error: 'mutex_'\n  was not declared in this sco                  pe <br>\n  include/dmlc/threadediter.h:387:44: error: there are no arguments to\n  'lock' that                   depend on a template parameter, so a\n  declaration of 'lock' must be available [-fpermissive] <br>\n  include/dmlc/threadediter.h:392:15: error:\n  'producer_cond_' was not declared in                   this scope <br>\n  include/dmlc/threadediter.h: In member function 'void\n  dmlc::ThreadedIter:                  :Destroy() [with DType =\n  dmlc::io::InputSplitBase::Chunk]': src/io/cached_input_split.h:58:26: \n  instantiated from here <br>\n  include/dmlc/threadediter.h:239:7: error:\n  'lock' was not declared in this scope <br>\n  include/dmlc/threadediter.h: In\n  member function 'void dmlc::ThreadedIter: <br>\n  :Recycle(DType**) [with DType = dmlc::io::InputSplitBase::Chunk]':\n  src/io/cached_input_split.h:68:43:   instantiated from here <br>\n  include/dmlc/threadediter.h:387:5: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h: In member function 'bool\n  dmlc::ThreadedIter:                  :Next(DType**) [with DType\n  = dmlc::io::InputSplitBase::Chunk]': src/io/cached_input_split.h:70:45:   instantiated from here <br>\n  include/dmlc/threadediter.h:362:3: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h: In member function 'void\n  dmlc::ThreadedIter:                  :BeforeFirst() [with DType\n  = dmlc::io::InputSplitBase::Chunk]': src/io/cached_input_split.h:81:32:   instantiated from here <br>\n  include/dmlc/threadediter.h:168:5: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h: In lambda function: <br>\n  include/dmlc/threadediter.h:290:36:   instantiated from\n  'dmlc::ThreadedIter\n  e&gt;::Init(std::function, std::function) [with\n  DType = dmlc <br>\n  ::io::InputSplitBase::Chunk]::' <br>\n  include/dmlc/threadediter.h:354:3:   instantiated from 'void\n  dmlc::ThreadedIter&lt; <br>\n  DType&gt;::Init(std::function, std::function)\n  [with DType =                   dmlc::io::InputSplitBase::Chunk]'\n  src/io/cached_input_split.h:160:6:   instantiated from here <br>\n  include/dmlc/threadediter.h:295:9: error: 'lock' was not declared in\n  this scope <br>\n  include/dmlc/threadediter.h:290:36:   instantiated from\n  'dmlc::ThreadedIter\n  e&gt;::Init(std::function, std::function) [with\n  DType = dmlc <br>\n  ::io::InputSplitBase::Chunk]::' <br>\n  include/dmlc/threadediter.h:354:3:   instantiated from 'void\n  dmlc::ThreadedIter&lt; <br>\n  DType&gt;::Init(std::function, std::function)\n  [with DType =                   dmlc::io::InputSplitBase::Chunk]'\n  src/io/cached_input_split.h:160:6:   instantiated from here <br>\n  include/dmlc/threadediter.h:343:9: error: 'lock' was not declared in\n  this scope <br>\n  Makefile:75: recipe for target 'io.o' failed <br>\n  mingw32-make: <strong>* [io.o] Error 1 <br>\n  mingw32-make: *</strong> Waiting for unfinished jobs....</p>\n</blockquote>",
      "votes": null,
      "replies": []
    },
    {
      "id": 130056,
      "author_name": "cpmpml",
      "author_url": "",
      "post_date": "08/03/2016 14:15:37",
      "content": "<p>@juliencs, are you sure you have aliased make to be the one provided by mingw?  I am asking because your c++ compiler comes from rtools.  I guess that's why you are having issues.</p>\n\n<p>I am unfortunately not a R expert, hence cannot help you much if you insist on using tooling from rtools.  This tooling may be just fine, it is just that I am not familiar with it.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 130060,
      "author_name": "laurae2",
      "author_url": "",
      "post_date": "08/03/2016 14:39:42",
      "content": "<p>Hello,</p>\n\n<p>(long post)</p>\n\n<p>Please use the following instructions and tell me if it is working in bash (use GitHub Bash to make sure you are using the right one).</p>\n\n<p><strong>Before trying to do something, make sure the compiler you are USING is mingw from your mingw installation and NOT from R tools. If you are unsure, please run the following command in an R session:</strong></p>\n\n<pre><code>system('gcc -v')\n</code></pre>\n\n<p><strong>This should answer you something similar (pointing to your mingw installation, NOT R tools) like:</strong></p>\n\n<pre><code>Using built-in specs.\nCOLLECT_GCC=C:\\PROGRA~1\\MINGW-~1\\X86_64~1.0-P\\mingw64\\bin\\gcc.exe\nCOLLECT_LTO_WRAPPER=C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/5.3.0/lto-wrapper.exe\nTarget: x86_64-w64-mingw32\nConfigured with: ../../../src/gcc-5.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64 --with-gxx-include-dir=/mingw64/x86_64-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-isl-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/include -I/c/mingw530/prerequisites/x86_64-zlib-static/include -I/c/mingw530/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/include -I/c/mingw530/prerequisites/x86_64-zlib-static/include -I/c/mingw530/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/lib -L/c/mingw530/prerequisites/x86_64-zlib-static/lib -L/c/mingw530/prerequisites/x86_64-w64-mingw32-static/lib '\nThread model: posix\ngcc version 5.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) \n</code></pre>\n\n<p>Tested in MRO 3.3.0 (I wanted a clean installation to check if there were any errors), but I also use this for the regular R version 3.3.1 without any error.</p>\n\n<h1>Compilation of binaries</h1>\n\n<p>First, the typical commands (create a folder in C:/xgboost/xgboost):</p>\n\n<pre><code>mkdir C:/xgboost/xgboost\ncd C:/xgboost\ngit clone --recursive https://github.com/dmlc/xgboost\ncd xgboost\ngit submodule init\ngit submodule update\nalias make='mingw32-make'\ncd dmlc-core\nmake\ncd ../rabit\nmake lib/librabit_empty.a\ncd ..\n</code></pre>\n\n<p>Now, we will have manual steps to cover.</p>\n\n<p><em>Optional step (if you want to be safe): go to C:\\xgboost\\xgboost\\make, copy mingw64.mk, and name it mingw64_min.mk. Open that file in Notepad. Comment the last two lines (DMLC_CFLAGS and ADD_CFLAGS).</em></p>\n\n<p>Mandatory step: go to C:\\xgboost\\xgboost, copy and paste Makefile, and open the current Makefile. Replace all existing &quot;$(MAKE)&quot; by &quot;mingw32-make&quot;.</p>\n\n<p>Run the following commands in the GitHub Bash:</p>\n\n<pre><code>cp make/mingw64_min.mk config.mk\nmake\n</code></pre>\n\n<p>No error should arise, unless your mingw installation is broken somewhere. You must have it in your PATH.</p>\n\n<h1>Compilation for R</h1>\n\n<p>This is where it gets complicated. Make sure you have the administrator rights in your current Windows session.</p>\n\n<p>Open an R session as administrator, and run the following commands:</p>\n\n<pre><code>setwd('C:/xgboost/xgboost/R-package')\nlibrary(devtools)\ninstall()\n</code></pre>\n\n<p><strong>You should get an error about permissions (if it compiles without whining about permissions, then perfect).</strong> Still all good, it copied a lot of files we need to compile the R package. Go to C:\\xgboost\\xgboost\\R-package, right-click on the &quot;src&quot; folder, select &quot;Properties&quot;.</p>\n\n<ul>\n<li>Under the &quot;Security&quot; tab, click &quot;Edit&quot;</li>\n<li>Click &quot;Full control&quot; to all group or user names (click on each group, click Full control for each)</li>\n<li>Click OK twice</li>\n<li>Right-click on the &quot;src&quot; folder, select &quot;Properties&quot;</li>\n<li>Under the &quot;Security&quot; tab, click &quot;Advanced&quot;</li>\n<li>Check &quot;Replace all child object permission entries with inheritable permission entries from this object&quot; (it is the last box at the bottom left of the opened tab).</li>\n<li>Click OK twice</li>\n</ul>\n\n<p>Run the following command:</p>\n\n<pre><code>install()\n</code></pre>\n\n<p>Success, you installed xgboost in Windows! If it is still NOT working for some reason (for instance you are seeing double //), open C:\\xgboost\\xgboost\\R-package\\src\\Makevars.win with Notepad++, and remove the leading slash from all the -I$(PKGROOT) on line 25.</p>\n\n<p>If you want to test xgboost, run this:</p>\n\n<pre><code>library(xgboost)\nset.seed(11111)\nn=100\nncov=4\nz=matrix(replicate(n,rnorm(ncov)),nrow=n)\nalpha=c(-1,0.5,-0.25,-0.1)\nza=z%*%alpha\np=exp(za)/(1+exp(za))\nt=rbinom(n,1,p)\nxgb.train(list(objective=&quot;binary:logitraw&quot;), xgb.DMatrix(data=z,label=t), nrounds=10)\n</code></pre>",
      "votes": null,
      "replies": []
    },
    {
      "id": 130062,
      "author_name": "laurae2",
      "author_url": "",
      "post_date": "08/03/2016 14:43:17",
      "content": "<p>I am providing the verbose log here if needed for all the steps (no &quot;spoiler&quot; tag, and this makes Kaggle provide an error when trying to post &gt;_&gt;).</p>\n\n<p>On this link: <a href=\"http://pastebin.com/JasBcZ5N\">http://pastebin.com/JasBcZ5N</a> (can't post it apparently, Kaggle refuses the post?)</p>\n\n<p>Search for &quot;**&quot; to check the step you are in to see if it matches (approximately) what you have, and if it does not compile you can pinpoint where it stopped and what is the reason behind.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 130065,
      "author_name": "cpmpml",
      "author_url": "",
      "post_date": "08/03/2016 14:58:55",
      "content": "<p>@Laurae, he is using the compiler from rtools, which is why he has issues IMHO.  I made the same remark as you.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 130067,
      "author_name": "juliencs",
      "author_url": "",
      "post_date": "08/03/2016 15:01:01",
      "content": "<p>You both nailed it, it wasn't the right compiler being used! Modified my PATH variable to have mingw ahead of Rtools, and the install worked like a charm. I've only tried the Python install.</p>\n\n<p>Hopefully other people arriving on this thread by googling these error messages won't lose as much time as I did on this problem.</p>\n\n<p>A big thank you to both of you.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 130068,
      "author_name": "laurae2",
      "author_url": "",
      "post_date": "08/03/2016 15:06:39",
      "content": "<p>[quote=juliencs;130067]</p>\n\n<p>You both nailed it, it wasn't the right compiler being used! Modified my PATH variable to have mingw ahead of Rtools, and the install worked like a charm. I've only tried the Python install.</p>\n\n<p>Hopefully other people arriving on this thread by googling these error messages won't lose as much time as I did on this problem.</p>\n\n<p>A big thank you to both of you.</p>\n\n<p>[/quote]</p>\n\n<p>That's great if you managed to compile and install it! Good 2 days of work :p</p>\n\n<p>You can now put back Rtools first if you need Rtools to be first when using R after you compiled/installed xgboost properly. Some R packages might break if it is not first (because these packages need compilation on the fly and are relying on Rtools before anything else).</p>\n\n<p>(tell us also if it installs in R properly if you are going to try to install it in R)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 130070,
      "author_name": "jeradrose",
      "author_url": "",
      "post_date": "08/03/2016 15:36:25",
      "content": "<p>[quote=Laurae;130062]\nOn this link: <a href=\"http://pastebin.com/JasBcZ5N\">http://pastebin.com/JasBcZ5N</a> (can't post it apparently, Kaggle refuses the post?)\n[/quote]</p>\n\n<p>@Laurae sorry about that. We just made an update to allow Expert+ tiers the ability to have longer posts. Try it again, and it should go through. #freeperks :)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 153942,
      "author_name": "qwikfix",
      "author_url": "",
      "post_date": "01/04/2017 06:18:51",
      "content": "<p>I am unfortunately not a R expert, hence cannot help you much if you insist on using tooling from rtools. This tooling may be just fine, it is just that I am not familiar with it.</p>\n\n<p>Thanks</p>\n\n<p><a href=\"http://driverrestore.com/\">Driver restore</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "129989": "Has anyone been able to install xgboost on Windows **recently** (like this last month) ? \r\n\r\nI've been trying for the better part of 2 days now, following pretty much every set of instructions I could find on the web (including Kaggle forums). In the end, I feel like the current xgboost Windows installation procedure may be broken, but the fact that no one is talking about it in here makes me feel the problem might still be on my end.\r\n\r\nWithout xgboost I feel like I can't compete on equal footing with everybody else, it kinda kills the motivation.",
    "130004": "If you are using R, use the following:\r\n\r\n    install.packages(\"drat\", repos=\"https://cran.rstudio.com\")\r\n    drat:::addRepo(\"dmlc\")\r\n    install.packages(\"xgboost\", repos=\"http://dmlc.ml/drat/\", type=\"source\")\r\n\r\nWindows installation is slightly broken, although it is (really) compilable locally if you are using the right set of tools.\r\n\r\nThose are instructions for compiling xgboost in Windows, but if they are not working tell me so I can push an update accordingly as I didn't check whether the most recent versions have an issue: https://github.com/dmlc/xgboost/tree/master/R-package (you can also raise an issue in xgboost's GitHub)\r\n\r\nIf both drat and local compilation fails, you are left using premade packages: CRAN's xgboost and pip's xgboost (which have less functionalities but are guaranteed to work). On Windows, this is guaranteed to work 100% if you didn't make any bad changes to your Windows installation.",
    "130007": "I was struggling with installing xgboost in my windows system as well before I found the below link\r\n\r\nhttps://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en\r\n\r\nThe instructions are specific to the python installation Anaconda.",
    "130026": "[quote=Laurae;130004]\r\nWindows installation is slightly broken, although it is (really) compilable locally if you are using the right set of tools.\r\n\r\nThose are instructions for compiling xgboost in Windows, but if they are not working tell me so I can push an update accordingly as I didn't check whether the most recent versions have an issue\r\n[/quote]\r\n\r\nFirst of all, thanks for the quick answer. Using R the way you suggested, I still get the same errors, which are :\r\n\r\n--\r\n\r\n> c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:396:83:\r\n> error: 'FILE* std::fopen(const char*, const char*)' should have been\r\n> declared inside 'std'\r\n> \r\n> c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:396:83:\r\n> error: declaration of 'FILE* std::fopen(const char*, const char*)'\r\n> \r\n> c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:395:17:\r\n> error: conflicts with previous declaration 'FILE* fopen(const char*,\r\n> const char*)'\r\n> \r\n> make: *** [amalgamation/xgboost-all0.o] Error 1\r\n> \r\n> Warning: l'exécution de la commande 'make -f \"Makevars.win\" -f\r\n> \"C:/PROGRA~1/R/R-32~1.4/etc/x64/Makeconf\" -f\r\n> \"C:/PROGRA~1/R/R-32~1.4/share/make/winshlib.mk\" CXX='$(CXX1X)\r\n> $(CXX1XSTD)' CXXFLAGS='$(CXX1XFLAGS)' CXXPICFLAGS='$(CXX1XPICFLAGS)'\r\n> SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)' SHLIB_LD='$(SHLIB_CXX1XLD)'\r\n> SHLIB=\"xgboost.dll\" WIN=64 TCLBIN=64 ' renvoie un statut 2\r\n> \r\n> ERROR: compilation failed for package 'xgboost'\r\n> \r\n> * removing 'C:/Program Files/R/R-3.2.4/library/xgboost'\r\n> \r\n> Warning in install.packages :\r\n> \r\n>   running command '\"C:/PROGRA~1/R/R-32~1.4/bin/x64/R\" CMD INSTALL -l\r\n> \"C:\\Program Files\\R\\R-3.2.4\\library\"\r\n> C:\\Users\\Julien\\AppData\\Local\\Temp\\RtmpUHxmwL/downloaded_packages/xgboost_0.4-4.tar.gz'\r\n> had status 1\r\n> \r\n> Warning in install.packages :\r\n> \r\n> installation of package ‘xgboost’ had non-zero exit status\r\n\r\n--\r\n\r\n\r\nI'm notifying it to you as you suggested. Now I'm going to check those premade packages, crossing fingers...\r\n\r\n[quote=Anupam Shrivastava;130007]\r\n\r\nI was struggling with installing xgboost in my windows system as well before I found the below link\r\n\r\nhttps://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en\r\n\r\nThe instructions are specific to the python installation Anaconda.\r\n\r\n[/quote]\r\n\r\nThank you, unfortunately I already tried this one, I believe it worked at that moment in time, but not anymore (it seems).",
    "130035": "juliencs, what are the errors you get with https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en ?",
    "130049": "First errors  are the same ones as the ones I had with the R install (see my previous post), plus a whole lot more, I'll paste the whole thing below (tried some formatting on the text but still looks ugly). It's on a fresh installation of Anaconda, I uninstalled anything Python-related before resinstalling Anaconda. Error happens on the 'make -j4' step inside the dmlc-core folder.\r\n\r\n> In file included from  \r\n> c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/              \r\n> ../../../../include/c++/4.6.3/cstdio:44:0,  \r\n>                  from include/dmlc/io.h:8,  \r\n>                  from src/io.cc:4:   \r\n c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-m\r\n> ingw32/include/stdio.h:396:83: error: 'FILE* std::fopen(const char*,\r\n> const char*                  )' should have been declared inside 'std'  \r\n> c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-m\r\n> ingw32/include/stdio.h:396:83: error: declaration of 'FILE*\r\n> std::fopen(const cha                  r*, const char*)'  \r\n> c:\\rtools\\gcc-4.6.3\\bin\\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-m\r\n> ingw32/include/stdio.h:395:17: error: conflicts with previous\r\n> declaration 'FILE*                   fopen(const char*, const char*)'  \r\n> src/io/input_split_base.cc: In member function 'void\r\n> dmlc::io::InputSplitBase::I                  nitInputFileInfo(const\r\n> string&)':    \r\nsrc/io/input_split_base.cc:112:12: warning: variable\r\n> 'exact_match' set but not u                  sed\r\n> [-Wunused-but-set-variable]   \r\nIn file included from  \r\n> src/io/cached_input_split.h:16:0,\r\n>                  from src/io.cc:13:   \r\ninclude/dmlc/threadediter.h:210:3: error: 'thread' in namespace 'std' does not n                  ame a\r\n> type  \r\n include/dmlc/threadediter.h:216:3: error: 'mutex' in namespace\r\n> 'std' does not na                  me a type  \r\n> include/dmlc/threadediter.h:222:3: error: 'condition_variable' in\r\n> namespace 'std                  ' does not name a type\r\n> include/dmlc/threadediter.h:224:3: error: 'condition_variable' in\r\n> namespace 'std                  ' does not name a type  \r\n> include/dmlc/threadediter.h: In constructor\r\n> 'dmlc::ThreadedIter<DType>::Threaded                  Iter(size_t)':  \r\n> include/dmlc/threadediter.h:82:9: error: class\r\n> 'dmlc::ThreadedIter<DType>' does                   not have any field\r\n> named 'producer_thread_'   \r\ninclude/dmlc/threadediter.h: In member\r\n> function 'virtual void dmlc::ThreadedIter                 \r\n> <DType>::BeforeFirst()':   \r\ninclude/dmlc/threadediter.h:168:5: error:\r\n> 'unique_lock' is not a member of 'std'  \r\n> include/dmlc/threadediter.h:168:22: error: 'mutex' is not a member of\r\n> 'std'   \r\ninclude/dmlc/threadediter.h:168:39: error: 'mutex_' was not\r\n> declared in this sco                  pe  \r\n> include/dmlc/threadediter.h:168:45: error: there are no arguments to\r\n> 'lock' that                   depend on a template parameter, so a\r\n> declaration of 'lock' must be available [-fpermissive]     \r\ninclude/dmlc/threadediter.h:168:45: note: (if you use\r\n> '-fpermissive', G++ will a                  ccept your code, but\r\n> allowing the use of an undeclared name is deprecated)  \r\n> include/dmlc/threadediter.h:178:7: error: 'producer_cond_' was not\r\n> declared in t                  his scope  \r\n> include/dmlc/threadediter.h:182:5: error: 'consumer_cond_' was not\r\n> declared in t                  his scope  \r\n> include/dmlc/threadediter.h:182:25: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h:189:17: error: 'producer_cond_'\r\n> was not declared in                   this scope  \r\n> include/dmlc/threadediter.h: In member function 'void\r\n> dmlc::ThreadedIter<DType>:                  :Destroy()':  \r\n> include/dmlc/threadediter.h:236:7: error: 'producer_thread_' was not\r\n> declared in                   this scope  \r\n> include/dmlc/threadediter.h:239:7: error: 'lock_guard' is not a member\r\n> of 'std'   \r\ninclude/dmlc/threadediter.h:239:23: error: 'mutex' is not a\r\n> member of 'std'   \r\ninclude/dmlc/threadediter.h:239:40: error: 'mutex_'\r\n> was not declared in this sco                  pe  \r\n> include/dmlc/threadediter.h:239:46: error: there are no arguments to\r\n> 'lock' that                   depend on a template parameter, so a\r\n> declaration of 'lock' must be available [-fpermissive]   \r\ninclude/dmlc/threadediter.h:243:9: error:\r\n> 'producer_cond_' was not declared in t                  his scope  \r\n> include/dmlc/threadediter.h: In lambda function:  \r\n> include/dmlc/threadediter.h:295:9: error: 'unique_lock' is not a\r\n> member of 'std'   \r\ninclude/dmlc/threadediter.h:295:26: error: 'mutex' is\r\n> not a member of 'std'   \r\ninclude/dmlc/threadediter.h:295:43: error:\r\n> 'mutex_' was not declared in this sco                  pe  \r\n> include/dmlc/threadediter.h:295:49: error: there are no arguments to\r\n> 'lock' that                   depend on a template parameter, so a\r\n> declaration of 'lock' must be available [-fpermissive]  \r\n include/dmlc/threadediter.h:297:9: error:\r\n> 'producer_cond_' was not declared in t                  his scope  \r\n> include/dmlc/threadediter.h:297:29: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h:326:11: error: 'consumer_cond_'\r\n> was not declared in                   this scope  \r\n> include/dmlc/threadediter.h:333:11: error: 'consumer_cond_' was not\r\n> declared in                   this scope  \r\n> include/dmlc/threadediter.h:343:9: error: 'lock_guard' is not a member\r\n> of 'std'   \r\ninclude/dmlc/threadediter.h:343:25: error: 'mutex' is not a\r\n> member of 'std'   \r\ninclude/dmlc/threadediter.h:343:42: error: 'mutex_'\r\n> was not declared in this sco                  pe  \r\n> include/dmlc/threadediter.h:343:48: error: there are no arguments to\r\n> 'lock' that                   depend on a template parameter, so a\r\n> declaration of 'lock' must be available [-fpermissive]   \r\ninclude/dmlc/threadediter.h:352:19: error:\r\n> 'consumer_cond_' was not declared in                   this scope  \r\n> include/dmlc/threadediter.h: In member function 'void\r\n> dmlc::ThreadedIter<DType>:                 \r\n> :Init(std::function<bool(DType**)>, std::function<void()>)':  \r\n> include/dmlc/threadediter.h:355:3: error: 'producer_thread_' was not\r\n> declared in                   this scope  \r\n> include/dmlc/threadediter.h:355:26: error: expected type-specifier  \r\n> include/dmlc/threadediter.h:355:26: error: expected ';'  \r\n> include/dmlc/threadediter.h: In member function 'bool\r\n> dmlc::ThreadedIter<DType>:                  :Next(DType**)':  \r\n> include/dmlc/threadediter.h:362:3: error: 'unique_lock' is not a\r\n> member of 'std'   \r\ninclude/dmlc/threadediter.h:362:20: error: 'mutex' is\r\n> not a member of 'std'   \r\ninclude/dmlc/threadediter.h:362:37: error:\r\n> 'mutex_' was not declared in this sco                  pe  \r\n> include/dmlc/threadediter.h:362:43: error: there are no arguments to\r\n> 'lock' that                   depend on a template parameter, so a\r\n> declaration of 'lock' must be available [-fpermissive]   \r\ninclude/dmlc/threadediter.h:366:3: error:\r\n> 'consumer_cond_' was not declared in t                  his scope  \r\n> include/dmlc/threadediter.h:366:23: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h:375:17: error: 'producer_cond_'\r\n> was not declared in                   this scope  \r\n> include/dmlc/threadediter.h: In member function 'void\r\n> dmlc::ThreadedIter<DType>:                  :Recycle(DType**)':  \r\n> include/dmlc/threadediter.h:387:5: error: 'lock_guard' is not a member\r\n> of 'std'   \r\ninclude/dmlc/threadediter.h:387:21: error: 'mutex' is not a\r\n> member of 'std'   \r\ninclude/dmlc/threadediter.h:387:38: error: 'mutex_'\r\n> was not declared in this sco                  pe  \r\n> include/dmlc/threadediter.h:387:44: error: there are no arguments to\r\n> 'lock' that                   depend on a template parameter, so a\r\n> declaration of 'lock' must be available [-fpermissive]   \r\ninclude/dmlc/threadediter.h:392:15: error:\r\n> 'producer_cond_' was not declared in                   this scope  \r\n> include/dmlc/threadediter.h: In member function 'void\r\n> dmlc::ThreadedIter<DType>:                  :Destroy() [with DType =\r\n> dmlc::io::InputSplitBase::Chunk]': src/io/cached_input_split.h:58:26: \r\n> instantiated from here   \r\ninclude/dmlc/threadediter.h:239:7: error:\r\n> 'lock' was not declared in this scope   \r\ninclude/dmlc/threadediter.h: In\r\n> member function 'void dmlc::ThreadedIter<DType>:                 \r\n> :Recycle(DType**) [with DType = dmlc::io::InputSplitBase::Chunk]':\r\n> src/io/cached_input_split.h:68:43:   instantiated from here  \r\n> include/dmlc/threadediter.h:387:5: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h: In member function 'bool\r\n> dmlc::ThreadedIter<DType>:                  :Next(DType**) [with DType\r\n> = dmlc::io::InputSplitBase::Chunk]': src/io/cached_input_split.h:70:45:   instantiated from here  \r\n> include/dmlc/threadediter.h:362:3: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h: In member function 'void\r\n> dmlc::ThreadedIter<DType>:                  :BeforeFirst() [with DType\r\n> = dmlc::io::InputSplitBase::Chunk]': src/io/cached_input_split.h:81:32:   instantiated from here  \r\n> include/dmlc/threadediter.h:168:5: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h: In lambda function:  \r\n> include/dmlc/threadediter.h:290:36:   instantiated from\r\n> 'dmlc::ThreadedIter<DTyp                 \r\n> e>::Init(std::function<bool(DType**)>, std::function<void()>) [with\r\n> DType = dmlc                 \r\n> ::io::InputSplitBase::Chunk]::<lambda()>'  \r\n> include/dmlc/threadediter.h:354:3:   instantiated from 'void\r\n> dmlc::ThreadedIter<                 \r\n> DType>::Init(std::function<bool(DType**)>, std::function<void()>)\r\n> [with DType =                   dmlc::io::InputSplitBase::Chunk]'\r\n> src/io/cached_input_split.h:160:6:   instantiated from here  \r\n> include/dmlc/threadediter.h:295:9: error: 'lock' was not declared in\r\n> this scope   \r\ninclude/dmlc/threadediter.h:290:36:   instantiated from\r\n> 'dmlc::ThreadedIter<DTyp                 \r\n> e>::Init(std::function<bool(DType**)>, std::function<void()>) [with\r\n> DType = dmlc                 \r\n> ::io::InputSplitBase::Chunk]::<lambda()>'  \r\n> include/dmlc/threadediter.h:354:3:   instantiated from 'void\r\n> dmlc::ThreadedIter<                 \r\n> DType>::Init(std::function<bool(DType**)>, std::function<void()>)\r\n> [with DType =                   dmlc::io::InputSplitBase::Chunk]'\r\n> src/io/cached_input_split.h:160:6:   instantiated from here  \r\n> include/dmlc/threadediter.h:343:9: error: 'lock' was not declared in\r\n> this scope   \r\nMakefile:75: recipe for target 'io.o' failed   \r\nmingw32-make: *** [io.o] Error 1   \r\nmingw32-make: *** Waiting for unfinished jobs....",
    "130056": "juliencs, are you sure you have aliased make to be the one provided by mingw?  I am asking because your c++ compiler comes from rtools.  I guess that's why you are having issues.\r\n\r\nI am unfortunately not a R expert, hence cannot help you much if you insist on using tooling from rtools.  This tooling may be just fine, it is just that I am not familiar with it.",
    "130060": "Hello,\r\n\r\n(long post)\r\n\r\nPlease use the following instructions and tell me if it is working in bash (use GitHub Bash to make sure you are using the right one).\r\n\r\n**Before trying to do something, make sure the compiler you are USING is mingw from your mingw installation and NOT from R tools. If you are unsure, please run the following command in an R session:**\r\n\r\n    system('gcc -v')\r\n\r\n**This should answer you something similar (pointing to your mingw installation, NOT R tools) like:**\r\n\r\n    Using built-in specs.\r\n    COLLECT_GCC=C:\\PROGRA~1\\MINGW-~1\\X86_64~1.0-P\\mingw64\\bin\\gcc.exe\r\n    COLLECT_LTO_WRAPPER=C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/5.3.0/lto-wrapper.exe\r\n    Target: x86_64-w64-mingw32\r\n    Configured with: ../../../src/gcc-5.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64 --with-gxx-include-dir=/mingw64/x86_64-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-isl-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw530/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/include -I/c/mingw530/prerequisites/x86_64-zlib-static/include -I/c/mingw530/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/include -I/c/mingw530/prerequisites/x86_64-zlib-static/include -I/c/mingw530/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw530/x86_64-530-posix-seh-rt_v4-rev0/mingw64/opt/lib -L/c/mingw530/prerequisites/x86_64-zlib-static/lib -L/c/mingw530/prerequisites/x86_64-w64-mingw32-static/lib '\r\n    Thread model: posix\r\n    gcc version 5.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) \r\n\r\nTested in MRO 3.3.0 (I wanted a clean installation to check if there were any errors), but I also use this for the regular R version 3.3.1 without any error.\r\n\r\n# Compilation of binaries #\r\n\r\nFirst, the typical commands (create a folder in C:/xgboost/xgboost):\r\n\r\n    mkdir C:/xgboost/xgboost\r\n    cd C:/xgboost\r\n    git clone --recursive https://github.com/dmlc/xgboost\r\n    cd xgboost\r\n    git submodule init\r\n    git submodule update\r\n    alias make='mingw32-make'\r\n    cd dmlc-core\r\n    make\r\n    cd ../rabit\r\n    make lib/librabit_empty.a\r\n    cd ..\r\n\r\nNow, we will have manual steps to cover.\r\n\r\n*Optional step (if you want to be safe): go to C:\\xgboost\\xgboost\\make, copy mingw64.mk, and name it mingw64_min.mk. Open that file in Notepad. Comment the last two lines (DMLC_CFLAGS and ADD_CFLAGS).*\r\n\r\nMandatory step: go to C:\\xgboost\\xgboost, copy and paste Makefile, and open the current Makefile. Replace all existing \"$(MAKE)\" by \"mingw32-make\".\r\n\r\nRun the following commands in the GitHub Bash:\r\n\r\n    cp make/mingw64_min.mk config.mk\r\n    make\r\n\r\nNo error should arise, unless your mingw installation is broken somewhere. You must have it in your PATH.\r\n\r\n# Compilation for R #\r\n\r\nThis is where it gets complicated. Make sure you have the administrator rights in your current Windows session.\r\n\r\nOpen an R session as administrator, and run the following commands:\r\n\r\n    setwd('C:/xgboost/xgboost/R-package')\r\n    library(devtools)\r\n    install()\r\n\r\n**You should get an error about permissions (if it compiles without whining about permissions, then perfect).** Still all good, it copied a lot of files we need to compile the R package. Go to C:\\xgboost\\xgboost\\R-package, right-click on the \"src\" folder, select \"Properties\".\r\n\r\n* Under the \"Security\" tab, click \"Edit\"\r\n* Click \"Full control\" to all group or user names (click on each group, click Full control for each)\r\n* Click OK twice\r\n* Right-click on the \"src\" folder, select \"Properties\"\r\n* Under the \"Security\" tab, click \"Advanced\"\r\n* Check \"Replace all child object permission entries with inheritable permission entries from this object\" (it is the last box at the bottom left of the opened tab).\r\n* Click OK twice\r\n\r\nRun the following command:\r\n\r\n    install()\r\n\r\nSuccess, you installed xgboost in Windows! If it is still NOT working for some reason (for instance you are seeing double //), open C:\\xgboost\\xgboost\\R-package\\src\\Makevars.win with Notepad++, and remove the leading slash from all the -I$(PKGROOT) on line 25.\r\n\r\nIf you want to test xgboost, run this:\r\n\r\n    library(xgboost)\r\n    set.seed(11111)\r\n    n=100\r\n    ncov=4\r\n    z=matrix(replicate(n,rnorm(ncov)),nrow=n)\r\n    alpha=c(-1,0.5,-0.25,-0.1)\r\n    za=z%*%alpha\r\n    p=exp(za)/(1+exp(za))\r\n    t=rbinom(n,1,p)\r\n    xgb.train(list(objective=\"binary:logitraw\"), xgb.DMatrix(data=z,label=t), nrounds=10)",
    "130062": "I am providing the verbose log here if needed for all the steps (no \"spoiler\" tag, and this makes Kaggle provide an error when trying to post >_>).\r\n\r\nOn this link: http://pastebin.com/JasBcZ5N (can't post it apparently, Kaggle refuses the post?)\r\n\r\nSearch for \"**\" to check the step you are in to see if it matches (approximately) what you have, and if it does not compile you can pinpoint where it stopped and what is the reason behind.",
    "130065": "Laurae, he is using the compiler from rtools, which is why he has issues IMHO.  I made the same remark as you.",
    "130067": "You both nailed it, it wasn't the right compiler being used! Modified my PATH variable to have mingw ahead of Rtools, and the install worked like a charm. I've only tried the Python install.\r\n\r\nHopefully other people arriving on this thread by googling these error messages won't lose as much time as I did on this problem.\r\n\r\nA big thank you to both of you.",
    "130068": "[quote=juliencs;130067]\r\n\r\nYou both nailed it, it wasn't the right compiler being used! Modified my PATH variable to have mingw ahead of Rtools, and the install worked like a charm. I've only tried the Python install.\r\n\r\nHopefully other people arriving on this thread by googling these error messages won't lose as much time as I did on this problem.\r\n\r\nA big thank you to both of you.\r\n\r\n[/quote]\r\n\r\nThat's great if you managed to compile and install it! Good 2 days of work :p\r\n\r\nYou can now put back Rtools first if you need Rtools to be first when using R after you compiled/installed xgboost properly. Some R packages might break if it is not first (because these packages need compilation on the fly and are relying on Rtools before anything else).\r\n\r\n(tell us also if it installs in R properly if you are going to try to install it in R)",
    "130070": "[quote=Laurae;130062]\r\nOn this link: http://pastebin.com/JasBcZ5N (can't post it apparently, Kaggle refuses the post?)\r\n[/quote]\r\n\r\n@Laurae sorry about that. We just made an update to allow Expert+ tiers the ability to have longer posts. Try it again, and it should go through. #freeperks :)",
    "153942": "I am unfortunately not a R expert, hence cannot help you much if you insist on using tooling from rtools. This tooling may be just fine, it is just that I am not familiar with it.\r\n\r\nThanks\r\n\r\n[Driver restore][1]\r\n\r\n\r\n  [1]: http://driverrestore.com/"
  },
  "source": "meta"
}