Rubén Roa
2011-Nov-17 08:54 UTC
[R] RV: Reporting a conflict between ADMB and Rtools on Windows systems
De: Rubén Roa Enviado el: jueves, 17 de noviembre de 2011 9:53 Para: 'Users@admb-project.org' Asunto: Reporting a conflict between ADMB and Rtools on Windows systems Hi, I have to work under Windows, it's a company policy. I've just found that there is a conflict between tools used to build R packages (Rtools) and ADMB due to the need to put Rtools compiler's location in the PATH environmental variable to make Rtools work. On a Windows 7 64bit with Rtools installed I installed ADMB-IDE latest version and although I could translate ADMB code to cpp code I could not build the cpp code into an executable via ADMB-IDE's compiler. On another Windows machine, a Windows Vista 32bits with Rtools installed I also installed the latest ADMB-IDE and this time it was not possible to create the .obj file on the way to build the executable when building with ADMB-IDE. On this machine I also have a previous ADMB version (6.0.1) that I used to run from the DOS shell. This ADMB also failed to build the .obj file. Now, going to PATH, the location info to make Rtools is: c:\Rtools\bin;c:\Rtools\MinGW\bin;c:\Rtools\MinGW64\bin;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin; If from this list I remove the reference to the compiler c:\Rtools\MinGW\bin then ADMB works again. So beware of this conflict. Suggestion of a solution will be appreciated. Meanwhile, I run ADMB code in one computer and build R packages with Rtools in another computer. Best Ruben -- Dr. Ruben H. Roa-Ureta Senior Researcher, AZTI Tecnalia, Marine Research Division, Txatxarramendi Ugartea z/g, 48395, Sukarrieta, Bizkaia, Spain [[alternative HTML version deleted]]
Jan van der Laan
2011-Nov-17 09:24 UTC
[R] RV: Reporting a conflict between ADMB and Rtools on Windows systems
I assume you use a command window to build your packages. One possible solution might be to leave out the path variables set by Rtools from your global path and to create a separate shortcut to cmd for building r-packages where you set your path as needed by R CMD build/check Something like cmd /K "PATH c:\Rtools\bin;c:\Rtools\MinGW\bin;c:\Rtools\MinGW64\bin;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin" (I haven't tried this so it might need some tinkering to get it to actually work) HTH Jan On 17-11-2011 9:54, Rub?n Roa wrote:> > > De: Rub?n Roa > Enviado el: jueves, 17 de noviembre de 2011 9:53 > Para: 'Users at admb-project.org' > Asunto: Reporting a conflict between ADMB and Rtools on Windows systems > > > > Hi, > > > > I have to work under Windows, it's a company policy. > > > > I've just found that there is a conflict between tools used to build R packages (Rtools) and ADMB due to the need to put Rtools compiler's location in the PATH environmental variable to make Rtools work. > > > > On a Windows 7 64bit with Rtools installed I installed ADMB-IDE latest version and although I could translate ADMB code to cpp code I could not build the cpp code into an executable via ADMB-IDE's compiler. > > > > On another Windows machine, a Windows Vista 32bits with Rtools installed I also installed the latest ADMB-IDE and this time it was not possible to create the .obj file on the way to build the executable when building with ADMB-IDE. On this machine I also have a previous ADMB version (6.0.1) that I used to run from the DOS shell. This ADMB also failed to build the .obj file. > > > > Now, going to PATH, the location info to make Rtools is: > > c:\Rtools\bin;c:\Rtools\MinGW\bin;c:\Rtools\MinGW64\bin;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin; > > If from this list I remove the reference to the compiler > > c:\Rtools\MinGW\bin > > then ADMB works again. > > > > So beware of this conflict. Suggestion of a solution will be appreciated. Meanwhile, I run ADMB code in one computer and build R packages with Rtools in another computer. > > > > Best > > > > Ruben > > -- > > Dr. Ruben H. Roa-Ureta > > Senior Researcher, AZTI Tecnalia, > > Marine Research Division, > > Txatxarramendi Ugartea z/g, 48395, Sukarrieta, > > Bizkaia, Spain > > > > > [[alternative HTML version deleted]] > > > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Gabor Grothendieck
2011-Nov-17 12:58 UTC
[R] RV: Reporting a conflict between ADMB and Rtools on Windows systems
On Thu, Nov 17, 2011 at 3:54 AM, Rub?n Roa <rroa at azti.es> wrote:> > I've just found that there is a conflict between tools used to build R packages (Rtools) and ADMB due to the need to put Rtools compiler's location in the PATH environmental variable to make Rtools work. > > On a Windows 7 64bit ?with Rtools installed I installed ADMB-IDE latest version and although I could translate ADMB code to cpp code I could not build the cpp code into an executable via ADMB-IDE's compiler. > > On another Windows machine, a Windows Vista 32bits with Rtools installed I also installed the latest ADMB-IDE and this time it was not possible to create the .obj file on the way to build the executable when building with ADMB-IDE. On this machine I also have a previous ADMB version (6.0.1) that I used to run from the DOS shell. This ADMB also failed to build the .obj file. > > Now, going to PATH, the location info to make Rtools is: > c:\Rtools\bin;c:\Rtools\MinGW\bin;c:\Rtools\MinGW64\bin;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin; > If from this list I remove the reference to the compiler > c:\Rtools\MinGW\bin > then ADMB works again. > So beware of this conflict. Suggestion of a solution will be appreciated. Meanwhile, I run ADMB code in one computer and build R > packages with Rtools in another computer.The batchfiles Rcmd.bat, Rgui.bat temporarily add R and Rtools to your path by looking them up in the registry and then calling Rcmd.exe or Rgui.exe respectively. When R is finished the path is restored to what it was before. By using those its not necessary to have either on your path. These are self contained batch files with no dependencies so can simply be placed anywhere on the path in order to use them. For those and a few other batch files of interest to Windows users of R see: http://batchfiles.googlecode.com -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com