* [GCC front end] trying to install sample_fe but fail in make @ 2010-06-04 15:04 charfi asma 2010-06-04 15:46 ` Andi Hellmund 0 siblings, 1 reply; 30+ messages in thread From: charfi asma @ 2010-06-04 15:04 UTC (permalink / raw) To: gcc-help Hello, I try to install "sample_fe" following the steps described in Andi Blog : http://blog.lxgcc.net/?p=181 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: 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. thank you for your help Asma ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [GCC front end] trying to install sample_fe but fail in make 2010-06-04 15:04 [GCC front end] trying to install sample_fe but fail in make charfi asma @ 2010-06-04 15:46 ` Andi Hellmund 2010-06-07 13:34 ` Re : " charfi asma 0 siblings, 1 reply; 30+ messages in thread From: Andi Hellmund @ 2010-06-04 15:46 UTC (permalink / raw) To: charfi asma; +Cc: gcc-help 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 ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re : [GCC front end] trying to install sample_fe but fail in make 2010-06-04 15:46 ` Andi Hellmund @ 2010-06-07 13:34 ` charfi asma 2010-06-07 14:28 ` Andi Hellmund 0 siblings, 1 reply; 30+ messages in thread From: charfi asma @ 2010-06-07 13:34 UTC (permalink / raw) To: mail; +Cc: Cc : 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 ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Re : [GCC front end] trying to install sample_fe but fail in make 2010-06-07 13:34 ` Re : " charfi asma @ 2010-06-07 14:28 ` Andi Hellmund 2010-06-07 16:11 ` Re : " charfi asma 0 siblings, 1 reply; 30+ messages in thread From: Andi Hellmund @ 2010-06-07 14:28 UTC (permalink / raw) To: charfi asma; +Cc: mail, gcc-help Hey, > I modified the sfe1.c as you suggested. previous error disappears > but I get 2 other errors generated while calling make bootstrap okay, that's not good. Usually, when working on a front-end, I disable the bootstrapping (using --disable-bootstrap) option to accelerate the build to get the new front-end as fast as possible. Even though the Make-lang.in of sample_fe isn't complete, it should be able to handle the bootstrap case But this error doesn't currenlty look like a problem to the bootstrapping. Which version of GCC are you using for your tests? Still 4.1.0? If you're still using 4.1.0, then the sample_fe might not work/build properly because it was "developped" and tested for 4.4.0. If you face these problems although you switched to 4.4.0, I need to re-check the bootstrapping case. If you however insist on using 4.1.0, I could prepare sample_fe for this version? > /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 The linker is missing the 'main' function which isn't - as of 4.4.0 - not provided by the driver code, but by the GCC infrastructure (IIRC, gcc.c). So, I assume that just a different object file is missing for the final linking. Andi ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-06-07 14:28 ` Andi Hellmund @ 2010-06-07 16:11 ` charfi asma 2010-06-07 21:34 ` Philip Herron [not found] ` <AANLkTimBwfoGdgaz19gkeFoKhbnloKYT0VpVMmjVUgtA@mail.gmail.com> 0 siblings, 2 replies; 30+ messages in thread From: charfi asma @ 2010-06-07 16:11 UTC (permalink / raw) To: mail; +Cc: gcc-help ----- Message d'origine ---- De : Andi Hellmund <mail@andihellmund.com> À : charfi asma <charfiasma@yahoo.fr> Cc : mail@andihellmund.com; gcc-help@gcc.gnu.org Envoyé le : Lun 7 juin 2010, 15h 34min 37s Objet : Re: Re : [GCC front end] trying to install sample_fe but fail in make Hello, okay, that's not good. Usually, when working on a front-end, I disable the bootstrapping (using --disable-bootstrap) option to accelerate the build to get the new front-end as fast as possible. Even though the Make-lang.in of sample_fe isn't complete, it should be able to handle the bootstrap case Ok I will try to make without bootstrap (I used make bootstrap cause I red in http://gcc.gnu.org/install/build.html in building a native compiler section that it is recommended to enable bootstrap because the compiler will be tested more completely and could also have a better performance. If you however insist on using 4.1.0, I could prepare sample_fe for this version? I used this version because I have a mandriva 2006. I tried to install gcc4.4.2 but when configuring it, it generates errors concerning GMP and MPFR (require 4.1+ of GMP and 2.3.2+ of MPFR) I installed the MPFR2.4.2 without pb and a 4.1.3.2 of GMP (an rpm: libgmp and gmp-devel) but gcc4.4.2 requires GMP4.2 I tried to install GMP4.2.2 (rpm) I get this errors: dependences required: libc.so.6 (GLIBC_2.4) rtld( GNU_HASH) When I install GMP 4.1.3.2 I did not get a pb. (that's why I tried to install an old version of gcc that did not require GMP 4.2) I tried to configure with --with-gmp but I did not find where the gmp is installed whereis gmp gives /usr/include/gmp.h which gmp returns no gmp in (/usr/bin: /sbin: /usr/sbin: /usr/local/bin......) what do you suggest? I am not an expert in handling linux distribution and install directories :( thank you very much for your help Asma ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-06-07 16:11 ` Re : " charfi asma @ 2010-06-07 21:34 ` Philip Herron [not found] ` <AANLkTimBwfoGdgaz19gkeFoKhbnloKYT0VpVMmjVUgtA@mail.gmail.com> 1 sibling, 0 replies; 30+ messages in thread From: Philip Herron @ 2010-06-07 21:34 UTC (permalink / raw) To: charfi asma; +Cc: mail, gcc-help > When I install GMP 4.1.3.2 I did not get a pb. (that's why I tried to install an old version of gcc that did not require GMP 4.2) > > I tried to configure with --with-gmp but I did not find where the gmp is installed > whereis gmp gives /usr/include/gmp.h > which gmp returns no gmp in (/usr/bin: /sbin: /usr/sbin: /usr/local/bin......) > > what do you suggest? I am not an expert in handling linux distribution and install directories :( > Hey You may want to simply move the latest source version and install libmpc (http://www.multiprecision.org/index.php?prog=mpc) aswell since the interfaces changed alot since then i based my old front-end code on a gcc 4.0 and i just ended up starting from scratch when working with trunk. But if you want to keep working with that version you can try: configure --enable-languages=c,c++,.... --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib ... do the same with --with-mpfr-{include,lib} if you have problems. When you manually make install by default things generally go to /usr/local/include for the headers then lib for the actual library you link against unless you specify a prefix. If you want some reference on front-end code you can look a little at mine though mine focuses on working with trunk http://code.redbrain.co.uk/cgit.cgi/gcc-dev/tree/gcc/python?h=python Where pyspec.c is the compiler driver, then py-lang.c is the compiler proper then other files go along with it. Hope this helps in at least some way :) Its confusing but were working to make it simpler! Gcc rocks ;) --Phil /* Sorry forgot to cc the list :) */ ^ permalink raw reply [flat|nested] 30+ messages in thread
[parent not found: <AANLkTimBwfoGdgaz19gkeFoKhbnloKYT0VpVMmjVUgtA@mail.gmail.com>]
* Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make [not found] ` <AANLkTimBwfoGdgaz19gkeFoKhbnloKYT0VpVMmjVUgtA@mail.gmail.com> @ 2010-06-08 18:54 ` charfi asma 2010-06-08 21:34 ` Andi Hellmund 0 siblings, 1 reply; 30+ messages in thread From: charfi asma @ 2010-06-08 18:54 UTC (permalink / raw) To: Philip Herron; +Cc: gcc-help Hello, Thank you for your answer Philip. I moved to mandriva 2009 and I try to install now gcc4.4.4 with the sample_fe frontend I installed the GMP 4.3.2, MPFR 2.4.2 and MPC 0.8.2 all in /usr/local when I call configre with ( --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --enable-languages=sample_fe ) I get this error although sample_fe/config-lang.in contains: language="sample_fe" !!! and the last line of the generated error mention sample_fe in the list of supported langauges !!! checking for correct version of gmp.h... yes checking for correct version of mpfr.h... yes checking for version 0.10 of PPL... no checking for correct version of CLooG... no : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 7: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 9: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 11: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 13: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 7: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 9: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 11: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 13: configure: error: The following requested languages could not be built: sample_fe Supported languages are: c,c++,fortran,java,objc,obj-c++,sample_fe Any Idea ? Thanks Asma ----- Message d'origine ---- De : Philip Herron <herron.philip@googlemail.com> À : charfi asma <charfiasma@yahoo.fr> Envoyé le : Lun 7 juin 2010, 22h 00min 31s Objet : Re: Re : Re : [GCC front end] trying to install sample_fe but fail in make > When I install GMP 4.1.3.2 I did not get a pb. (that's why I tried to install an old version of gcc that did not require GMP 4.2) > > I tried to configure with --with-gmp but I did not find where the gmp is installed > whereis gmp gives /usr/include/gmp.h > which gmp returns no gmp in (/usr/bin: /sbin: /usr/sbin: /usr/local/bin......) > > what do you suggest? I am not an expert in handling linux distribution and install directories :( > Hey You may want to simply move the latest source version and install libmpc (http://www.multiprecision.org/index.php?prog=mpc) aswell since the interfaces changed alot since then i based my old front-end code on a gcc 4.0 and i just ended up starting from scratch when working with trunk. But if you want to keep working with that version you can try: configure --enable-languages=c,c++,.... --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib ... do the same with --with-mpfr-{include,lib} if you have problems. When you manually make install by default things generally go to /usr/local/include for the headers then lib for the actual library you link against unless you specify a prefix. If you want some reference on front-end code you can look a little at mine though mine focuses on working with trunk http://code.redbrain.co.uk/cgit.cgi/gcc-dev/tree/gcc/python?h=python Where pyspec.c is the compiler driver, then py-lang.c is the compiler proper then other files go along with it. Hope this helps in at least some way :) Its confusing but were working to make it simpler! Gcc rocks ;) --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-06-08 18:54 ` Re : " charfi asma @ 2010-06-08 21:34 ` Andi Hellmund 2010-06-23 16:52 ` Re : " charfi asma [not found] ` <895794.48229.qm@web28503.mail.ukl.yahoo.com> 0 siblings, 2 replies; 30+ messages in thread From: Andi Hellmund @ 2010-06-08 21:34 UTC (permalink / raw) To: charfi asma; +Cc: Philip Herron, gcc-help Hey, > I moved to mandriva 2009 and I try to install now gcc4.4.4 with the sample_fe frontend > I installed the GMP 4.3.2, MPFR 2.4.2 and MPC 0.8.2 all in /usr/local > when I call configre with ( --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local > --enable-languages=sample_fe ) I get this error although sample_fe/config-lang.in contains: language="sample_fe" !!! > and the last line of the generated error mention sample_fe in the list of supported langauges !!! Thanks for moving to a new version ... > > > checking for correct version of gmp.h... yes > checking for correct version of mpfr.h... yes > checking for version 0.10 of PPL... no > checking for correct version of CLooG... no > : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 7: > : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 9: > : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 11: > : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 13: > : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 7: > : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 9: > : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 11: > : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 13: > configure: error: > The following requested languages could not be built: sample_fe > Supported languages are: c,c++,fortran,java,objc,obj-c++,sample_fe First of all, I have no idea what's wrong, because I've never seen this error before. Well, all these mentioned lines are empty lines in the config-lang.in and it seems that the configure script or better your shell tries to execute these empty lines when the config-lang.in file gets included into the configure script. Just like I said, I tested the sample_fe front-end with my (x)ubuntu system in bootstrap mode, and I didn't face any problems. For me it seems - without any proof - that your POSIX shell (/bin/sh) is somehow broken. Which version of /bin/sh are you using? Because I don't have a Mandriva 2009 system by hand, I can't try to reproduce, but just for the case that you want to dig further into the problem, you could have a look into the configure script at lines 5066-5277. But, maybe as a first start, you could create two shell scripts with the following contents. They should try to reproduce your phenomenon: ===== first.sh ===== #!/bin/sh echo "START" value= . ./second.sh echo "AFTER ${value}" ===== END first.sh ===== second.sh ===== echo "SECOND" value=GCC echo "END SECOND" ===== END second.sh ===== After creating these two files, keep the file permissions of second.sh at 644 and change the file permissions for first.sh to 755 and finally execute # ./first.sh START SECOND END SECOND AFTER GCC Maybe someone else on this list has an idea what could be wrong or has already seen this error before ... Andi ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-06-08 21:34 ` Andi Hellmund @ 2010-06-23 16:52 ` charfi asma [not found] ` <895794.48229.qm@web28503.mail.ukl.yahoo.com> 1 sibling, 0 replies; 30+ messages in thread From: charfi asma @ 2010-06-23 16:52 UTC (permalink / raw) To: Andi Hellmund; +Cc: gcc-help Hello, Thank you Andi for your suggestions, but I do not think that my shell is broken I am using the GNU bash, version 3.2.19(2)-release (i586-mandriva-linux-gnu) [charfi@is010178 ~]$ sh -version GNU bash, version 3.2.19(2)-release (i586-mandriva-linux-gnu) Copyright (C) 2005 Free Software Foundation, Inc. I created the 2 scripts as you suggest, and executed first.sh, I get this: [charfi@is010178 ~]$ ./first.sh START SECOND END SECOND AFTER GCC I really need to add a front end to GCC. Have you any idea ? thank you very much Asma ----- Message d'origine ---- De : Andi Hellmund <mail@andihellmund.com> À : charfi asma <charfiasma@yahoo.fr> Cc : Philip Herron <herron.philip@googlemail.com>; gcc-help@gcc.gnu.org Envoyé le : Mar 8 juin 2010, 20h 54min 37s Objet : Re: Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make Hey, > I moved to mandriva 2009 and I try to install now gcc4.4.4 with the sample_fe frontend > I installed the GMP 4.3.2, MPFR 2.4.2 and MPC 0.8.2 all in /usr/local > when I call configre with ( --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local > --enable-languages=sample_fe ) I get this error although sample_fe/config-lang.in contains: language="sample_fe" !!! > and the last line of the generated error mention sample_fe in the list of supported langauges !!! Thanks for moving to a new version ... > > > checking for correct version of gmp.h... yes > checking for correct version of mpfr.h... yes > checking for version 0.10 of PPL... no > checking for correct version of CLooG... no > : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 7: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 9: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 11: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 13: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 7: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 9: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 11: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 13: configure: error: > The following requested languages could not be built: sample_fe > Supported languages are: c,c++,fortran,java,objc,obj-c++,sample_fe First of all, I have no idea what's wrong, because I've never seen this error before. Well, all these mentioned lines are empty lines in the config-lang.in and it seems that the configure script or better your shell tries to execute these empty lines when the config-lang.in file gets included into the configure script. Just like I said, I tested the sample_fe front-end with my (x)ubuntu system in bootstrap mode, and I didn't face any problems. For me it seems - without any proof - that your POSIX shell (/bin/sh) is somehow broken. Which version of /bin/sh are you using? Because I don't have a Mandriva 2009 system by hand, I can't try to reproduce, but just for the case that you want to dig further into the problem, you could have a look into the configure script at lines 5066-5277. But, maybe as a first start, you could create two shell scripts with the following contents. They should try to reproduce your phenomenon: ===== first.sh ===== #!/bin/sh echo "START" value= . ./second.sh echo "AFTER ${value}" ===== END first.sh ===== second.sh ===== echo "SECOND" value=GCC echo "END SECOND" ===== END second.sh ===== After creating these two files, keep the file permissions of second.sh at 644 and change the file permissions for first.sh to 755 and finally execute # ./first.sh START SECOND END SECOND AFTER GCC Maybe someone else on this list has an idea what could be wrong or has already seen this error before ... Andi ^ permalink raw reply [flat|nested] 30+ messages in thread
[parent not found: <895794.48229.qm@web28503.mail.ukl.yahoo.com>]
* Re: Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make [not found] ` <895794.48229.qm@web28503.mail.ukl.yahoo.com> @ 2010-06-24 1:53 ` Andi Hellmund 2010-06-24 5:26 ` Philip Herron 2010-06-25 0:15 ` Re : Re : " Jens Kilian 0 siblings, 2 replies; 30+ messages in thread From: Andi Hellmund @ 2010-06-24 1:53 UTC (permalink / raw) To: charfi asma; +Cc: gcc-help Hey Asma, > Thank you Andi for your suggestions, but I do not think that my shell is > broken I am using the GNU bash, version 3.2.19(2)-release > (i586-mandriva-linux-gnu) Yes, I now don't think that the shell is broken either. > > [charfi@is010178 ~]$ sh -version > GNU bash, version 3.2.19(2)-release (i586-mandriva-linux-gnu) > Copyright (C) 2005 Free Software Foundation, Inc. > > I created the 2 scripts as you suggest, and executed first.sh, I get this: > > [charfi@is010178 ~]$ ./first.sh > START > SECOND > END SECOND > AFTER GCC Okay, this approach was just too simple ... > I really need to add a front end to GCC. And I would really be glad to help and assist you, but it currently seems to me that the problem is specific to your machine only and that it would be generally hard to find it. However, maybe some of the suggestions/suspicions help: * you mentioned that the config-lang.in file from the C++ front-end works without any problems even though both files, from the C++ front-end and the sample_fe front-end "look" equal. But maybe, something went wrong during the download or extraction of the archive (just for the case, here's a checksum of the file using the cksum utility sample_fe config-lang.in 1684117529 427 config-lang.in * alternatively (a bit more time-consuming), you could try to copy the config-lang.in from the C++ front-end to the sample_fe directory and successively change this file back to the contents of the sample_fe config-lang.in while checking which change really makes the problems * if that all doesn't help, you could try to follow the suggestion of Philip to use his code for the python front-end with gcc-4.5.0 Best regards, Andi > > Have you any idea ? > > thank you very much > > Asma > > ------------------------------------------------------------------------ > *De :* Andi Hellmund <mail@andihellmund.com> > *à :* charfi asma <charfiasma@yahoo.fr> > *Cc :* Philip Herron <herron.philip@googlemail.com>; gcc-help@gcc.gnu.org > *Envoyé le :* Mar 8 juin 2010, 20h 54min 37s > *Objet :* Re: Re : Re : Re : [GCC front end] trying to install sample_fe > but fail in make > > Hey, > > > I moved to mandriva 2009 and I try to install now gcc4.4.4 with the > sample_fe frontend > > I installed the GMP 4.3.2, MPFR 2.4.2 and MPC 0.8.2 all in /usr/local > > when I call configre with ( --with-gmp=/usr/local > --with-mpfr=/usr/local --with-mpc=/usr/local > > --enable-languages=sample_fe ) I get this error although > sample_fe/config-lang.in contains: language="sample_fe" !!! > > and the last line of the generated error mention sample_fe in the > list of supported langauges !!! > > Thanks for moving to a new version ... > > > > > > checking for correct version of gmp.h... yes > > checking for correct version of mpfr.h... yes > > checking for version 0.10 of PPL... no > > checking for correct version of CLooG... no > > : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: > line 7: : command not > found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 9: : command > not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 11: : > command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line > 13: : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: > line 7: : command not > found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 9: : command > not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line 11: : > command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: line > 13: configure: error: > > The following requested languages could not be built: sample_fe > > Supported languages are: c,c++,fortran,java,objc,obj-c++,sample_fe > > First of all, I have no idea what's wrong, because I've never seen this > error before. Well, all these mentioned lines are empty lines in the > config-lang.in and it seems that the configure script or better your > shell tries to execute these empty lines when the config-lang.in file > gets included into the configure script. > > Just like I said, I tested the sample_fe front-end with my (x)ubuntu > system in bootstrap mode, and I didn't face any problems. > > For me it seems - without any proof - that your POSIX shell (/bin/sh) > is somehow broken. Which version of /bin/sh are you using? Because I > don't have a Mandriva 2009 system by hand, I can't try to reproduce, but > just for the case that you want to dig further into the problem, you > could have a look into the configure script at lines 5066-5277. > > But, maybe as a first start, you could create two shell scripts with the > following contents. They should try to reproduce your phenomenon: > > ===== first.sh ===== > #!/bin/sh > > echo "START" > value= > . ./second.sh > echo "AFTER ${value}" > ===== END first.sh > > > ===== second.sh ===== > echo "SECOND" > > value=GCC > > echo "END SECOND" > ===== END second.sh ===== > > After creating these two files, keep the file permissions of second.sh > at 644 and change the file permissions for first.sh to 755 and finally > execute > > # ./first.sh > START > SECOND > END SECOND > AFTER GCC > > Maybe someone else on this list has an idea what could be wrong or has > already seen this error before ... > > Andi > ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-06-24 1:53 ` Andi Hellmund @ 2010-06-24 5:26 ` Philip Herron 2010-06-24 23:41 ` Re : " charfi asma 2010-06-25 0:15 ` Re : Re : " Jens Kilian 1 sibling, 1 reply; 30+ messages in thread From: Philip Herron @ 2010-06-24 5:26 UTC (permalink / raw) To: Andi Hellmund; +Cc: charfi asma, gcc-help Hey On 23 June 2010 23:41, Andi Hellmund <mail@andihellmund.com> wrote: > * you mentioned that the config-lang.in file from the C++ front-end works > without any problems even though both files, from the C++ front-end and the > sample_fe front-end "look" equal. But maybe, something went wrong during the > download or extraction of the archive (just for the case, here's a checksum > of the file using the cksum utility > > sample_fe config-lang.in > 1684117529 427 config-lang.in Maybe his shell doesnt like the _ in sample_fe but i doubt it not really sure whats going on with his code. > > * alternatively (a bit more time-consuming), you could try to copy the > config-lang.in from the C++ front-end to the sample_fe directory and > successively change this file back to the contents of the sample_fe > config-lang.in while checking which change really makes the problems > > * if that all doesn't help, you could try to follow the suggestion of Philip > to use his code for the python front-end with gcc-4.5.0 > I think really if you really want to build a front-end is start working with llive GCC sources since we will be able to help you more easily than trying to debug whats going on with building it in older versions of GCC. I really think you should just start from scratch here and: mkdir gcc-dev && cd gcc-dev git clone git://gcc.gnu.org/git/gcc.git cd gcc mkdir build ../configure --enable-languages=c,c++,fortran make sudo make install If this all works fine were on our way. Then you need to understand a little bit about GCC, the driver and compiler proper. We build a compiler driver which decides which compiler to invoke over an input. So if you go into the gcc folder and look for a language like fortran this is all its front-end specific code, and there is gfortranspec.c which is this compiler driver then there is bla-lang.c is the compiler proper is the naming convention. The config-lang.in just denotes some config options like your lang name your compiler executable and your runtime library name etc. Then your Make-lang.in is your makefile for this setup. I am not going to lie the documentation for building up your front-end is nearly non-existant but we are working on this too, but there is alot to document. And it requires good understanding on C and Compiler construction overall. I would say take look at my front-end and the gccgo front-end they are the most readable front-ends since they lack the maturity of once's like C and Fortran or Ada which are fairly difficult to read. --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-06-24 5:26 ` Philip Herron @ 2010-06-24 23:41 ` charfi asma 2010-06-25 4:14 ` Andi Hellmund [not found] ` <4C23C78C.2040903@andihellmund.com> 0 siblings, 2 replies; 30+ messages in thread From: charfi asma @ 2010-06-24 23:41 UTC (permalink / raw) To: gcc-help Hello, Thank you Andi and Philip for all your suggestions. In fact, The problem comes from the extraction of the sample_fe package ;) I redownload the skeleton of sample_fe from the blog and I did not get any errors when calling configure, make bootstrap and make install ;) Now the fe is well installed (I hope) and I tried to compile the example given in the blog : I created file1.sfe and I called the gcc (with the -S option, because the front end is supposed to produce the assembly code from a simple c++ prgram) I get file named file1.o which is supposed to be the assembly file from file1.sfe [root@is010178 sample_fe_files]# /usr/local/bin/gcc -S file1.sfe Temps d'exécution (secondes) TOTAL : 0.00 0.00 0.01 61 kB but when I open the sfe.s generated from gcc I get only those 3 lines: .file "file1.sfe" .ident "GCC: (GNU) 4.4.4" .section .note.GNU-stack,"",@progbits did I use the front end it in the wrong way ? thank you for your help Asma ----- Message d'origine ---- De : Philip Herron <herron.philip@googlemail.com> À : Andi Hellmund <mail@andihellmund.com> Cc : charfi asma <charfiasma@yahoo.fr>; gcc-help@gcc.gnu.org Envoyé le : Jeu 24 juin 2010, 4h 35min 56s Objet : Re: Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make Hey On 23 June 2010 23:41, Andi Hellmund <mail@andihellmund.com> wrote: > * you mentioned that the config-lang.in file from the C++ front-end works > without any problems even though both files, from the C++ front-end and the > sample_fe front-end "look" equal. But maybe, something went wrong during the > download or extraction of the archive (just for the case, here's a checksum > of the file using the cksum utility > > sample_fe config-lang.in > 1684117529 427 config-lang.in Maybe his shell doesnt like the _ in sample_fe but i doubt it not really sure whats going on with his code. > > * alternatively (a bit more time-consuming), you could try to copy the > config-lang.in from the C++ front-end to the sample_fe directory and > successively change this file back to the contents of the sample_fe > config-lang.in while checking which change really makes the problems > > * if that all doesn't help, you could try to follow the suggestion of Philip > to use his code for the python front-end with gcc-4.5.0 > I think really if you really want to build a front-end is start working with llive GCC sources since we will be able to help you more easily than trying to debug whats going on with building it in older versions of GCC. I really think you should just start from scratch here and: mkdir gcc-dev && cd gcc-dev git clone git://gcc.gnu.org/git/gcc.git cd gcc mkdir build ../configure --enable-languages=c,c++,fortran make sudo make install If this all works fine were on our way. Then you need to understand a little bit about GCC, the driver and compiler proper. We build a compiler driver which decides which compiler to invoke over an input. So if you go into the gcc folder and look for a language like fortran this is all its front-end specific code, and there is gfortranspec.c which is this compiler driver then there is bla-lang.c is the compiler proper is the naming convention. The config-lang.in just denotes some config options like your lang name your compiler executable and your runtime library name etc. Then your Make-lang.in is your makefile for this setup. I am not going to lie the documentation for building up your front-end is nearly non-existant but we are working on this too, but there is alot to document. And it requires good understanding on C and Compiler construction overall. I would say take look at my front-end and the gccgo front-end they are the most readable front-ends since they lack the maturity of once's like C and Fortran or Ada which are fairly difficult to read. --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-06-24 23:41 ` Re : " charfi asma @ 2010-06-25 4:14 ` Andi Hellmund 2010-06-25 13:28 ` Philip Herron [not found] ` <4C23C78C.2040903@andihellmund.com> 1 sibling, 1 reply; 30+ messages in thread From: Andi Hellmund @ 2010-06-25 4:14 UTC (permalink / raw) To: charfi asma; +Cc: gcc-help Hey, > Thank you Andi and Philip for all your suggestions. > > In fact, The problem comes from the extraction of the sample_fe package ;) > I redownload the skeleton of sample_fe from the blog and I did not get any > errors when calling configure, make bootstrap and make install ;) Great, that it worked now! > .file "file1.sfe" > .ident "GCC: (GNU) 4.4.4" > .section .note.GNU-stack,"",@progbits Yes, you're using the correct front-end. I wrote into the blog, that this static code was a long-term goal. The primary goal of the sample_fe was to really just provide a skeleton without any contents. We'll, basically, I already have the code but it is not in the package in the blog. I could send you the code later this evening, but anyway, from now on you need to look at multiple front-ends to check how they produce code. The sample_fe should just provide you with the basic infrastructure. But, as Philip already said, we're working on a more complete front-end for demonstration purpose and for documentation purpose of the front-end infrastructure. Andi > ----- Message d'origine ---- > De : Philip Herron <herron.philip@googlemail.com> > à : Andi Hellmund <mail@andihellmund.com> > Cc : charfi asma <charfiasma@yahoo.fr>; gcc-help@gcc.gnu.org > Envoyé le : Jeu 24 juin 2010, 4h 35min 56s > Objet : Re: Re : Re : Re : Re : [GCC front end] trying to install > sample_fe but fail in make > > Hey > > On 23 June 2010 23:41, Andi Hellmund <mail@andihellmund.com> wrote: >> * you mentioned that the config-lang.in file from the C++ front-end >> works >> without any problems even though both files, from the C++ front-end and >> the >> sample_fe front-end "look" equal. But maybe, something went wrong during >> the >> download or extraction of the archive (just for the case, here's a >> checksum >> of the file using the cksum utility >> >> sample_fe config-lang.in >> 1684117529 427 config-lang.in > > Maybe his shell doesnt like the _ in sample_fe but i doubt it not > really sure whats going on with his code. > >> >> * alternatively (a bit more time-consuming), you could try to copy the >> config-lang.in from the C++ front-end to the sample_fe directory and >> successively change this file back to the contents of the sample_fe >> config-lang.in while checking which change really makes the problems >> >> * if that all doesn't help, you could try to follow the suggestion of >> Philip >> to use his code for the python front-end with gcc-4.5.0 >> > > I think really if you really want to build a front-end is start > working with llive GCC sources since we will be able to help you more > easily than trying to debug whats going on with building it in older > versions of GCC. > > I really think you should just start from scratch here and: > > mkdir gcc-dev && cd gcc-dev > git clone git://gcc.gnu.org/git/gcc.git > cd gcc > mkdir build > ../configure --enable-languages=c,c++,fortran > make > sudo make install > > If this all works fine were on our way. > > Then you need to understand a little bit about GCC, the driver and > compiler proper. We build a compiler driver which decides which > compiler to invoke over an input. > > So if you go into the gcc folder and look for a language like fortran > this is all its front-end specific code, and there is gfortranspec.c > which is this compiler driver then there is bla-lang.c is the compiler > proper is the naming convention. > > The config-lang.in just denotes some config options like your lang > name your compiler executable and your runtime library name etc. > > Then your Make-lang.in is your makefile for this setup. I am not going > to lie the documentation for building up your front-end is nearly > non-existant but we are working on this too, but there is alot to > document. And it requires good understanding on C and Compiler > construction overall. I would say take look at my front-end and the > gccgo front-end they are the most readable front-ends since they lack > the maturity of once's like C and Fortran or Ada which are fairly > difficult to read. > > --Phil > > > > > > ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-06-25 4:14 ` Andi Hellmund @ 2010-06-25 13:28 ` Philip Herron 0 siblings, 0 replies; 30+ messages in thread From: Philip Herron @ 2010-06-25 13:28 UTC (permalink / raw) To: mail; +Cc: charfi asma, gcc-help Hey all On 24 June 2010 17:06, Andi Hellmund <mail@andihellmund.com> wrote: > But, as Philip already said, we're working on a more complete front-end > for demonstration purpose and for documentation purpose of the front-end > infrastructure. Yeah but yeah if your working on a front-end don't be afraid to ask us questions any time its nice to have more people interested in developing GCC front-ends. In fact it would be great to simply share the experiences. GCC the more and more I've worked with it, the interfaces and structures you get to work with to build a front-end are actually really powerful and you get access to all the lovely optimizations gcc will do. Its just a pity there was no documentation prior to this but that's what were working on :). But yeah as I said Front-ends to look at now that you have a 'skeleton' would be mine: http://code.redbrain.co.uk/cgit.cgi/gcc-dev/tree/?h=python GccGO: http://code.redbrain.co.uk/cgit.cgi/gcc-dev/log/?h=gccgo Fortran's front-end is ok in some cases but really i only found it helpful in getting the bare bones together. But once you get a parser down to some kind of AST for your language your going to have to spend a lot of time looking how GENERIC works its really powerful but quite confusing. I think what is confusing when reading through other front-end code its sometimes hard to tell whether the code is calling tree API code or if it is front-end specific code, since the tree api is not prefixed with anything. --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
[parent not found: <4C23C78C.2040903@andihellmund.com>]
* Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make [not found] ` <4C23C78C.2040903@andihellmund.com> @ 2010-07-16 14:15 ` charfi asma 2010-07-17 3:48 ` Philip Herron 0 siblings, 1 reply; 30+ messages in thread From: charfi asma @ 2010-07-16 14:15 UTC (permalink / raw) To: Andi Hellmund; +Cc: gcc-help Hello, I run the sfe_example and it works perfectly. when I call gsfe -s file1.sfe, I get the file1.s which is nearly the same assembly generated when compiling the same c code with gcc. But now, I want to understand How it works ;) I look at the code of sfe_example.c and sfe1.c. I understand that sfe1 define a tree for each variable /type /c function in the c code, for example for the global_var, we have the function : create_decl_global_var() of type tree, etc in the sfe1.c, those functions are called in the getdecls(void) but this function tree getdecls(void) is never called so my questions are: 1. who calls all sfe1.c functions ( sfe_parse_file, getdecls, ...) ? 2. when we call the sfe1.c, is the result equal to the generic form of the c code ? In which file this form is stocked ? although I think that the body of each funcion of sfe1_example.c is writen in generic but I am not sure (generic is a list of tree code just like gimple) when I compile the same c code using gcc and dump the gimple form, I expected that the generic form is close to the gimple one, am I write ? 3. I do not really understand this code in the sfe1.h struct lang_identifier GTY(()) { struct tree_identifier common; }; union lang_tree_node GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"))) { union tree_node GTY ((tag ("0"), desc ("tree_node_structure (&%h)"))) generic; struct lang_identifier GTY ((tag ("1"))) identifier; }; thank you very much Asma ________________________________ De : Andi Hellmund <mail@andihellmund.com> À : charfi asma <charfiasma@yahoo.fr> Envoyé le : Jeu 24 juin 2010, 23h 01min 00s Objet : Re: Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make Hey, please find attached a version of the front-end with the example from the blog. It's been some time that I tested this code, so hopefully it is still working. If not, you would however get an impression on howto create GENERIC IR. Best regards, Andi ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-07-16 14:15 ` Re : " charfi asma @ 2010-07-17 3:48 ` Philip Herron 2010-07-19 13:56 ` Re : " charfi asma 0 siblings, 1 reply; 30+ messages in thread From: Philip Herron @ 2010-07-17 3:48 UTC (permalink / raw) To: charfi asma; +Cc: Andi Hellmund, gcc-help On 16 July 2010 15:08, charfi asma <charfiasma@yahoo.fr> wrote: > I run the sfe_example and it works perfectly. > when I call gsfe -s file1.sfe, I get the file1.s which is nearly the same > assembly generated when compiling the same c code with gcc. > > But now, I want to understand How it works ;) > > I look at the code of sfe_example.c and sfe1.c. > I understand that sfe1 define a tree for each variable /type /c function in the Most front-ends will Generate GENERIC which is the tree type you will see alot of. My frontend requires a more highlevel IR which i bring down to GENERIC much like GCCGO. > c code, for example for the global_var, we have the function : > create_decl_global_var() of type tree, etc > > in the sfe1.c, those functions are called in the getdecls(void) but this > function tree getdecls(void) is never called > > so my questions are: > > 1. who calls all sfe1.c functions ( sfe_parse_file, getdecls, ...) ? look at do_compile at gcc/toplev.c line 2319 i think, its responsible for calling all the necessary langhooks. > 2. when we call the sfe1.c, is the result equal to the generic form of the c > code ? In which file this form is stocked ? Are you asking is the IR generated the same as the C-front-end? Answer anything that uses the GENERIC IR is the same IR the C front-end uses. > > although I think that the body of each funcion of sfe1_example.c is writen in > generic but I am not sure (generic is a list of tree code just like gimple) > when I compile the same c code using gcc and dump the gimple form, I expected > that the generic form is close to the gimple one, am I write ? You may want to clone this git repo: $ git clone git://crules.org:gcc-dev.git # i think the git daemon should be running else let me know $ git checkout -t -b documentation origin/documentation And look at gcc/gcalc a front-end Andi put together its a basic front-end showing how you can use GCC as a backend to a calculator its nearly complete and its very well written it should show you everthing you need to know for a stock front-end. > 3. I do not really understand this code in the sfe1.h > > struct lang_identifier GTY(()) > { > struct tree_identifier common; > }; > > union lang_tree_node GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"))) > { > union tree_node GTY ((tag ("0"), desc ("tree_node_structure (&%h)"))) > generic; > struct lang_identifier GTY ((tag ("1"))) identifier; > }; These GTY markers are for the gentype which generates code for the garbage collector within gcc so it understands structures and so you can use them within some vectors in GCC or other data structures. These functions are simply boiler plate functions the compiler driver requires to be able to call the compiler proper i think and are the same in most front-ends most people should have no need to play with them. Hope this helps! --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re : Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-07-17 3:48 ` Philip Herron @ 2010-07-19 13:56 ` charfi asma 2010-07-21 15:53 ` Philip Herron 0 siblings, 1 reply; 30+ messages in thread From: charfi asma @ 2010-07-19 13:56 UTC (permalink / raw) To: Philip Herron; +Cc: gcc-help Hello, I tried to use git but it was not installed, I installed it with urpmi git ans urpmi git-core but when I type : # git clone git://crules.org:gcc-dev.git I get this error: Initialized empty Git repository in /export/home/charfi/gcc-dev/.git/ fatal: Unable to look up (port 9418) (Name or service not known) any idea ? thanks Asma ----- Message d'origine ---- De : Philip Herron <redbrain@gcc.gnu.org> À : charfi asma <charfiasma@yahoo.fr> Cc : Andi Hellmund <mail@andihellmund.com>; gcc-help@gcc.gnu.org Envoyé le : Sam 17 juillet 2010, 2h 27min 34s Objet : Re: Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make On 16 July 2010 15:08, charfi asma <charfiasma@yahoo.fr> wrote: > I run the sfe_example and it works perfectly. > when I call gsfe -s file1.sfe, I get the file1.s which is nearly the same > assembly generated when compiling the same c code with gcc. > > But now, I want to understand How it works ;) > > I look at the code of sfe_example.c and sfe1.c. > I understand that sfe1 define a tree for each variable /type /c function in >the Most front-ends will Generate GENERIC which is the tree type you will see alot of. My frontend requires a more highlevel IR which i bring down to GENERIC much like GCCGO. > c code, for example for the global_var, we have the function : > create_decl_global_var() of type tree, etc > > in the sfe1.c, those functions are called in the getdecls(void) but this > function tree getdecls(void) is never called > > so my questions are: > > 1. who calls all sfe1.c functions ( sfe_parse_file, getdecls, ...) ? look at do_compile at gcc/toplev.c line 2319 i think, its responsible for calling all the necessary langhooks. > 2. when we call the sfe1.c, is the result equal to the generic form of the c > code ? In which file this form is stocked ? Are you asking is the IR generated the same as the C-front-end? Answer anything that uses the GENERIC IR is the same IR the C front-end uses. > > although I think that the body of each funcion of sfe1_example.c is writen in > generic but I am not sure (generic is a list of tree code just like gimple) > when I compile the same c code using gcc and dump the gimple form, I expected > that the generic form is close to the gimple one, am I write ? You may want to clone this git repo: $ git clone git://crules.org:gcc-dev.git # i think the git daemon should be running else let me know $ git checkout -t -b documentation origin/documentation And look at gcc/gcalc a front-end Andi put together its a basic front-end showing how you can use GCC as a backend to a calculator its nearly complete and its very well written it should show you everthing you need to know for a stock front-end. > 3. I do not really understand this code in the sfe1.h > > struct lang_identifier GTY(()) > { > struct tree_identifier common; > }; > > union lang_tree_node GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"))) > { > union tree_node GTY ((tag ("0"), desc ("tree_node_structure (&%h)"))) > generic; > struct lang_identifier GTY ((tag ("1"))) identifier; > }; These GTY markers are for the gentype which generates code for the garbage collector within gcc so it understands structures and so you can use them within some vectors in GCC or other data structures. These functions are simply boiler plate functions the compiler driver requires to be able to call the compiler proper i think and are the same in most front-ends most people should have no need to play with them. Hope this helps! --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Re : Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-07-19 13:56 ` Re : " charfi asma @ 2010-07-21 15:53 ` Philip Herron 2010-08-16 12:32 ` Re : " charfi asma 0 siblings, 1 reply; 30+ messages in thread From: Philip Herron @ 2010-07-21 15:53 UTC (permalink / raw) To: charfi asma; +Cc: gcc-help On 19 July 2010 13:21, charfi asma <charfiasma@yahoo.fr> wrote: > I tried to use git but it was not installed, I installed it with urpmi git ans > urpmi git-core > but when I type : > # git clone git://crules.org:gcc-dev.git > > I get this error: > > Initialized empty Git repository in /export/home/charfi/gcc-dev/.git/ > fatal: Unable to look up (port 9418) (Name or service not known) > Ah sorry took me so long to reply i actually gave the wrong git link lol i just tried: git clone git://crules.org/git/gcc-dev.git Should work now i just checked, let me know how you get on :) There is a git export thing i need to make sure is there so as it exports them and it wasnt there :P --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re : Re : Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-07-21 15:53 ` Philip Herron @ 2010-08-16 12:32 ` charfi asma 2010-08-18 9:22 ` Philip Herron 0 siblings, 1 reply; 30+ messages in thread From: charfi asma @ 2010-08-16 12:32 UTC (permalink / raw) To: Philip Herron; +Cc: gcc-help Hello, I tried now with the right git link and this is what I get: [root@is010178 sample_fe_files]# git clone git://crules.org/git/gcc-dev.git Initialized empty Git repository in /export/home/charfi/Bureau/sample_fe_files/gcc-dev/.git/ remote: Counting objects: 997287, done. remote: Compressing objects: 100% (175851/175851), done. remote: Total 997287 (delta 808734), reused 987908 (delta 799804) Receiving objects: 100% (997287/997287), 450.05 MiB | 2119 KiB/s, done. Resolving deltas: 100% (808734/808734), done. Checking out files: 100% (66888/66888), done. but I can not find the gcc/gcalc front end. I get this error when I checkout : [root@is010178 sample_fe_files]# git checkout -t -b documentation origin/documentation fatal: Not a git repository any Idea ? thanks, ----- Message d'origine ---- De : Philip Herron <redbrain@gcc.gnu.org> À : charfi asma <charfiasma@yahoo.fr> Cc : gcc-help@gcc.gnu.org Envoyé le : Mer 21 juillet 2010, 17h 42min 20s Objet : Re: Re : Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make On 19 July 2010 13:21, charfi asma <charfiasma@yahoo.fr> wrote: > I tried to use git but it was not installed, I installed it with urpmi git ans > urpmi git-core > but when I type : > # git clone git://crules.org:gcc-dev.git > > I get this error: > > Initialized empty Git repository in /export/home/charfi/gcc-dev/.git/ > fatal: Unable to look up (port 9418) (Name or service not known) > Ah sorry took me so long to reply i actually gave the wrong git link lol i just tried: git clone git://crules.org/git/gcc-dev.git Should work now i just checked, let me know how you get on :) There is a git export thing i need to make sure is there so as it exports them and it wasnt there :P --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Re : Re : Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-08-16 12:32 ` Re : " charfi asma @ 2010-08-18 9:22 ` Philip Herron 2010-08-18 16:07 ` Re : " charfi asma 0 siblings, 1 reply; 30+ messages in thread From: Philip Herron @ 2010-08-18 9:22 UTC (permalink / raw) To: charfi asma; +Cc: gcc-help On 16 August 2010 13:22, charfi asma <charfiasma@yahoo.fr> wrote: > Hello, > > I tried now with the right git link and this is what I get: > > [root@is010178 sample_fe_files]# git clone git://crules.org/git/gcc-dev.git > > Initialized empty Git repository in > /export/home/charfi/Bureau/sample_fe_files/gcc-dev/.git/ > remote: Counting objects: 997287, done. > remote: Compressing objects: 100% (175851/175851), done. > remote: Total 997287 (delta 808734), reused 987908 (delta 799804) > Receiving objects: 100% (997287/997287), 450.05 MiB | 2119 KiB/s, done. > Resolving deltas: 100% (808734/808734), done. > Checking out files: 100% (66888/66888), done. > > but I can not find the gcc/gcalc front end. I get this error when I checkout : > > [root@is010178 sample_fe_files]# git checkout -t -b documentation > origin/documentation > fatal: Not a git repository > Hey Sorry for all the problems so far, i probably spelt the branch name wrong i always do that when i want to do documentation. Try this command copy and paste it just to be safe since it should work: $ git checkout --track -b gcalc origin/documentation That should work, i plan on adding to andi's code over the next few days a basic runtime library to have a print function. And work on more documentation since i have many errors and stale ideas in there. --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re : Re : Re : Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-08-18 9:22 ` Philip Herron @ 2010-08-18 16:07 ` charfi asma 2010-08-18 17:40 ` Philip Herron 0 siblings, 1 reply; 30+ messages in thread From: charfi asma @ 2010-08-18 16:07 UTC (permalink / raw) To: gcc-help your first link works as well, we have just to checkout from the gcc-dev directory. so both links are fine # git checkout -t -b documentation origin/documentation # git checkout --track -b gcalc origin/documentation Asma ----- Message d'origine ---- De : Philip Herron <redbrain@gcc.gnu.org> À : charfi asma <charfiasma@yahoo.fr> Cc : gcc-help@gcc.gnu.org Envoyé le : Mer 18 août 2010, 3h 03min 27s Objet : Re: Re : Re : Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make On 16 August 2010 13:22, charfi asma <charfiasma@yahoo.fr> wrote: > Hello, > > I tried now with the right git link and this is what I get: > > [root@is010178 sample_fe_files]# git clone git://crules.org/git/gcc-dev.git > > Initialized empty Git repository in > /export/home/charfi/Bureau/sample_fe_files/gcc-dev/.git/ > remote: Counting objects: 997287, done. > remote: Compressing objects: 100% (175851/175851), done. > remote: Total 997287 (delta 808734), reused 987908 (delta 799804) > Receiving objects: 100% (997287/997287), 450.05 MiB | 2119 KiB/s, done. > Resolving deltas: 100% (808734/808734), done. > Checking out files: 100% (66888/66888), done. > > but I can not find the gcc/gcalc front end. I get this error when I checkout : > > [root@is010178 sample_fe_files]# git checkout -t -b documentation > origin/documentation > fatal: Not a git repository > Hey Sorry for all the problems so far, i probably spelt the branch name wrong i always do that when i want to do documentation. Try this command copy and paste it just to be safe since it should work: $ git checkout --track -b gcalc origin/documentation That should work, i plan on adding to andi's code over the next few days a basic runtime library to have a print function. And work on more documentation since i have many errors and stale ideas in there. --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Re : Re : Re : Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-08-18 16:07 ` Re : " charfi asma @ 2010-08-18 17:40 ` Philip Herron 2010-08-19 17:39 ` Re : " charfi asma 0 siblings, 1 reply; 30+ messages in thread From: Philip Herron @ 2010-08-18 17:40 UTC (permalink / raw) To: charfi asma; +Cc: gcc-help On 18 August 2010 15:43, charfi asma <charfiasma@yahoo.fr> wrote: > > your first link works as well, we have just to checkout from the gcc-dev > directory. > > so both links are fine > > # git checkout -t -b documentation origin/documentation > # git checkout --track -b gcalc origin/documentation > > Asma > Hope this helps you along the way, to building a front-end it looks like a lot of pain in the beginning to setup bits and bobs, but gcc is brilliant for build a new language on and the GENERIC tree api is great although its quite daunting to get used to at the start. Follow gcalc and maybe re-create it in your own way or build a new basic language, then just go from there. Its not as painful as you may think, once you get started you will be flying. Let us know how you get on and remember we have the irc on irc.oftc.net #gcc feel free to ask questions there too in a more informal manor. --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re : Re : Re : Re : Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-08-18 17:40 ` Philip Herron @ 2010-08-19 17:39 ` charfi asma 2010-08-20 4:33 ` Philip Herron 0 siblings, 1 reply; 30+ messages in thread From: charfi asma @ 2010-08-19 17:39 UTC (permalink / raw) To: gcc-help I tried to add gcalc as a front end to gcc 4.4.4 to understand the purpose of this fe. but when I call make I get those errors /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:141:104: erreur: la macro « build_decl » a reçu 4 arguments, mais elle n'en prend que 3 /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c: In function ‘calc_parse_file’: /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:141: erreur: ‘build_decl’ undeclared (first use in this function) /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:141: erreur: (Each undeclared identifier is reported only once /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:141: erreur: for each function it appears in.) /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:148:96: erreur: la macro « build_decl » a reçu 4 arguments, mais elle n'en prend que 3 /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:140: attention : unused variable ‘main_fn_type’ /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c: In function ‘calc_post_options’: /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:274: erreur: ‘flag_excess_precision_cmdline’ undeclared (first use in this function) /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:274: erreur: ‘EXCESS_PRECISION_FAST’ undeclared (first use in this function) /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c: Hors de toute fonction : /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:294: erreur: conflicting type qualifiers for ‘lang_hooks’ /export/home/charfi/Bureau/gcc-4.4.4/gcc/langhooks.h:422: note: previous declaration of ‘lang_hooks’ was here /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:297:28: erreur: gt-gcalc-calc1.h : Aucun fichier ou dossier de ce type make[3]: *** [gcalc/calc1.o] Erreur 1 make[3]: quittant le répertoire « /export/home/charfi/Bureau/gcc_make2/gcc » make[2]: *** [all-stage2-gcc] Erreur 2 make[2]: quittant le répertoire « /export/home/charfi/Bureau/gcc_make2 » make[1]: *** [stage2-bubble] Erreur 2 make[1]: quittant le répertoire « /export/home/charfi/Bureau/gcc_make2 » make: *** [all] Erreur 2 thank you for your help Asma ----- Message d'origine ---- De : Philip Herron <redbrain@gcc.gnu.org> À : charfi asma <charfiasma@yahoo.fr> Cc : gcc-help@gcc.gnu.org Envoyé le : Mer 18 août 2010, 18h 23min 48s Objet : Re: Re : Re : Re : Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make On 18 August 2010 15:43, charfi asma <charfiasma@yahoo.fr> wrote: > > your first link works as well, we have just to checkout from the gcc-dev > directory. > > so both links are fine > > # git checkout -t -b documentation origin/documentation > # git checkout --track -b gcalc origin/documentation > > Asma > Hope this helps you along the way, to building a front-end it looks like a lot of pain in the beginning to setup bits and bobs, but gcc is brilliant for build a new language on and the GENERIC tree api is great although its quite daunting to get used to at the start. Follow gcalc and maybe re-create it in your own way or build a new basic language, then just go from there. Its not as painful as you may think, once you get started you will be flying. Let us know how you get on and remember we have the irc on irc.oftc.net #gcc feel free to ask questions there too in a more informal manor. --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Re : Re : Re : Re : Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-08-19 17:39 ` Re : " charfi asma @ 2010-08-20 4:33 ` Philip Herron 2010-08-21 10:37 ` Re : " charfi asma 0 siblings, 1 reply; 30+ messages in thread From: Philip Herron @ 2010-08-20 4:33 UTC (permalink / raw) To: charfi asma; +Cc: gcc-help On 19 August 2010 14:03, charfi asma <charfiasma@yahoo.fr> wrote: > I tried to add gcalc as a front end to gcc 4.4.4 to understand the purpose of > this fe. > but when I call make I get those errors > > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:141:104: erreur: la macro > « build_decl » a reçu 4 arguments, mais elle n'en prend que 3 > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c: In function > ‘calc_parse_file’: > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:141: erreur: ‘build_decl’ > undeclared (first use in this function) > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:141: erreur: (Each > undeclared identifier is reported only once > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:141: erreur: for each > function it appears in.) > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:148:96: erreur: la macro > « build_decl » a reçu 4 arguments, mais elle n'en prend que 3 > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:140: attention : unused > variable ‘main_fn_type’ > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c: In function > ‘calc_post_options’: > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:274: erreur: > ‘flag_excess_precision_cmdline’ undeclared (first use in this function) > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:274: erreur: > ‘EXCESS_PRECISION_FAST’ undeclared (first use in this function) > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c: Hors de toute fonction : > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:294: erreur: conflicting > type qualifiers for ‘lang_hooks’ > /export/home/charfi/Bureau/gcc-4.4.4/gcc/langhooks.h:422: note: previous > declaration of ‘lang_hooks’ was here > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:297:28: erreur: > gt-gcalc-calc1.h : Aucun fichier ou dossier de ce type > make[3]: *** [gcalc/calc1.o] Erreur 1 > make[3]: quittant le répertoire « /export/home/charfi/Bureau/gcc_make2/gcc » > make[2]: *** [all-stage2-gcc] Erreur 2 > make[2]: quittant le répertoire « /export/home/charfi/Bureau/gcc_make2 » > make[1]: *** [stage2-bubble] Erreur 2 > make[1]: quittant le répertoire « /export/home/charfi/Bureau/gcc_make2 » > make: *** [all] Erreur 2 > This looks like langhook's function significant errors. Don't expect langhooks as is to be stable, since i started my front-end I've noticed 1 or 2 changes in the last 3 months or so. Its highly doubtful you could get the gcalc front-end andi build to work on GCC 4.4.4, without looking into langhooks.{h,def} to get the langhook function signatures right. As we have said earlier in this thread, try to work with current gcc sources (svn/git) its much simpler for us to help you, or if your heart is set on using a tarball use a snapshot gcc-core tarball or something. --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re : Re : Re : Re : Re : Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-08-20 4:33 ` Philip Herron @ 2010-08-21 10:37 ` charfi asma 2010-08-24 6:34 ` Andi Hellmund 0 siblings, 1 reply; 30+ messages in thread From: charfi asma @ 2010-08-21 10:37 UTC (permalink / raw) To: Philip Herron; +Cc: gcc-help Hello, I used git to get the current gcc-dev directory and I tried to install python, gcalc and sample_fe at the same time. I configured with and It worked when I call make bootstrap, I get an error dealing with the GTY (GTY must be declared before identifier) in the sfe1.h (sample_fe front end) I changed the sfe1.h and it works, but I get another error : checking whether ln -s works... yes checking for i686-pc-linux-gnu-gcc... /export/home/charfi/objdir/./gcc/xgcc -B/export/home/charfi/objdir/./gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include checking for suffix of object files... configure: error: in `/export/home/charfi/objdir/i686-pc-linux-gnu/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. make[2]: *** [configure-stage1-target-libgcc] Erreur 1 make[2]: quittant le répertoire « /export/home/charfi/objdir » make[1]: *** [stage1-bubble] Erreur 2 make[1]: quittant le répertoire « /export/home/charfi/objdir » make: *** [all] Erreur 2 any idea ? thank you very much ASMA ----- Message d'origine ---- De : Philip Herron <redbrain@gcc.gnu.org> À : charfi asma <charfiasma@yahoo.fr> Cc : gcc-help@gcc.gnu.org Envoyé le : Jeu 19 août 2010, 19h 39min 16s Objet : Re: Re : Re : Re : Re : Re : Re : Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make On 19 August 2010 14:03, charfi asma <charfiasma@yahoo.fr> wrote: > I tried to add gcalc as a front end to gcc 4.4.4 to understand the purpose of > this fe. > but when I call make I get those errors > > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:141:104: erreur: la >macro > « build_decl » a reçu 4 arguments, mais elle n'en prend que 3 > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c: In function > ‘calc_parse_file’: > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:141: erreur: >‘build_decl’ > undeclared (first use in this function) > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:141: erreur: (Each > undeclared identifier is reported only once > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:141: erreur: for each > function it appears in.) > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:148:96: erreur: la macro > « build_decl » a reçu 4 arguments, mais elle n'en prend que 3 > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:140: attention : unused > variable ‘main_fn_type’ > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c: In function > ‘calc_post_options’: > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:274: erreur: > ‘flag_excess_precision_cmdline’ undeclared (first use in this function) > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:274: erreur: > ‘EXCESS_PRECISION_FAST’ undeclared (first use in this function) > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c: Hors de toute fonction >: > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:294: erreur: conflicting > type qualifiers for ‘lang_hooks’ > /export/home/charfi/Bureau/gcc-4.4.4/gcc/langhooks.h:422: note: previous > declaration of ‘lang_hooks’ was here > /export/home/charfi/Bureau/gcc-4.4.4/gcc/gcalc/calc1.c:297:28: erreur: > gt-gcalc-calc1.h : Aucun fichier ou dossier de ce type > make[3]: *** [gcalc/calc1.o] Erreur 1 > make[3]: quittant le répertoire « /export/home/charfi/Bureau/gcc_make2/gcc » > make[2]: *** [all-stage2-gcc] Erreur 2 > make[2]: quittant le répertoire « /export/home/charfi/Bureau/gcc_make2 » > make[1]: *** [stage2-bubble] Erreur 2 > make[1]: quittant le répertoire « /export/home/charfi/Bureau/gcc_make2 » > make: *** [all] Erreur 2 > This looks like langhook's function significant errors. Don't expect langhooks as is to be stable, since i started my front-end I've noticed 1 or 2 changes in the last 3 months or so. Its highly doubtful you could get the gcalc front-end andi build to work on GCC 4.4.4, without looking into langhooks.{h,def} to get the langhook function signatures right. As we have said earlier in this thread, try to work with current gcc sources (svn/git) its much simpler for us to help you, or if your heart is set on using a tarball use a snapshot gcc-core tarball or something. --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [GCC front end] trying to install sample_fe but fail in make 2010-08-21 10:37 ` Re : " charfi asma @ 2010-08-24 6:34 ` Andi Hellmund 2010-08-24 13:45 ` Re : " charfi asma 0 siblings, 1 reply; 30+ messages in thread From: Andi Hellmund @ 2010-08-24 6:34 UTC (permalink / raw) To: charfi asma; +Cc: Philip Herron, gcc-help Hey ASMA, > I used git to get the current gcc-dev directory and I tried to install python, > gcalc and sample_fe at the same time. > I configured with and It worked > when I call make bootstrap, I get an error dealing with the GTY (GTY must be > declared before identifier) in the sfe1.h (sample_fe front end) Yes, this might occur if you use older versions (for example built for 4.4) in 4.5. builds. The handling of GTY(()) slightly changed with 4.5 . But, you already corrected it accordingly. > checking for suffix of object files... configure: error: in > `/export/home/charfi/objdir/i686-pc-linux-gnu/libgcc': > configure: error: cannot compute suffix of object files: cannot compile > See `config.log' for more details. You'll need to look at the file config.log in directory /export/home/charfi/objdir/i686-pc-linux-gnu/libgcc. It will tell you what's missing. Maybe you're just missing a depending library (mpc, mpfr, gmp). Cheers, Andi ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re : [GCC front end] trying to install sample_fe but fail in make 2010-08-24 6:34 ` Andi Hellmund @ 2010-08-24 13:45 ` charfi asma 2010-08-25 21:46 ` Philip Herron 0 siblings, 1 reply; 30+ messages in thread From: charfi asma @ 2010-08-24 13:45 UTC (permalink / raw) To: Andi Hellmund; +Cc: gcc-help Hi, I looked at the config.log in libgcc and As Andi predict, it is a problem of libmpc (please find bellow a snipset of config.log input ) but mpc is well installed and when I enable the sample_fe front end, the configure, make and make install work perfectly with gcc 4.4.4 the problem comes from dev_gcc that I download from git, although I am using the last version of mpc: 0.82. should I use other version ?? I verified that the file libmpc.so.2 exists in the /usr/local/lib but tthe config.log said "cannot open shared object file: No such file or directory" any idea ?? configure:2993: /export/home/charfi/Bureau/objgcc2/./gcc/xgcc -B/export/home/charfi/Bureau/objgcc2/./gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include -V >&5 xgcc: error: unrecognized option '-V' xgcc: fatal error: no input files compilation terminated. configure:3004: $? = 1 configure:2993: /export/home/charfi/Bureau/objgcc2/./gcc/xgcc -B/export/home/charfi/Bureau/objgcc2/./gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include -qversion >&5 xgcc: error: unrecognized option '-qversion' xgcc: fatal error: no input files compilation terminated. configure:3004: $? = 1 configure:3020: /export/home/charfi/Bureau/objgcc2/./gcc/xgcc -B/export/home/charfi/Bureau/objgcc2/./gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include -o conftest -g -O2 conftest.c >&5 /export/home/charfi/Bureau/objgcc2/./gcc/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory configure:3023: $? = 1 configure:3211: checking for suffix of object files configure:3233: /export/home/charfi/Bureau/objgcc2/./gcc/xgcc -B/export/home/charfi/Bureau/objgcc2/./gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include -c -g -O2 conftest.c >&5 /export/home/charfi/Bureau/objgcc2/./gcc/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory configure:3237: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "GNU C Runtime Library" | #define PACKAGE_TARNAME "libgcc" | #define PACKAGE_VERSION "1.0" | #define PACKAGE_STRING "GNU C Runtime Library 1.0" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "http://www.gnu.org/software/libgcc/" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:3251: error: in `/export/home/charfi/Bureau/objgcc2/i686-pc-linux-gnu/libgcc': configure:3254: error: cannot compute suffix of object files: cannot compile ----- Message d'origine ---- De : Andi Hellmund <mail@andihellmund.com> À : charfi asma <charfiasma@yahoo.fr> Cc : Philip Herron <redbrain@gcc.gnu.org>; gcc-help@gcc.gnu.org Envoyé le : Lun 23 août 2010, 22h 32min 51s Objet : Re: [GCC front end] trying to install sample_fe but fail in make Hey ASMA, > I used git to get the current gcc-dev directory and I tried to install python, >gcalc and sample_fe at the same time. > I configured with and It worked when I call make bootstrap, I get an error >dealing with the GTY (GTY must be declared before identifier) in the sfe1.h >(sample_fe front end) Yes, this might occur if you use older versions (for example built for 4.4) in 4.5. builds. The handling of GTY(()) slightly changed with 4.5 . But, you already corrected it accordingly. > checking for suffix of object files... configure: error: in >`/export/home/charfi/objdir/i686-pc-linux-gnu/libgcc': > configure: error: cannot compute suffix of object files: cannot compile > See `config.log' for more details. You'll need to look at the file config.log in directory /export/home/charfi/objdir/i686-pc-linux-gnu/libgcc. It will tell you what's missing. Maybe you're just missing a depending library (mpc, mpfr, gmp). Cheers, Andi ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Re : [GCC front end] trying to install sample_fe but fail in make 2010-08-24 13:45 ` Re : " charfi asma @ 2010-08-25 21:46 ` Philip Herron 2010-08-26 13:02 ` Re : " charfi asma 0 siblings, 1 reply; 30+ messages in thread From: Philip Herron @ 2010-08-25 21:46 UTC (permalink / raw) To: charfi asma; +Cc: Andi Hellmund, gcc-help Hey I am not quite sure what your trying to achieve at the moment if you copy the python front-end folder into a base gcc the resulting compiler won't work since you also need libgpython at the toplevel the runtime library which the generated code needs linked against. So i suggest follow these instructions: $ git clone git://crules.org/git/gcc-dev.git $ git branch test $ git checkout test $ git merge python $ git merge documentation Then try and compile... make sure you can compile gcc normaly from a tarball or something so we can be sure there isn't some error on our side with libmpc checks. You should now have gcalc and gccpy, though i reckon gcalc may fail compilation since the langhooks have have changed slightly, but i'll check and fix it soon, i took a few days off there since friday. Back hacking now though :) Hope this helps, sorry for the late reply. --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-08-25 21:46 ` Philip Herron @ 2010-08-26 13:02 ` charfi asma 0 siblings, 0 replies; 30+ messages in thread From: charfi asma @ 2010-08-26 13:02 UTC (permalink / raw) To: Philip Herron; +Cc: gcc-help Hi Philip, I red your 10 doc pages http://code.redbrain.co.uk/cgit.cgi/gcc-dev/tree/gcc/doc/languages.texi?h=documentation it was helpful for me to understand the role of lexer.l and parser.y in the python fe. what I try to do is to compile your fe. I thought that I can add the python fe to gcc, write file.py and compile this file using gpy1. Normally, we can write code in python and gcc will compile and execute this code if the python fe is added to gcc directory, configured and installed. I tried to follow your instructions, but it fails in git merge python here is the error: [charfi@is010178 gcc-dev]$ git merge python fatal: 'python' does not point to a commit [charfi@is010178 gcc-dev]$ git merge documentation fatal: 'documentation' does not point to a commit any idea ? hope that you did not spell the branch name wrong as usual when dealing with documentation ;) thanks Asma ----- Message d'origine ---- De : Philip Herron <redbrain@gcc.gnu.org> À : charfi asma <charfiasma@yahoo.fr> Cc : Andi Hellmund <mail@andihellmund.com>; gcc-help@gcc.gnu.org Envoyé le : Mer 25 août 2010, 17h 22min 32s Objet : Re: Re : [GCC front end] trying to install sample_fe but fail in make Hey I am not quite sure what your trying to achieve at the moment if you copy the python front-end folder into a base gcc the resulting compiler won't work since you also need libgpython at the toplevel the runtime library which the generated code needs linked against. So i suggest follow these instructions: $ git clone git://crules.org/git/gcc-dev.git $ git branch test $ git checkout test $ git merge python $ git merge documentation Then try and compile... make sure you can compile gcc normaly from a tarball or something so we can be sure there isn't some error on our side with libmpc checks. You should now have gcalc and gccpy, though i reckon gcalc may fail compilation since the langhooks have have changed slightly, but i'll check and fix it soon, i took a few days off there since friday. Back hacking now though :) Hope this helps, sorry for the late reply. --Phil ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: Re : Re : Re : Re : [GCC front end] trying to install sample_fe but fail in make 2010-06-24 1:53 ` Andi Hellmund 2010-06-24 5:26 ` Philip Herron @ 2010-06-25 0:15 ` Jens Kilian 1 sibling, 0 replies; 30+ messages in thread From: Jens Kilian @ 2010-06-25 0:15 UTC (permalink / raw) To: Andi Hellmund; +Cc: charfi asma, gcc-help On Thu, 2010-06-24 at 00:41 +0200, Andi Hellmund wrote: > > > checking for correct version of gmp.h... yes > > > checking for correct version of mpfr.h... yes > > > checking for version 0.10 of PPL... no > > > checking for correct version of CLooG... no > > > : command not found/Bureau/gcc-4.4.4/gcc/sample_fe/config-lang.in: > > line 7: : command not Check for CR (0x0d, \015) characters in your shell script... HTH, Jens. -- mailto:jjk@acm.org phone:+49-7031-4357-122 http://www.bawue.de/~jjk/ fax:+49-7031-4357-483 http://del.icio.us/jjk As the air to a bird, or the sea to a fish, so is contempt to the contemptible. [Blake] ^ permalink raw reply [flat|nested] 30+ messages in thread
end of thread, other threads:[~2010-08-26 9:04 UTC | newest] Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-06-04 15:04 [GCC front end] trying to install sample_fe but fail in make charfi asma 2010-06-04 15:46 ` Andi Hellmund 2010-06-07 13:34 ` Re : " charfi asma 2010-06-07 14:28 ` Andi Hellmund 2010-06-07 16:11 ` Re : " charfi asma 2010-06-07 21:34 ` Philip Herron [not found] ` <AANLkTimBwfoGdgaz19gkeFoKhbnloKYT0VpVMmjVUgtA@mail.gmail.com> 2010-06-08 18:54 ` Re : " charfi asma 2010-06-08 21:34 ` Andi Hellmund 2010-06-23 16:52 ` Re : " charfi asma [not found] ` <895794.48229.qm@web28503.mail.ukl.yahoo.com> 2010-06-24 1:53 ` Andi Hellmund 2010-06-24 5:26 ` Philip Herron 2010-06-24 23:41 ` Re : " charfi asma 2010-06-25 4:14 ` Andi Hellmund 2010-06-25 13:28 ` Philip Herron [not found] ` <4C23C78C.2040903@andihellmund.com> 2010-07-16 14:15 ` Re : " charfi asma 2010-07-17 3:48 ` Philip Herron 2010-07-19 13:56 ` Re : " charfi asma 2010-07-21 15:53 ` Philip Herron 2010-08-16 12:32 ` Re : " charfi asma 2010-08-18 9:22 ` Philip Herron 2010-08-18 16:07 ` Re : " charfi asma 2010-08-18 17:40 ` Philip Herron 2010-08-19 17:39 ` Re : " charfi asma 2010-08-20 4:33 ` Philip Herron 2010-08-21 10:37 ` Re : " charfi asma 2010-08-24 6:34 ` Andi Hellmund 2010-08-24 13:45 ` Re : " charfi asma 2010-08-25 21:46 ` Philip Herron 2010-08-26 13:02 ` Re : " charfi asma 2010-06-25 0:15 ` Re : Re : " Jens Kilian
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).