Page MenuHomePhabricator

Unable to build XHPAST
Closed, ResolvedPublic

Description

I'm still investigating what the issue is, but wanted to track this in case users hit this.

josh@ip-10-138-85-84:/usr/src/libphutil$ sudo ./scripts/build_xhpast.php
[2015-08-30 22:10:23] EXCEPTION: (CommandException) Command failed with error #2!
COMMAND
'make' -C '/usr/src/libphutil/support/xhpast' 'clean' 'all' 'install'

STDOUT
make: Entering directory `/usr/src/libphutil/support/xhpast'
rm --force xhpast parser.yacc.output libxhpast.a *.o
bison --verbose -Wall --defines=parser.yacc.hpp --output=parser.yacc.cpp parser.y
make: Leaving directory `/usr/src/libphutil/support/xhpast'


STDERR
make: bison: Command not found
make: *** [parser.yacc.hpp] Error 127
 at [<phutil>/src/future/exec/ExecFuture.php:416]
phutil(head=master, ref.master=dc0626970a6d)
  #0 ExecFuture::resolvex() called at [<phutil>/src/future/exec/execx.php:17]
  #1 execx(string, string, string, array) called at [<phutil>/src/parser/xhpast/bin/PhutilXHPASTBinary.php:43]
  #2 PhutilXHPASTBinary::build() called at [<phutil>/scripts/build_xhpast.php:6]

This is likely caused by D13978.

Related Objects

Event Timeline

joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence updated the task description. (Show Details)
joshuaspence added a project: XHPAST.
joshuaspence added a subscriber: joshuaspence.

I guess git doesn't preserve timestamps... I just worked around this by running rm support/xhpast/* && git reset --hard HEAD && ./scripts/build_xhpast.php.

What was getting cached that created an issue?

Shouldn't make clean remove it?

I think that the issue was that the timestamp on parser.yacc.hpp was older than the timestamp on parser.y. I'm not really sure how git handles timestamps but likely they aren't preserved.

The only fix I can think of is to do touch support/xhpast/{all-parser-scanner-generated-files}

Aaah.

We could make make not actually depend on the timestamps on those files, conceivably (only on whether they exist).

Also unable to build XHPAST, but for a different reason.

< make clean
rm --force xhpast parser.yacc.output libxhpast.a *.o
rm: illegal option -- -
usage: rm [-f | -i] [-dPRrvW] file ...
       unlink file
make: *** [clean] Error 64

substituting rm -f works. I'm developing on OS X...is rm --force not cross-OS compatible?