Closed dajobe closed 9 years ago
Yeah there a few more gotchas. You need
export LEX=glex
export M4=gm4
as well as the automake and autoconf vars you set
I separately compiled bison3, which I have to do on most systems now because it's rare to see it in the default install.
Oh, I'm working on OpenBSD 5.7 since it was just released.
Not sure actually about the need for the GNU M4 specifically, since OpenBSD's base M4 does ostensibly have some GNU compatibility extensions (according to their man page) and did seem to work fine.
But I went ahead and installed the m4
package, too, now, as well as built Bison 3.0.4 from source--dancing around Bison's tricky build dependency on help2man, which doesn't build on OpenBSD.
With those prerequisites in place, I confirm that the following all works on OpenBSD 5.6:
sudo pkg_add gmake m4 autoconf automake libtool gtk-doc flex bison
export AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.14 M4=gm4 LEX=gflex BISON=/usr/local/bin/bison
./autogen.sh
./configure
# manually generate src/turtle_lexer.{c,h}
# manually generate src/turtle_parser.{c,h}
# manually generate src/parsedate.{c,h}
make
make check
I'm unclear on why the manual steps were still needed, with all dependencies and environment variables in place; but in any case, what I did for those was the following:
# manually generate src/turtle_lexer.{c,h}:
$LEX -oturtle_lexer.t src/turtle_lexer.l
scripts/fix-flex.pl turtle_lexer.t > src/turtle_lexer.c
mv -f turtle_lexer.h src/turtle_lexer.h
rm -f turtle_lexer.t
# manually generate src/turtle_parser.{c,h}:
$BISON src/turtle_parser.y
scripts/fix-bison.pl turtle_parser.tab.c > src/turtle_parser.c
mv -f turtle_parser.tab.h src/turtle_parser.h
rm -f turtle_parser.tab.c turtle_parser.output
# manually generate src/parsedate.{c,h}:
$BISON src/parsedate.y
scripts/fix-bison.pl parsedate.tab.c > src/parsedate.c
mv -f parsedate.tab.h src/parsedate.h
rm -f parsedate.tab.c parsedate.output
Looks exciting, so I gave building this a try on an OpenBSD 5.6 box. To run
./autogen.sh
and./configure
, I had to first do:Running
make
initially bailed out at generating the Turtle lexer withflex
:I used the commands from
appveyor.yml
to manually generate the lexer, though a snag in the road was that I needed to explicitly specifygflex
(as in/usr/local/bin/gflex
, viapkg_add
), sinceflex
(as in/usr/bin/flex
) is an ancient 2.5.4 version that can't handle the input file:The adventure ended at problems generating the Turtle parser, however:
...since the Bison version in OpenBSD Ports remains permanently at 2.3 (due to licensing reasons):
I stopped here, for now, but would certainly re-try with a release tarball that doesn't require these development dependencies.