[GCC front end] trying to install python fe but fail in make

Philip Herron redbrain@gcc.gnu.org
Wed Sep 8 18:48:00 GMT 2010


On 8 September 2010 15:51, Philip Herron <redbrain@gcc.gnu.org> wrote:
> On 8 September 2010 15:11, charfi asma <charfiasma@yahoo.fr> wrote:
>> Hello,
>>
>> back to the galley ;)
>>
>> I tried to install python front end from the gcc-dev following the steps
>> explained in http://gcc.gnu.org/wiki/PythonFrontEnd
>> $ git clone git://crules.org/git/gcc-dev.git
>> $ cd gcc-dev/
>> $ git checkout --track -b python origin/python
>> $ cd ../
>> $ mkdir gcc-python-build
>> $ cd gcc-python-build/
>> $ ../gcc-dev/configure --enable-languages=c,c++,python --disable-bootstrap
>> $ make
>>
>> but I get this error while calling make
>>
>>  flex --outfile=lex.py.c ../../gcc-dev/gcc/python/lexer.l
>> gcc -std=gnu99 -I../../gcc-dev/gcc/python -g -O2 -fomit-frame-pointer -gtoggle
>> -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes
>> -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long
>> -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat
>> -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc-dev/gcc -I../../gcc-dev/gcc/.
>> -I../../gcc-dev/gcc/../include -I../../gcc-dev/gcc/../libcpp/include
>> -I/export/home/charfi/gcc_python_build/./gmp -I/export/home/charfi/gcc-dev/gmp
>> -I/export/home/charfi/gcc_python_build/./mpfr -I/export/home/charfi/gcc-dev/mpfr
>> -I/export/home/charfi/gcc-dev/mpc/src  -I../../gcc-dev/gcc/../libdecnumber
>> -I../../gcc-dev/gcc/../libdecnumber/bid -I../libdecnumber    \
>>     -c -o lexer.o lex.py.c
>> cc1: erreur: niveau de sortie de mise au point non reconnu "toggle"
>> make[2]: *** [lexer.o] Erreur 1
>> make[2]: quittant le répertoire « /export/home/charfi/gcc_python_build/gcc »
>> make[1]: *** [all-gcc] Erreur 2
>> make[1]: quittant le répertoire « /export/home/charfi/gcc_python_build »
>> make: *** [all] Erreur 2
>>
>

On my side this is what i get when compiling the lexer:

flex --outfile=lex.py.c ../../gcc-dev/gcc/python/lexer.l
gcc -std=gnu99 -I../../gcc-dev/gcc/python -g -O2 -fomit-frame-pointer
-gtoggle -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -I.
-I. -I../../gcc-dev/gcc -I../../gcc-dev/gcc/.
-I../../gcc-dev/gcc/../include -I../../gcc-dev/gcc/../libcpp/include
-I../../gcc-dev/gcc/../libdecnumber
-I../../gcc-dev/gcc/../libdecnumber/bid -I../libdecnumber
-I/usr/include/libelf \
	 -c -o lexer.o lex.py.c
lex.py.c:1817:16: warning: ‘input’ defined but not used [-Wunused-function]

And i just fixed the syntax error in the pypy.c I'll aim to keep this
branch more stable now, but i cant seem to re-create your error. What
platform are you running on <gcc -v>?

Another thing to try is this:

$ git clone git://crules.org/git/gcc-dev.git
$ cd gcc-dev/
$ cd ../
$ mkdir gcc-bootstrap-build
$ cd gcc-bootstrap-build
$ ../gcc-dev/configure --enable-languages=c
$ make
$ make install

If that runs fine then try and compile the python FE, I've found have
a bootstraped GCC version helped alot in working with the gcc sources
when using --disable-bootstrap.

--Phil



More information about the Gcc-help mailing list