[Omake] writing to console in .STATIC?

Mike Furr furr at cs.umd.edu
Thu Sep 6 07:12:40 PDT 2007


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


More information about the Omake mailing list