Thrift fails to build in Ubuntu 16.04

The commands

Pkg.init()
Pkg.add("Thrift")

fail with the error message

Making install in src
make[2]: Entering directory '/home/ian/.julia/v0.6/Thrift/deps/src/thrift-0.11.0/compiler/cpp/src'
/bin/bash ../../../ylwrap thrift/thrifty.yy y.tab.c thrift/thrifty.cc y.tab.h `echo thrift/thrifty.cc | sed -e s/cc$/hh/ -e s/cpp$/hpp/ -e s/cxx$/hxx/ -e s/c++$/h++/ -e s/c$/h/` y.output thrift/thrifty.output -- byacc -d 
byacc: e - line 1 of "/home/ian/.julia/v0.6/Thrift/deps/src/thrift-0.11.0/compiler/cpp/src/thrift/thrifty.yy", syntax error
%code requires {
^
Makefile:915: recipe for target 'thrift/thrifty.cc' failed

On the same computer I can download thrift and build it with no problems, although the problematic step above seems not to be executed.

Any ideas?

Thanks

ian

julia> versioninfo()
Julia Version 0.6.2
Commit d386e40 (2017-12-13 18:08 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, skylake)