[Omake] writing to console in .STATIC?

Jason Hickey jyh at cs.caltech.edu
Thu Sep 6 09:36:06 PDT 2007


Mike,

Thanks for pointing this out.  This was strange, because the console  
is never opened directly, so how could the output ever arrive at the  
terminal?

As it turns out, for some commands, the file descriptors were getting  
transposed, stdin->stdout and stdout->stderr.  stdin is the console  
here, which explains what happened.  This is fixed in svn for 0.9.8.x.

Jason

On Sep 6, 2007, at 7:12 AM, Mike Furr wrote:

>
> OMake 0.9.8.5 is failing to build on the Debian auto-builders.  The  
> problem seems to be that it is trying to write *directly* to the  
> console (instead of stdout/stderr) while in .STATIC blocks.  One  
> can see the problem with:
>
>  $ make all >/dev/null 2>&1   # <- should produce no output
> --- Checking for ocamlfind... (found /usr/bin/ocamlfind)
> --- Checking for ocamlc.opt... (found /usr/bin/ocamlc.opt)
> --- Checking for ocamlopt.opt... (found /usr/bin/ocamlopt.opt)
> [...]
>
> which comes from the .STATIC block in OCaml.om.  However, the  
> Debian auto-builders build each package in an environment with no  
> console, so the build fails exactly when it gets to that point:
>
>   OMAKEFLAGS= OMAKEPATH=lib ./omake-boot --dotomake .omake --force- 
> dotomake -j2 main
>   *** omake: reading OMakefiles
>   --- Checking for gcc... (found /usr/bin/gcc)
>   --- Checking for g++... (found /usr/bin/g++)
>   *** omake error:
>      File mk/defaults: line 124, characters 1-41
>      write(): Bad file descriptor
>   *** omake error:
>      File mk/defaults: line 124, characters 1-41
>      command exited with code: 123
>   make[1]: *** [all] Error 123
>   make[1]: Leaving directory `/build/buildd/omake-0.9.8.5-3'
>   make: *** [build-stamp] Error 2
>
> Note this would also be a problem if you used a similar setup to do  
> nightly builds of a project that used OMake, so I think it would be  
> best if OMake tried to only use stdout/stderr for output (or at  
> least fall back to those when the console is not available).
>
> Cheers,
> -Mike
> _______________________________________________
> Omake mailing list
> Omake at metaprl.org
> https://lists.metaprl.org/mailman/listinfo/omake

--
Jason Hickey                  http://www.cs.caltech.edu/~jyh
Caltech Computer Science      Tel: 626-395-6568 FAX: 626-792-4257





More information about the Omake mailing list