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

charfi asma charfiasma@yahoo.fr
Mon Jun 7 13:34:00 GMT 2010


Hello Andi,

thank you for your answer. 

I modified the sfe1.c as you suggested. previous error disappears
but I get 2 other errors generated while calling make bootstrap 

DEBUG_ANDI: gsfe -  .. ../libcpp/libcpp.a  ../libiberty/libiberty.a .. 
..  -O2 -g -fomit-frame-pointer -DIN_GCC  -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long
-Wno-variadic-macros -Wold-style-definition -Wmissing-format-attribute 
  -DHAVE_CONFIG_H ..
stage1/xgcc -Bstage1/
-B/usr/local/i686-pc-linux-gnu/bin/  -O2 -g -fomit-frame-pointer
-DIN_GCC  -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros
-Wold-style-definition -Wmissing-format-attribute    -DHAVE_CONFIG_H 
-o gsfe sample_fe/gsfe.o \
   version.o prefix.o intl.o  ../libcpp/libcpp.a   ../libiberty/libiberty.a
/usr/lib/crt1.o: In function `_start':
../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status
make[2]: *** [gsfe] Erreur 1
make[2]: Leaving directory `/home/charfi/Desktop/gccobj/gcc'
make[1]: *** [stage2_build] Erreur 2
make[1]: Leaving directory `/home/charfi/Desktop/gccobj/gcc'
make: *** [bootstrap] Erreur 2

I am calling ./configure after creating an other directory (not related in the source directory) named gcc-obj.
this time, I think the error comes from the driver (gsfe); xhnich line should I modify ;)
thank you very much

Asma



----- Message d'origine ----
De : Andi Hellmund <mail@andihellmund.com>
À : charfi asma <charfiasma@yahoo.fr>
Cc : gcc-help@gcc.gnu.org
Envoyé le : Ven 4 juin 2010, 17h 04min 38s
Objet : Re: [GCC front end] trying to install sample_fe but fail in make

Hey,

> I try to install "sample_fe" following the steps described in Andi Blog :
> http://blog.lxgcc.net/?p=181

Thanks for trying this :-) And thanks for catching this silly mistake!

> I put the sample_fe in the gcc directory (whith the other fe directory :
> java, cp, ...)
> I configure with ./configure --enable-languages=sample_fe
> when I call make, I get this errors:

Generally, you should follow the install instructions on
http://gcc.gnu.org/install/ and NOT call configure from the source
directory, but from a separated build directory.


> make
> ...build/gengtype.o build/gengtype-lex.o build/gengtype-yacc.o \
> build/errors.o ../build-i686-pc-linux-gnu/libiberty/libiberty.a
> build/gengtype
> /home/charfi/Desktop/gcc-4.1.0/gcc/sample_fe/sfe1.c:24: stray GTY marker
> make[2]: *** [s-gtype] Erreur 1
> make[2]: Leaving directory `/home/charfi/Desktop/gcc-obj/gcc'
> make[1]: *** [all-gcc] Erreur 2
> make[1]: Leaving directory `/home/charfi/Desktop/gcc-obj'
> make: *** [all] Erreur 2
>
> I think it is reltaed with GTY and gengtype but I do not realy understand
> how to correct it.

Yes, I think that as well. You could possibly fix this by changing line 24
of sfe1.c

from

struct GTY(()) lang_identifier

to

struct lang_identifier GTY(())

But, I'm not totally sure if this version of sample_fe will work anyway
with your version, because I just tested it with 4.4.x and you seem to
compile a 4.1.0 version. If you for some reason require to use 4.1.0, then
please continue trying and let me know if you face further problems.
Otherwise, I would recommend using a 4.4.x. I'll upload a 4.5.0-based
version this weekend, so that you could also use gcc-4.5.0 for your
experiments.

I'll update the web page with a modified version ...

Best regards,
Andi







More information about the Gcc-help mailing list