Skip to content

Trying to install RDCOMClient on R 4.2.0 #37

Description

@spsanderson

I am trying to install RDCOMClient on R 4.2.0 This is what I get in the console:

R version 4.2.0 (2022-04-22 ucrt) -- "Vigorous Calisthenics"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.


> install.packages("RDCOMClient", repos = "http://www.omegahat.net/R")
Installing package into 'C:/Users/bha485/AppData/Local/R/win-library/4.2'
(as 'lib' is unspecified)
Warning: unable to access index for repository http://www.omegahat.net/R/bin/windows/contrib/4.2:
  cannot open URL 'http://www.omegahat.net/R/bin/windows/contrib/4.2/PACKAGES'
Package which is only available in source form, and may need
  compilation of C/C++/Fortran: 'RDCOMClient'
Do you want to attempt to install these from sources? (Yes/no/cancel) y
installing the source package 'RDCOMClient'

trying URL 'http://www.omegahat.net/R/src/contrib/RDCOMClient_0.93-0.tar.gz'
Content type 'application/x-gzip' length 49509 bytes (48 KB)
downloaded 48 KB

* installing *source* package 'RDCOMClient' ...
** using staged installation
** libs
g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-42~1.0/include" -DNDEBUG -D_GNU_ -DNO_PYCOM_IPROVIDECLASSINFO -I.    -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include"  -Wno-deprecated    -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c COMError.cpp -o COMError.o
COMError.cpp:347: warning: "_countof" redefined
  347 | #define _countof(array) (sizeof(array)/sizeof(array[0]))
      | 
In file included from c:\rtools42\x86_64-w64-mingw32.static.posix\lib\gcc\x86_64-w64-mingw32.static.posix\10.3.0\include\c++\cstdlib:75,
                 from c:\rtools42\x86_64-w64-mingw32.static.posix\lib\gcc\x86_64-w64-mingw32.static.posix\10.3.0\include\c++\stdlib.h:36,
                 from c:\rtools42\x86_64-w64-mingw32.static.posix\lib\gcc\x86_64-w64-mingw32.static.posix\10.3.0\include\mm_malloc.h:27,
                 from c:\rtools42\x86_64-w64-mingw32.static.posix\lib\gcc\x86_64-w64-mingw32.static.posix\10.3.0\include\xmmintrin.h:34,
                 from c:\rtools42\x86_64-w64-mingw32.static.posix\lib\gcc\x86_64-w64-mingw32.static.posix\10.3.0\include\immintrin.h:29,
                 from c:\rtools42\x86_64-w64-mingw32.static.posix\lib\gcc\x86_64-w64-mingw32.static.posix\10.3.0\include\x86intrin.h:32,
                 from c:\rtools42\x86_64-w64-mingw32.static.posix\include\winnt.h:1555,
                 from c:\rtools42\x86_64-w64-mingw32.static.posix\include\minwindef.h:163,
                 from c:\rtools42\x86_64-w64-mingw32.static.posix\include\windef.h:9,
                 from c:\rtools42\x86_64-w64-mingw32.static.posix\include\windows.h:69,
                 from RCOMObject.h:23,
                 from COMError.cpp:1:
c:\rtools42\x86_64-w64-mingw32.static.posix\include\stdlib.h:381: note: this is the location of the previous definition
  381 | #define _countof(_Array) sizeof(*__countof_helper(_Array))
      | 
In file included from COMError.cpp:1:
RCOMObject.h: In member function 'virtual ULONG RCOMObject::Release()':
RCOMObject.h:61:43: warning: deleting object of abstract class type 'RCOMObject' which has non-virtual destructor will cause undefined behavior [-Wdelete-non-virtual-dtor]
   61 |                                           delete this;
      |                                           ^~~~~~~~~~~
COMError.cpp: In function 'void GetScodeString(HRESULT, LPTSTR, int)':
COMError.cpp:371:16: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'HRESULT' {aka 'long int'} [-Wformat=]
  371 |  sprintf(buf, ("OLE error 0x%08x"), hr);
      |               ~^~~~~~~~~~~~~~~~~~~  ~~
      |                                     |
      |                                     HRESULT {aka long int}
COMError.cpp: In function 'HRESULT checkErrorInfo(IUnknown*, HRESULT, SEXPREC**)':
COMError.cpp:409:38: warning: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'HRESULT' {aka 'long int'} [-Wformat=]
  409 |   fprintf(stderr, "<checkErrorInfo> %X \n", status);
      |                                     ~^      ~~~~~~
      |                                      |      |
      |                                      |      HRESULT {aka long int}
      |                                      unsigned int
      |                                     %lX
COMError.cpp:470:4: error: 'PROBLEM' was not declared in this scope
  470 |    PROBLEM "%s", str
      |    ^~~~~~~
COMError.cpp:477:4: error: 'PROBLEM' was not declared in this scope
  477 |    PROBLEM "%s (%s)", str, FromBstr(ostr)
      |    ^~~~~~~
make: *** [C:/PROGRA~1/R/R-42~1.0/etc/x64/Makeconf:259: COMError.o] Error 1
ERROR: compilation failed for package 'RDCOMClient'
* removing 'C:/Users/bha485/AppData/Local/R/win-library/4.2/RDCOMClient'

The downloaded source packages are in
    'C:\Users\bha485\AppData\Local\Temp\RtmpOOxyJr\downloaded_packages'
Warning message:
In install.packages("RDCOMClient", repos = "http://www.omegahat.net/R") :
  installation of package 'RDCOMClient' had non-zero exit status

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions