openlink / virtuoso-opensource

Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
https://vos.openlinksw.com
Other
864 stars 210 forks source link

stable/7 build fails on Ubuntu Trusty #160

Closed paulhoule closed 10 years ago

paulhoule commented 10 years ago

I just fired up a Ubuntu Trusty instance in the AWS cloud and I go through the following sequence to build Virtuoso

sudo apt-get install git make
sudo apt-get install autoconf automake libtool
sudo apt-get install bison flex gperf
sudo apt-get install libssl-dev

git clone git://github.com/openlink/virtuoso-opensource.git
cd virtuoso-opensource
git checkout -b stable/7
sh autogen.sh
./configure
make

it churns for a while and then it burns

make[3]: Entering directory `/home/ubuntu/src/virtuoso-opensource/libsrc/util'
source='getdate.c' object='libutil_la-getdate.lo' libtool=yes \
        DEPDIR=.deps depmode=none /bin/bash ../../binsrc/config/depcomp \
        /bin/bash ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../libsrc/Dk    -fno-strict-aliasing -O2  -Wall  -DNDEBUG -DPOINTER_64   -I/home/ubuntu/src/virtuoso-opensource/libsrc/Xml.new  -DOPENSSL_NO_KRB5 -Dlinux -D_GNU_SOURCE -DFILE64 -D_LARGEFILE64_SOURCE   -D_GNU_SOURCE -DIN_LIBUTIL -DGLOBALREF=extern -I../../libsrc -I../../libsrc/Dk -DSUPPORT_UTF8 -g -O2 -c -o libutil_la-getdate.lo `test -f 'getdate.c' || echo './'`getdate.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../libsrc/Dk -fno-strict-aliasing -O2 -Wall -DNDEBUG -DPOINTER_64 -I/home/ubuntu/src/virtuoso-opensource/libsrc/Xml.new -DOPENSSL_NO_KRB5 -Dlinux -D_GNU_SOURCE -DFILE64 -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DIN_LIBUTIL -DGLOBALREF=extern -I../../libsrc -I../../libsrc/Dk -DSUPPORT_UTF8 -g -O2 -c getdate.c  -fPIC -DPIC -o .libs/libutil_la-getdate.o
getdate.c: In function 'OPL_gd_parse':
getdate.c:1368:7: error: too few arguments to function 'OPL_gd_lex'
       yychar = yylex (&yylval);
       ^
../../libsrc/util/getdate.y:74:17: note: declared here
 #define yylex   OPL_gd_lex
                 ^
../../libsrc/util/getdate.y:113:12: note: in expansion of macro 'yylex'
 static int yylex (void *yylval, void *cookie);
            ^
../../libsrc/util/getdate.y:169:30: error: 'cookie' undeclared (first use in this function)
 #define context ((CONTEXT *) cookie)
                              ^
../../libsrc/util/getdate.y:201:6: note: in expansion of macro 'context'
      context->yyHaveTime++;
      ^
../../libsrc/util/getdate.y:169:30: note: each undeclared identifier is reported only once for each function it appears in
 #define context ((CONTEXT *) cookie)
                              ^
../../libsrc/util/getdate.y:201:6: note: in expansion of macro 'context'
      context->yyHaveTime++;
      ^
../../libsrc/util/getdate.y: In function 'get_date':
../../libsrc/util/getdate.y:938:3: error: too many arguments to function 'OPL_gd_parse'
   if (yyparse (&cookie)
   ^
../../libsrc/util/getdate.y:73:17: note: declared here
 #define yyparse OPL_gd_parse
                 ^
getdate.c:1199:1: note: in expansion of macro 'yyparse'
 yyparse (void)
 ^
make[3]: *** [libutil_la-getdate.lo] Error 1
make[3]: Leaving directory `/home/ubuntu/src/virtuoso-opensource/libsrc/util'

How do I get a stable build that works? Here are some notes on the environment

ubuntu@ip-10-95-179-220:~/src/virtuoso-opensource$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

ubuntu@ip-10-95-179-220:~/src/virtuoso-opensource$ gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ubuntu@ip-10-95-179-220:~/src/virtuoso-opensource$ bison --version
bison (GNU Bison) 3.0.2
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ubuntu@ip-10-95-179-220:~/src/virtuoso-opensource$ flex --version
flex 2.5.35
paulhoule commented 10 years ago

I tried setting all locales to 'C', re-running autogen and all that and it still fails.

paulhoule commented 10 years ago

I did the build with Ubuntu 13.10 (had to also add gawk) on my own Virtualbox and did not encounter this problem. We have gcc 4.8.1, bison 2.7.12, and flex 2.5.35 and if I was going to blame anything it would be bison.

paulhoule commented 10 years ago

I did the build with Ubuntu 13.10 in AWS and it looks good.

HughWilliams commented 10 years ago

We shall have to test this in-house on Ubuntu Trusty (14.04) , it could be a problem with the bison or one of the other tools required for the build ...

openlink commented 10 years ago

I checked Ubuntu 14.04 and it uses bison 3.0.2 which generates slightly different code for a reentrant parser. I updated getdate.y with some new directives to resolve this problem with bison v2.3 and above.

Patch 042f1427380e3a474581f4aa1ee064f5d2da9963 has been committed to both develop/6 and develop/7 branches

alangrafu commented 10 years ago

Is this going to be available in stable/7 in the near future? Is develop/7 usable for production?

HughWilliams commented 10 years ago

Yes, it will be in stable/7 in the near further. Use of develop/7 in production is at your discretion and should be tested for your use case, but code committed to develop/7 has passed our internal test suites and thus we would say generally can be used ...

lorenae commented 10 years ago

Hi, I've cloned stable/7 today and since I'm experiencing this issue I want to know If the fix is included there. thanks!

KimJBaran commented 9 years ago

This is still an issue. Occurs under xubuntu 14.10.

HughWilliams commented 9 years ago

Against develop/7 or stable/7 , as the fix is only in the former atm ?