> input in flex scanner failed That means it tried to read from the input file, and there was an error (not eof, but some other error). Try running pcb under strace (i.e. strace -o /tmp/foo pcb) and see what it's trying to do.