Compiling Metropolis with Cygwin

At this time, we do not recommend running Metropolis models under Cygwin, but Cygwin can be used to generate the code that is compiled under Microsoft Visual C.

Note that many of the SystemC regression tests fail under Cygwin.

  • http://www.systemc.org/forum/forum.php?thread_id=1125&forum_id=15 - Cygwin port of SCV and TBSC
  • SystemC Regression tests Under Cygwin

    1. Download regtests-2.0.1.tar.gz from http://www.systemc.org and untar it
    2. Edit regtests-2.0.1/scripts/verify.pl and change the first line to
      #!/usr/bin/perl
      
      and the Cygwin version check line to
          } elsif ($uname_s eq "CYGWIN_NT-5.1" ) {
      
    3. Set SYSTEMC_HOME to point to your systemc-2.0.1 directory. I did:
      SYSTEMC_HOME=c:/cxh/src/systemc-2.0.1
      export SYSTEMC_HOME
      
    4. Run a test with
      c:/cxh/src/regtests-2.0.1/scripts/verify.pl fx
      
    5. To run all the tests, in theory
      c:/cxh/src/regtests-2.0.1/scripts/verify.pl systemc
      
      will do it; but for us, that ran only one test. The problem seems to be that the cleanup Perl function is removing each test directory and then the rmdir command is failing. Thus, each time we run the above command, the number of remaining tests goes down by one.

      To skip cleaning up, run:

      c:/cxh/src/regtests-2.0.1/scripts/verify.pl -no-cleanup -v systemc
      
      As of 2/04, 81 tests fail, 557 pass.

      Some of the failures are overflow errors, and are not that big a problem

      However, some of the failures are because we got an UNKNOWN EXCEPTION OCURRED message

      For example systemc/kernel/watching/test01/test01.log says:

      -------------------------------------------------------------------------------
        diff failed on 'systemc/kernel/watching/test01/test01.log'
      -------------------------------------------------------------------------------
      24,25c24,101
      < 
      < UNKNOWN EXCEPTION OCCURED
      ---
      > main_action
      > 1
      > 2
      > 3
      > 4
      > 5
      > 6
      
      Running the binary yields the following:
      bash-2.05b$ cd ~/src/regtests-2.0.1/systemc/kernel/watching/test01
      bash-2.05b$ ls
      systemc.exe
      test01
      test01.diff
      test01.log
      test01.log.stripped
      test01.o
      bash-2.05b$ ./systemc.exe
      
                   SystemC 2.0.1 --- Nov 13 2003 15:15:26
              Copyright (c) 1996-2004 by all Contributors
                          ALL RIGHTS RESERVED
      main_action
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      
      UNKNOWN EXCEPTION OCCURED
      bash-2.05b$ 
      
      The error message occurs at: systemc-2.0.1/src/systemc/kernel/sc_main.cpp:
      	      message_function( "UNKNOWN EXCEPTION OCCURED" );