omegahat / RDCOMClient

GNU General Public License v2.0
77 stars 34 forks source link

R 4.1.2 and RDCOMClient Installation Fatal Error #47

Open vly12 opened 9 months ago

vly12 commented 9 months ago

Hi All,

My work system has moved from R studio 3.6.1 to Posit workbench, and I am running a session in R 4.1.2.

The R package RDCOMCLIENT isn't installing on this new setup, so I searched up this forum and I'm attempting the following direction from this comment:

https://github.com/omegahat/RDCOMClient/issues/36#issuecomment-1044657643

dir.create("/conf/linkage/output/File/pq_allocation/scripts/okay")

remotes::install_github("BSchamberger/RDCOMClient", ref = "main", lib = "/conf/linkage/output/File/pq_allocation/scripts/okay")

I'm getting an error which says:

In file included from COMError.cpp:1:0:
RCOMObject.h:23:10: fatal error: windows.h: No such file or directory
 #include <windows.h>
          ^~~~~~~~~~~
compilation terminated.
make: *** [/opt/R/4.1.2/lib/R/etc/Makeconf:175: COMError.o] Error 1
ERROR: compilation failed for package ‘RDCOMClient’
* removing ‘/conf/linkage/output/File/pq_allocation/scripts/okay/RDCOMClient’
Warning message:
In i.p(...) :
  installation of package ‘/tmp/RtmpoNQqvd/fileef484e587f/RDCOMClient_0.95-1.tar.gz’ had non-zero exit status

I further saw if I could write to the 'okay' folder, and I could.

cat("testing", file = '/conf/linkage/output/File/pq_allocation/scripts/okay/testing.txt')

This created a text file called 'testing' in the okay folder.

Can anyone help me on what is happening from above? I'm confused why it is stating that there is no such file or directory, when I am able to write to it.

The code reads from a csv file and sends out automated emails via outlook.

@duncantl I'm hoping you might be able to assist me, please? :)

lbertela commented 3 days ago

Hello, I've exactly the same problem here. Does anyone has found a solution ?

Thank you in advance !

dtemplelangTest commented 3 days ago

The issue is not whether the directory /conf/linkage/output..../okay/ exists. It is that the compiler cannot locate the file windows.h in it directories in which it is looking. This suggests that the Rtools suite provided on CRAN is not installed, correctly.

vly12 commented 2 days ago

Hello, I've exactly the same problem here. Does anyone has found a solution ?

Thank you in advance !

I got it working by installing an older version of RDCOMClient and its associated packages.

lbertela commented 2 days ago

@vly12 : Thanks! Do you know by any chance which older version of RDCOMClient you installed ?