External process is haning if not verbose mod

Help
nyda
2005-02-03
2013-04-24
  • nyda

    nyda - 2005-02-03

    I wrote my own compiler adapter for a cross-compiler. It can compile only one file a time. Now I found that Ant is hanging while compiling if the message level is default and not verbose or debug.
    I'm not sure, if this is a problem of CPP task or if it comes directly from Ant itself or may be from the compiler binary.
    Has anyone ever had something similar?

    Thanks - David

     
    • nyda

      nyda - 2005-02-04

      I discovered now the problem: the build process is hanging while identifying the compiler.
      The compiler itself has no switch to get it's version.
      But there is also a problem with the CaptureStreamHandler class.
      If found a workaround, but I have no idea how to make a general solution out of it:
      I wrote my own CaptureSreamHandler and copied the code of the getOutput method into the start method. Then a also changed the order of the inputstreams. Originally, the error-stream is first read - but with my ugly compiler, this causes hanging. When reading first from stdin, it works.

      In my compiler class I had to overwrite both getIdentifier methods, the static one from AbstracProcessor and the normal from ComandLineCompiler.

      Regards
      David

       
      • Markus Wankus

        Markus Wankus - 2005-02-04

        I have the same issue with a tool of mine, btu I haven't had time to track it down.  I worked around it simply by overriding getIdentifier() in my Linker to return a fixed string, planning to return to it later.

         
        • Markus Wankus

          Markus Wankus - 2005-02-04

          I should add that my tool *does* have a --version switch, and does return an identifier, but for some reason it was still hanging forever.  There is something weird going on at the stream level.  I'm, sure it will be very difficult to pinpoint.

           
    • nyda

      nyda - 2005-02-04

      Well, I forgot to tell what the real problem was:
      Since I didn't specify a identifyer argument, the compiler was called without any arguments. In the output, there is some version info (on the second line *arg*), but the process didn't terminate - so the whole build process was hanging. The workaround described above (reading within the start method of the CaptureStreamHandler) solved the problem.

       
    • nyda

      nyda - 2005-02-04

      If someone is interessed: its a compiler from IAR for Renesas M16C mcu.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks