cygwin warning when building R package

2019-05-26 03:41发布

I'm trying to build my own package using Windows. I installed everything I need, and running R CMD build mypackage and R CMD INSTALL mypackage seem to run fine. when I run the build command, though, I get a warning from cygwin:

cygwin warning:
  MS-DOS style path detected: C:/Documents and Settings/e_sander/My Documents/mypackage_1.0.tar.gz
  Preferred POSIX equivalent is: /cygdrive/c/Documents and Settings/e_sander/My Documents/mypackage_1.0.tar.gz
  CYGWIN environment variable option "nodosfilewarning"turns off this warning. Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

I did go to the recommended website, but I don't know much about cygwin or linux so I'm not sure there's anything I need to do. I realize that using the MS-DOS style path is deprecated and not recommended in cygwin, but I'm not sure how to change that, since I'm running Windows and that's the path I need. I also haven't noticed any problems with my package, at least when I install it to my computer (and although I haven't used the tarball, I've opened it and everything looks fine). So here's what I'm trying to figure out:

  • Does leaving the path as is affect my package in any way?

  • If so, how could it adversely affect my package?

  • How do I change the path to make cygwin happy?

标签: r package
2条回答
倾城 Initia
2楼-- · 2019-05-26 04:08
  • Does leaving the path as is affect my package in any way?
    - No, it is just a warning.

  • If so, how could it adversely affect my package?
    - N/A

  • How do I change the path to make cygwin happy?
    - Set the environment variable as the output states. There are multiple ways to do this; I chose to go with a solution that handles the issue across any invoked environment that parses or inherits from the windows environment by using the "Rapid Environment Editor" program to add a User Variable named CYGWIN with a value nodosfilewarning. But if you wanted you could add it through the control panel using Add environment variables for your account.

查看更多
在下西门庆
3楼-- · 2019-05-26 04:24

This is just a warning and it tells you how to disable it. It doesn't affect anything. If you want it to go away, run this from your shell:

export CYGWIN="nodosfilewarning"

Or you could mount C: to /c/ (see man mount).

查看更多
登录 后发表回答