Click to See Complete Forum and Search --> : OS X> fatal error: no input grammar


spartian
12-13-2004, 04:42 AM
Hello All,

I will summerize my problem and provide the details at the end. Besides my compile problem, I have a secondary question.

I'm running OS X, 10.3.6, and attempting to compile apache 1.3.33, php5, and perl5 for the first time. It appears that I've selected something that interfers with sqlite and bison.

1) Any Idea's? (or where to look for info)
2) Is there any advantage to loading mod_php to apache statically besides reducing time to load/start the server?

Finally, I wanted to use the latest version of Apache, which seems to force me to compile the rest of the software as many of the precomplied pachages seem to 'need' the original version of Apache that Apple supplied with Panther.

Thanks,

Jon
--------------------------

In this process I'm building mod_php from the /usr/local/src/php-5.0.2 directory. My configuration line is as follows:

sudo ./configure --with-apache=../apache_1.3.33 \
--with-mysql=/usr/local/mysql --enable-track-vars

Which seems to run fine. (btw I did download Marc Liyanage's compiled version of mysql)

But then when I run 'sudo make' it seems to have a problem with sqlite library in php5 listing a whole bunch of problems with bison:

/usr/local/src/php-5.0.2/ext/sqlite/libsqlite/src/parse.y:887: %type declaration has no <typename>

/usr/local/src/php-5.0.2/ext/sqlite/libsqlite/src/parse.y:887: Skipping to next %

/usr/local/src/php-5.0.2/ext/sqlite/libsqlite/src/parse.y:898: fatal error: no input grammar

make: *** [/usr/local/src/php-5.0.2/ext/sqlite/libsqlite/src/parse.c] Error 1

Now I did use Fink to install the latest version of Bison 1-35.2, but I haven't reboot/logout since. Also I've installed Apple's Nov 2004 gcc updater.

phpslicker
08-03-2005, 02:29 PM
I'm having the same problems trying to compile on a Solaris 9 box. Is there a solution to this? The compile errors are as follows:

bison -y /tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y
/tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y:19: unrecognized: %token-prefix
/tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y:19: Skipping to next %
.
.
.
/tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y:836: unrecognized: %destructor
/tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y:836: Skipping to next %
/tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y:887: %type declaration has no <typename>
/tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y:887: Skipping to next %
/tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y:898: fatal error: no input grammar
make: *** [/tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.c] Error 1

configure options are as follows:
./configure --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-gd --enable-gd-native-ttf --with-zlib-dir=/usr/local/include

phpslicker
08-03-2005, 02:48 PM
i upgrade bison to 1.875d and now i get this lone error instead of the many:

bison -y /tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y
/tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y:19.1-13: invalid directive: `%token_prefix'
/tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y:19.15-17: syntax error, unexpected "identifier"
make: *** [/tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.c] Error 1

spartian
08-03-2005, 03:00 PM
Hello,

Re:I'm having the same problems trying to compile on a Solaris 9 box. Is there a solution to this? The compile errors are as follows:

bison -y /tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y
/tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y:19: unrecognized: %token-prefix
/tmp/php-5.0.4/ext/sqlite/libsqlite/src/parse.y:19: Skipping to next %

I'm no expert in compling or parsing. I had to go to the SQLite.org site to get the answer:

http://www.mail-archive.com/sqlite-users@sqlite.org/msg05202.html

Basically I was told:

>In spite of the *.y suffix, the parse.y source file of SQLite is
>processed using Lemon, not Bison/Yacc. Lemon is an LALR(1) parser
>generator like Bison/Yacc (hence the similar suffix) but uses a
>different input syntax and generates a parser that is more useful
>to an embedded database engine. The complete source code to
>Lemon is included in the SQLite source tree.

At this piont I was beyond my comfort level.

Hope that helps,

-spartian

phpslicker
08-03-2005, 03:42 PM
I unzipped the source into a new directory and did a clean configure and make and it worked.

I found the tip here:
http://66.102.7.104/search?q=cache:yic4Y52C2CUJ:www.webfrustration.com/showthread.php%3Ft%3D327238+sqlite+%22unexpected+identifier%22+php&hl=en

thanks