Menu

#80 Interrupt Handling Example doesn't compile on Windows/Cygwin

None
closed
tests (4)
1
2013-10-08
2013-06-16
No

I just got ColdFrame set up on Windows/Cygwin [:)] and have noticed a Windows-specific problem in the examples build. Interrupt_Handling.Device.T tries to attach Ada.Interrupts.Names.SIGHUP which exists in the Linux version of GNAT Community Edition 2012 but not in the Windows version. The build fails. Is there a workround (perhaps using Ada.Interrupts.Names.SIGINT) which would allow the build to proceed and the House Management example to function as it does under Linux?

1 Attachments

Related

Bugs: #80

Discussion

  • Alex Proudfoot

    Alex Proudfoot - 2013-06-17

    Sorry for the confusion. I see Interrupt Handling has nothing to do with House Management. I've just commented out the build of Interrupt Handling for now.

     

    Last edit: Alex Proudfoot 2013-06-17
  • Alex Proudfoot

    Alex Proudfoot - 2013-06-17

    I guess SIGINT can be used if the test is performed with kill -s INT pid instead of kill -s HUP pid. I'll try it.

     
  • Alex Proudfoot

    Alex Proudfoot - 2013-06-17

    No. That kills the process. All the available alternatives kill the process. Either of the user defined signals USR1=30 and USR2=31 would be ideal but are not available. I guess this example can't function on Windows/Cygwin.

     

    Last edit: Alex Proudfoot 2013-06-17
    • Simon Wright

      Simon Wright - 2013-06-20

      To use SIGINT you can either use a really antiquated Cygwin - from 2011 or so; I found this by installing the latest one :-) - or by running interrupt_handling-harness from a Command Shell (cmd) that has been opened from the Windows Run prompt (rather than by typing cmd into a Cygwin bash shell) and typing ^C.

       
      • Alex Proudfoot

        Alex Proudfoot - 2013-06-21

        OK. This works for me. Any ideas why the first line of text output is corrupted though?

         
  • Simon Wright

    Simon Wright - 2013-06-17

    Which version of Java are you using? I've got Oracle's Java 7, which doesn't understand Cygwin paths, so I can't check anything.

    As well as SIGINT, you could try pragma Unreserve_All_Interrupts in case that allows the handler to catch the signal.

    My problem is that I need to choose a signal that's available on Linux, Mac OS X, and Windows; Unreserve_All_Interrupts makes the example work with SIGINT on Mac OS X and should do on Linux.

    On 16 Jun 2013, at 12:21, Alex Proudfoot alexproudfoot@users.sf.net wrote:


    ** [bugs:#80] Interrupt Handling Example doesn't compile on Windows/Cygwin**

    Status: open
    Created: Sun Jun 16, 2013 11:21 AM UTC by Alex Proudfoot
    Last Updated: Sun Jun 16, 2013 11:21 AM UTC
    Owner: nobody

    I just got ColdFrame set up on Windows/Cygwin [:)] and have noticed a Windows-specific problem in the examples build. Interrupt_Handling.Device.T tries to attach Ada.Interrupts.Names.SIGHUP which exists in the Linux version of GNAT Community Edition 2012 but not in the Windows version. The build fails. Is there a workround (perhaps using Ada.Interrupts.Names.SIGINT) which would allow the build to proceed and the House Management example to function as it does under Linux?


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/coldframe/bugs/80/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #80

  • Alex Proudfoot

    Alex Proudfoot - 2013-06-18

    I'm using Oracle's JDK 1.6 right now and had the same problem with Cygwin paths until I made some alterations to Makefile.inc, see attachment. The current alterations are only what was needed to get the builds to work so other stuff such as HTML documentation will still be broken. There were also problems related to ADA_PROJECT_PATH which needs to be a Windows path in my current Windows/Cygwin environment. For the ColdFrame tests and examples, the problems can be worked round with a minor hack to the Makefiles to avoid treating ADA_PROJECT_PATH as a Unix path. I'll try Unreserve_All_Interrupts and get back to you.

     

    Last edit: Alex Proudfoot 2013-06-18
  • Alex Proudfoot

    Alex Proudfoot - 2013-06-18

    Using SIGINT and pragma Unreserve_All_Interrupts works on OpenSUSE 11.4 but not on Windows/Cygwin. The kill command still kills the process. I've been trying to get the same build to work using MinGW but I seem to have path problems where none existed under Cygwin.

     
  • Simon Wright

    Simon Wright - 2013-06-21

    On 21 Jun 2013, at 09:18, Alex Proudfoot alexproudfoot@users.sf.net wrote:

    OK. This works for me. Any ideas why the first line of text output is corrupted though?

    Because the first state machine transition (which causes a line of output) occurs at almost exactly the same time as the Device task starts running (and prints a line of output). I've added a delay, not ideal but avoids this particular regrettableness!

    --S

     
  • Simon Wright

    Simon Wright - 2013-06-21
    • status: open --> pending
    • assigned_to: Simon Wright
    • Group: -->
     
  • Simon Wright

    Simon Wright - 2013-06-21

    Fixed at revision 677de98a6878.

     
  • Simon Wright

    Simon Wright - 2013-06-21
    • status: pending --> closed
     
  • Simon Wright

    Simon Wright - 2013-10-08
    • labels: --> tests
     

Log in to post a comment.