[R-pkg-devel] Rtools not communicating?

Duncan Murdoch murdoch.duncan at gmail.com
Sat Nov 18 01:46:13 CET 2017

On 17/11/2017 5:19 PM, Dalthorp, Daniel wrote:
> Dear all,
> I have used devtools with success and pleasure to build packages in the
> past, but everything has changed recently. No success using build(binary =
> T) in Windows 7 (with rtools34 and R-3.4.2). MANY hours searching for
> solutions. Can someone help me?
> In particular, I use devtools::build(binary = T) to build a package (called
> CPparms) and devtools::install(). Then ls('package:CPparms') returns
> character(0), indicating that there is nothing in my package.

That says that your package is on the search list (or you would have got

Error in as.environment(pos) :
   no item called "package:CPparms" on the search list

like me), but it isn't exporting anything.  That's different than having 
nothing in your package.

> Is it mis-communication between R and Rtools?
> build(binary = T) tells me it is "installing *source* package" but
> shouldn't it be building a binary package first?

No.  A binary package is essentially an copy of an installed package.

Looks like you didn't export anything.  If you were building packages in 
the regular way (as described in the manuals), I'd suggest looking in 
the NAMESPACE file to be sure that something is being exported.  But 
you're using devtools, so I don't know if that will be informative.

Duncan Murdoch

> Sys.getenv('PATH') gives the following items that are related to R and
> Rtools:
> c:\Rtools\bin;c:\Rtools\mingw_32\bin;...c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;c:\Program
> Files\R\R-3.4.2\bin\x64;...c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;c:\Progra~1\R\R-3.0.2\bin\x64;
> The first two items seem to be OK, but I don't not see
> c:\Rtools\gcc-4.6.3\bin in my Window Explorer. Also, the path names for my
> R-3.4.2 and R-3.0.2 are formatted differently.
> R seems to know how to find Rtools:
>> system('g++ -v')
> Using built-in specs.
> COLLECT_GCC=c:\Rtools\mingw_32\bin\G__~1.EXE
> COLLECT_LTO_WRAPPER=c:/Rtools/mingw_32/bin/../libexec/gcc/i686-w64-mingw32/4.9.3/lto-wrapper.exe
> Target: i686-w64-mingw32
> Configured with: ../../../src/gcc-4.9.3/configure --host=i686-w64-mingw32
> --build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32
> --with-sysroot=/home/Jeroen/mingw-gcc-4.9.3/i686-493-posix-dwarf-rt_v3-s/mingw32
> --with-gxx-include-dir=/mingw32/i686-w64-mingw32/include/c++
> --enable-static --disable-shared --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-sjlj-exceptions
> --with-dwarf2 --disable-isl-version-check --disable-cloog-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=i686
> --with-tune=generic --with-libiconv --with-system-zlib
> --with-gmp=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static
> --with-mpfr=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static
> --with-mpc=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static
> --with-isl=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static
> --with-cloog=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static
> --enable-cloog-backend=isl --with-pkgversion='i686-posix-dwarf, Built by
> MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64
> CFLAGS='-O2 -pipe
> -I/home/Jeroen/mingw-gcc-4.9.3/i686-493-posix-dwarf-rt_v3-s/mingw32/opt/include
> -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-zlib-static/include
> -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static/include'
> CXXFLAGS='-O2 -pipe
> -I/home/Jeroen/mingw-gcc-4.9.3/i686-493-posix-dwarf-rt_v3-s/mingw32/opt/include
> -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-zlib-static/include
> -I/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static/include'
> -L/home/Jeroen/mingw-gcc-4.9.3/i686-493-posix-dwarf-rt_v3-s/mingw32/opt/lib
> -L/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-zlib-static/lib
> -L/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i686-w64-mingw32-static/lib
> -Wl,--large-address-aware'
> Thread model: posix
> gcc version 4.9.3 (i686-posix-dwarf, Built by MinGW-W64 project)
> Any suggestions?
> Thanks.

More information about the R-package-devel mailing list