Search code examples
windowscygwingnuplotsymlinkln

Why do I get an error when I pass a symbolic link to Gnuplot under Cygwin?


I get an error when using a symbolic link in gnuplot:

on l: drive

plot "/j/projMainpips/Aggregate/dailyStats.txt" u 1:4 w l lw 1

warning: Skipping unreadable file "/j/projMainpips/Aggregate/dailyStats.txt"
No data in plot

The link was created as:

ln -s //xxx.yy.xx.y/Users/spence/JobsStuff/ /j

If I don't use the link, it works fine:

on h: in folder /j

plot "projMainpips/Aggregate/dailyStats.txt" u 1:4 w l lw 1

How can I enable use of symlinks in gnuplot?


Solution

  • I've tested symlinks to UNC paths under Cygwin 32, and it works here.

    Are you using the Cygwin version of gnuplot? You will get such errors if you try to use the native Win32 port of gnuplot instead.

    If you can open the file in a Cygwin text editor, that shows that the symlink works:

    vi /j/projMainpips/Aggregate/dailyStats.txt
    

    Another way to run into trouble here is to edit /etc/fstab to drop the cygdrive prefix. If you do that, your syntax is going to try looking for a J: system drive. You'd need to use more than a single letter to avoid this problem or revert fstab to its original form.