HenrikBengtsson / aroma.affymetrix

🔬 R package: Analysis of Large Affymetrix Microarray Data Sets
https://cran.r-project.org/package=aroma.affymetrix
10 stars 3 forks source link

CRAN: Errors in Windows due to failed file linking #35

Closed HenrikBengtsson closed 5 years ago

HenrikBengtsson commented 5 years ago

For example, https://win-builder.r-project.org/bvgoYP5bMvLv/examples_and_tests/tests_x64/002.setupExampleData,rawData.Rout.fail:

> setupExampleData(aroma.affymetrix, dirs="rawData", mustWork=FALSE)
[2019-02-13 20:12:56] Exception: Failed to create file link: rawData/FusionSDK_HG-Focus/HG-Focus/HG-Focus-1-121502.CEL[.lnk] -> D:/temp/RtmpwJ0pox/RLIBS_2e6e859a46d90/AffymetrixDataTestFiles/rawData/FusionSDK_HG-Focus/HG-Focus/2.Calvin/HG-Focus-1-121502.CEL

  at #04. createLink.default(link = pathnameD, target = pathnameS, skip = TRUE)
          - createLink.default() is in environment 'R.utils'

  at #03. createLink(link = pathnameD, target = pathnameS, skip = TRUE)
          - createLink() is in environment 'R.utils'

  at #02. setupExampleData.AromaAffymetrix(aroma.affymetrix, dirs = "rawData", 
              mustWork = FALSE)
          - setupExampleData.AromaAffymetrix() is in environment 'aroma.affymetrix'

  at #01. setupExampleData(aroma.affymetrix, dirs = "rawData", mustWork = FALSE)
          - setupExampleData() is in environment 'aroma.affymetrix'

Error: Failed to create file link: rawData/FusionSDK_HG-Focus/HG-Focus/HG-Focus-1-121502.CEL[.lnk] -> D:/temp/RtmpwJ0pox/RLIBS_2e6e859a46d90/AffymetrixDataTestFiles/rawData/FusionSDK_HG-Focus/HG-Focus/2.Calvin/HG-Focus-1-121502.CEL
In addition: Warning message:
In system(cmd, intern = intern, wait = wait | intern, show.output.on.console = wait,  :
  running command 'C:\Windows\system32\cmd.exe /c mklink "rawData/FusionSDK_HG-Focus/HG-Focus/HG-Focus-1-121502.CEL" "D:/temp/RtmpwJ0pox/RLIBS_2e6e859a46d90/AffymetrixDataTestFiles/rawData/FusionSDK_HG-Focus/HG-Focus/2.Calvin/HG-Focus-1-121502.CEL"' had status 1
Execution halted

I can reproduce it on win-builder. These errors started to occur around mid 2018. But I don't understand why they all of a sudden started to appear, because these tests have been in place for many years without issues.

Task

HenrikBengtsson commented 5 years ago

R.utils 2.7.0-9000 now produces:

Method 'unix-symlink'...
 Target: D:/temp/RtmpEhyG56/foo_325c013225ab8.txt
 Link to create: unix-symlink-to-foo_325c013225ab8.txt
 Failed to create link: Failed to create file link (methods attempted: 'unix-symlink'; current working directory: 'd:/RCompile/CRANguest/R-release/R.utils.Rcheck/tests_x64'): 'unix-symlink-to-foo_325c013225ab8.txt'[.lnk] -> 'D:/temp/RtmpEhyG56/foo_325c013225ab8.txt'
Warnings and errors captured: unix-symlink produced simpleWarning: 'cannot symlink 'D:\temp\RtmpEhyG56\foo_325c013225ab8.txt' to 'unix-symlink-to-foo_325c013225ab8.txt', reason 'Dem Client fehlt ein erforderliches Recht''
Method 'unix-symlink'...done
Method 'windows-ntfs-symlink'...
 Target: D:/temp/RtmpEhyG56/foo_325c013225ab8.txt
 Link to create: windows-ntfs-symlink-to-foo_325c013225ab8.txt
Warning in system(cmd, intern = intern, wait = wait | intern, show.output.on.console = wait,  :
  running command 'C:\Windows\system32\cmd.exe /c mklink "windows-ntfs-symlink-to-foo_325c013225ab8.txt" "D:/temp/RtmpEhyG56/foo_325c013225ab8.txt"' had status 1
 Failed to create link: Failed to create file link (methods attempted: 'windows-ntfs-symlink'; current working directory: 'd:/RCompile/CRANguest/R-release/R.utils.Rcheck/tests_x64'): 'windows-ntfs-symlink-to-foo_325c013225ab8.txt'[.lnk] -> 'D:/temp/RtmpEhyG56/foo_325c013225ab8.txt'
Warnings and errors captured: windows-ntfs-symlink produced Exception: 'Pathname not found: ./windows-ntfs-symlink-to-foo_325c013225ab8.txt (./ exists, but nothing beyond; current directory is 'd:/RCompile/CRANguest/R-release/R.utils.Rcheck/tests_x64')'
Method 'windows-ntfs-symlink'...done
Method 'windows-shortcut'...
 Target: D:/temp/RtmpEhyG56/foo_325c013225ab8.txt
 Link to create: windows-shortcut-to-foo_325c013225ab8.txt
 Failed to create link: Failed to create file link (methods attempted: 'windows-shortcut'; current working directory: 'd:/RCompile/CRANguest/R-release/R.utils.Rcheck/tests_x64'): 'windows-shortcut-to-foo_325c013225ab8.txt'[.lnk] -> 'D:/temp/RtmpEhyG56/foo_325c013225ab8.txt'
Warnings and errors captured: windows-shortcut produced Exception: 'Pathname not found: ./windows-shortcut-to-foo_325c013225ab8.txt (./ exists, but nothing beyond; current directory is 'd:/RCompile/CRANguest/R-release/R.utils.Rcheck/tests_x64')'
Method 'windows-shortcut'...done
HenrikBengtsson commented 5 years ago

Solved! There were two problems here:

  1. When symbolic links are not supported, Windows Shortcut Links are created. I could reproduce this in a Windows 10 Pro VM. The problem with this was that aroma.{core,affymetrix} failed to locate .LNK as link files while they would find .lnk files.

  2. CEL.LNK files would not be recognized as CEL files.

The reason why this problem started to appear on CRAN last year (2018) was probably that symbolic links (mklink) stopped being supported.

Also, when I was testing heavily on my MS Windows 7 setup back in the days, I probably had mklink working so the LNK fallback was only poorly tested.