klayout interpreter mode + ruby scripts on Cygwin?

edited October 2013 in General
Hello -

I am using klayout's functionality to merge several GDS files into one, using a ruby script posted by Mathias:

klayout -e -z -rm merge_gds.rb

(see http://klayout.de/forum/comments.php?DiscussionID=103&page=1#Item_0)

This functionality is very useful, for my purposes (visualizing layout-based electrical simulation results over the layout, for prototyping).

Here is the situation - this command runs fine on Linux, and on Windows (command terminal).
When I try to run it on Cygwin, it does not give any warning or error messages, but does not generate the output GDS file (c.gds). I am using the same input - ruby script, same a.gds and b.gds files, command line options, etc.

Running klayout in "vebose" mode (using -d option) does not help - there is still no warning / error messages.

When I just start klayout from Cygwin terminal in a usual GUI mode, it runs fine.
The problem is only happening when trying to run klayout in a Ruby script interpreter mode.

I am using klayout version 0.22.8.

So, the question is - is klayout supposed to run fine under Cygwin in interpreter mode, or are there known problems?

Thanks!

Max
--------

Comments

  • edited October 2013

    Hi Max,

    of course it's supposed to work :-)

    My personal experiences with CygWin are somewhat limited - I tend to use the MinGW shell rather than CygWin. Are you using the CygWin build or are you using the native Windows binary in a CygWin shell? I am not sure whether the native Windows / cygwin combination works well.

    Matthias

  • edited November -1
    Hi Matthias -

    I am using native 64bit Windows klayout.exe, with Cygwin shell.
    As I said, the GUI version of klayout works just fine (I just type klayout alias/path to executable in Cygwin window), but the batch mode (when used as an interpreter for ruby) does not seem to work - at least for the script that I mentioned in my earlier post.

    This is not a huge problem for me, because Linux version works fine, but I sometimes do some development/prototyping work on Windows/Cygwin, so it would be nice to have it here as well. I do not know how generic this problem is (Cygwin + ruby script interpreter mode of klayout), will let you know later on, when I have more information on this...

    Regards,

    Max
    ----------
  • edited November -1

    Hi Max,

    maybe there is some problem with the ruby shared library? Does ruby work in the macro IDE's console when you start Klayout in UI mode from the cygwin shell?

    Matthias

  • edited November -1

    Matthias -

    Ruby works just fine from IDE's console when klayout is started in a GUI mode from Cygwin window...

    Max

  • edited November -1

    Hi Max,

    then it may be connected to stdout/stderr redirection through cygwin. I guess it will work fine if you call it from cmd.exe.

    There are "real" cygwin builds available, i.e. from http://artfiles.org/cygwin.org/pub/cygwinports/x86_64/release/klayout/. Maybe you like to try these. I don't have personal experience with them, but I am sure they will fit better into the cygwin environment.

    Regards,

    Matthias

  • edited November -1
    Matthias -

    yes, as I said erlier, it (klayout used as a ruby interpreter, in batch mode) works fine in Windows cmd terminal.

    I just tried this "real" cygwin build of klayout - it does not work. Is it supposed to run under cygwin X? I am using only cygwin text terminal, and not XWindow system under cygwin.

    Max
Sign In or Register to comment.