I'm working on updating the MELT plugin package that is living in mandriva cooker. Turns out that it does not work. First stage melt.so is built successfully but is unable to be loaded to continue:
***** doing melt-stage1/warmelt-first.c from melt-build.tpl line 343 doing warmelt-first+melt-stage1 from melt-build.tpl line 344 gcc -c @warmelt-first+melt-stage1.args cc1: error: cannot load plugin /home/alex/BuildSystem/gcc-plugin-melt/BUILD/melt-0.9.4.b-plugin-for-gcc-4. 6-or-4.7/melt.so /home/alex/BuildSystem/gcc-plugin-melt/BUILD/melt-0.9.4.b-plugin-for-gcc-4. 6-or-4.7/melt.so: undefined symbol: warning_at
> I'm working on updating the MELT plugin package that is living in > mandriva cooker. Turns out that it does not work. First stage melt.so is > built successfully but is unable to be loaded to continue:
> ***** doing melt-stage1/warmelt-first.c from melt-build.tpl line 343 > doing warmelt-first+melt-stage1 from melt-build.tpl line 344 > gcc -c @warmelt-first+melt-stage1.args > cc1: error: cannot load plugin > /home/alex/BuildSystem/gcc-plugin-melt/BUILD/melt-0.9.4.b-plugin-for-gcc-4. 6-or-4.7/melt.so > /home/alex/BuildSystem/gcc-plugin-melt/BUILD/melt-0.9.4.b-plugin-for-gcc-4. 6-or-4.7/melt.so: > undefined symbol: warning_at
Are you building it for GCC 4.7? Some versions of GCC 4.7 (in particular Debian/Sid) are built with the g++ compiler (ie the entire GCC is compiled in C++ mode, not in C99 mode). % nm -D /usr/lib/gcc/x86_64-linux-gnu/4.6/cc1 | grep warning_at 000000000057d9f0 T warning_at % nm -D /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1 | grep warning_at 0000000000c27ef0 T _Z10warning_atjiPKcz % nm -C -D /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1 | grep warning_at 0000000000c27ef0 T warning_at(unsigned int, int, char const*, ...)
I suspect that by compiling both melt.so and all MELT modules with g++ it should be ok.
You'll need to edit the MELT-Plugin-Makefile and the melt-module.mk for that.
BTW, this is not a MELT specific issue. All GCC plugins have it too! It was discussed on gcc@ or gcc-patches@
Cheers.
-- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***
> On Sun, 25 Mar 2012 16:40:31 +0200 > ali...@mandriva.com wrote:
>> Hello,
>> I'm working on updating the MELT plugin package that is living in >> mandriva cooker. Turns out that it does not work. First stage melt.so is >> built successfully but is unable to be loaded to continue:
>> ***** doing melt-stage1/warmelt-first.c from melt-build.tpl line 343 >> doing warmelt-first+melt-stage1 from melt-build.tpl line 344 >> gcc -c @warmelt-first+melt-stage1.args >> cc1: error: cannot load plugin >> /home/alex/BuildSystem/gcc-plugin-melt/BUILD/melt-0.9.4.b-plugin-for-gcc-4. 6-or-4.7/melt.so >> /home/alex/BuildSystem/gcc-plugin-melt/BUILD/melt-0.9.4.b-plugin-for-gcc-4. 6-or-4.7/melt.so: >> undefined symbol: warning_at
> Are you building it for GCC 4.7? Some versions of GCC 4.7 (in particular Debian/Sid) are > built with the g++ compiler (ie the entire GCC is compiled in C++ mode, not in C99 mode).
Alexandre Lissy <ali...@mandriva.com> wrote: > Le 25/03/2012 19:03, Basile Starynkevitch a écrit : > > On Sun, 25 Mar 2012 16:40:31 +0200 > > ali...@mandriva.com wrote:
> >> Hello,
> >> I'm working on updating the MELT plugin package that is living in > >> mandriva cooker. Turns out that it does not work. First stage melt.so is > >> built successfully but is unable to be loaded to continue:
> > Are you building it for GCC 4.7? Some versions of GCC 4.7 (in particular Debian/Sid) are > > built with the g++ compiler (ie the entire GCC is compiled in C++ mode, not in C99 mode).
> > I suspect that by compiling both melt.so and all MELT modules with g++ it should be ok.
> > You'll need to edit the MELT-Plugin-Makefile and the melt-module.mk for that.
> Just adding a dummy warning_at entry point in melt is okay ?
I don't think that would help or be enough. We need to be sure that
melt.so
warmelt*.so
are built with g++, not gcc. Maybe we need to use ie check ENABLE_BUILD_WITH_CXX from /usr/lib/gcc/x86_64-linux-gnu/4.7/plugin/include/auto-host.h
and we surely need to change the CC in MELT-Plugin-Makefile (actually, the occurrences of CC) to something else. We also need to change the GCCMELT_CC in melt-module.mk (but that is easy).
However, this issue is not MELT specific. Every GCC plugin (for 4.7, which can be compiled both with C++ or with C) has it. Do you know how other packaged plugins solved that issue? See e.g. http://gcc.gnu.org/ml/gcc/2012-03/msg00379.html
My feeling is that we have to do something specific to 4.7, which is the (only) release of GCC which can be entirely (I'm talking of the C & Fortran & C++ front-ends, not Go or Ada front-ends) compiled with either C or C++ compiler.
Do you have any suggestions? How do you solve that issue for other GCC plugins in cooker?
Cheers.
-- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***
> On Sun, 25 Mar 2012 20:12:09 +0200 > Alexandre Lissy <ali...@mandriva.com> wrote:
>> Le 25/03/2012 19:03, Basile Starynkevitch a crit : >>> On Sun, 25 Mar 2012 16:40:31 +0200 >>> ali...@mandriva.com wrote:
>>>> Hello,
>>>> I'm working on updating the MELT plugin package that is living in >>>> mandriva cooker. Turns out that it does not work. First stage melt.so is >>>> built successfully but is unable to be loaded to continue:
>>>> ***** doing melt-stage1/warmelt-first.c from melt-build.tpl line 343 >>>> doing warmelt-first+melt-stage1 from melt-build.tpl line 344 >>>> gcc -c @warmelt-first+melt-stage1.args >>>> cc1: error: cannot load plugin >>>> /home/alex/BuildSystem/gcc-plugin-melt/BUILD/melt-0.9.4.b-plugin-for-gcc-4. 6-or-4.7/melt.so >>>> /home/alex/BuildSystem/gcc-plugin-melt/BUILD/melt-0.9.4.b-plugin-for-gcc-4. 6-or-4.7/melt.so: >>>> undefined symbol: warning_at
>>> Are you building it for GCC 4.7? Some versions of GCC 4.7 (in particular Debian/Sid) are >>> built with the g++ compiler (ie the entire GCC is compiled in C++ mode, not in C99 mode).
>>> I suspect that by compiling both melt.so and all MELT modules with g++ it should be ok.
>>> You'll need to edit the MELT-Plugin-Makefile and the melt-module.mk for that.
>> Just adding a dummy warning_at entry point in melt is okay ?
> I don't think that would help or be enough. We need to be sure that
> melt.so
> warmelt*.so
> are built with g++, not gcc. Maybe we need to use ie check ENABLE_BUILD_WITH_CXX > from /usr/lib/gcc/x86_64-linux-gnu/4.7/plugin/include/auto-host.h
> and we surely need to change the CC in MELT-Plugin-Makefile (actually, the occurrences of > CC) to something else. We also need to change the GCCMELT_CC in melt-module.mk (but that > is easy).
> However, this issue is not MELT specific. Every GCC plugin (for 4.7, which can be > compiled both with C++ or with C) has it. Do you know how other packaged plugins solved > that issue? See e.g. http://gcc.gnu.org/ml/gcc/2012-03/msg00379.html
> My feeling is that we have to do something specific to 4.7, which is the (only) release > of GCC which can be entirely (I'm talking of the C & Fortran & C++ front-ends, not Go or > Ada front-ends) compiled with either C or C++ compiler.
> Do you have any suggestions? How do you solve that issue for other GCC plugins in cooker?
I don't know.
But at least we can force those variables at make time, since they are declared as "?=", but it seems there are things to fix in the code for it to be buildable :(
> > However, this issue is not MELT specific. Every GCC plugin (for 4.7, which can be > > compiled both with C++ or with C) has it. Do you know how other packaged plugins solved > > that issue? See e.g. http://gcc.gnu.org/ml/gcc/2012-03/msg00379.html
> > My feeling is that we have to do something specific to 4.7, which is the (only) release > > of GCC which can be entirely (I'm talking of the C & Fortran & C++ front-ends, not Go or > > Ada front-ends) compiled with either C or C++ compiler.
> > Do you have any suggestions? How do you solve that issue for other GCC plugins in cooker?
> I don't know.
> But at least we can force those variables at make time, since they are > declared as "?=", but it seems there are things to fix in the code for > it to be buildable :(
I'll look inside next week (ie tomorrow, or tuesday). My main issue is to find a reliable (and if possible "documented") way to know if GCC (actually cc1) has been compiled with a C++03 or a C89 standard conforming compiler.
I was thinking about using ENABLE_BUILD_WITH_CXX (from 4.7/plugin/include/auto-host.h) but perhaps there is a better way.
And I guess that distributions know better how GCC was built. It is a pity that no good symbol appears in GCC about that.
Cheers. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***
On Sun, Mar 25, 2012 at 09:51:51PM +0200, Basile Starynkevitch wrote: > On Sun, 25 Mar 2012 21:18:49 +0200 > Alexandre Lissy <ali...@mandriva.com> wrote:
> > > However, this issue is not MELT specific.
I committed several changes (on the MELT branch, svn rev 185803) which make the MELT plugin more friendly with C++ compiled gcc 4.7, but I am not done yet.
I'll probably make a MELT plugin release as soon as I have a plugin buildable with a C++ compiled GCC 4.7 & with a C compiled GCC 4.6
Regards.
-- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} ***
Basile Starynkevitch <bas...@starynkevitch.net> wrote: > On Sun, Mar 25, 2012 at 09:51:51PM +0200, Basile Starynkevitch wrote: > > On Sun, 25 Mar 2012 21:18:49 +0200 > > Alexandre Lissy <ali...@mandriva.com> wrote:
> > > > However, this issue is not MELT specific.
> I committed several changes (on the MELT branch, svn rev 185803) which make > the MELT plugin more friendly with C++ compiled gcc 4.7, but I am not done > yet.
> I'll probably make a MELT plugin release as soon as I have a plugin > buildable with a C++ compiled GCC 4.7 & with a C compiled GCC 4.6
Hello Alexandre & the list
I just uploaded to http://gcc-melt.org/melt-0.9.5rc0-plugin-for-gcc-4.6-or-4.7.tar.gz a gzipped tar archive of 4476533 bytes, of md5sum a66365f5bae0068a4f23d203180f5a74 a tentative tarball for the next melt 0.9.5 release which should be compilable for a C++ compiled gcc-4.7 (extracted from MELT branch svn rev 185881)
at the moment, you need to build it with make MELTGCC=gcc-4.7 GCCMELT_CC=g++-4.7
so it is not release ready yet, since I need to find out how to do tricks to detect if gcc-4.7 has been compiled in C++ or in C.
Alexandre, could you check that you can compile it? Please report bugs here.
(I won't be able to read email tomorrow probably)
Cheers.
-- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***
> On Mon, 26 Mar 2012 16:33:10 +0200 > Basile Starynkevitch <bas...@starynkevitch.net> wrote:
>> On Sun, Mar 25, 2012 at 09:51:51PM +0200, Basile Starynkevitch >> wrote: >> > On Sun, 25 Mar 2012 21:18:49 +0200 >> > Alexandre Lissy <ali...@mandriva.com> wrote:
>> > > > However, this issue is not MELT specific.
>> I committed several changes (on the MELT branch, svn rev 185803) >> which make >> the MELT plugin more friendly with C++ compiled gcc 4.7, but I am >> not done >> yet.
>> I'll probably make a MELT plugin release as soon as I have a plugin >> buildable with a C++ compiled GCC 4.7 & with a C compiled GCC 4.6
> Hello Alexandre & the list
> I just uploaded to > http://gcc-melt.org/melt-0.9.5rc0-plugin-for-gcc-4.6-or-4.7.tar.gz > a gzipped tar archive of 4476533 bytes, of md5sum > a66365f5bae0068a4f23d203180f5a74 > a tentative tarball for the next melt 0.9.5 release which should be > compilable for a C++ > compiled gcc-4.7 (extracted from MELT branch svn rev 185881)
> at the moment, you need to build it with make MELTGCC=gcc-4.7 > GCCMELT_CC=g++-4.7
> so it is not release ready yet, since I need to find out how to do > tricks to detect if > gcc-4.7 has been compiled in C++ or in C.
> Alexandre, could you check that you can compile it? Please report > bugs here.
> (I won't be able to read email tomorrow probably)
> Cheers.
> -- > Basile STARYNKEVITCH http://starynkevitch.net/Basile/ > email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 > 8, rue de la Faiencerie, 92340 Bourg La Reine, France > *** opinions {are only mine, sont seulement les miennes} ***
> > I just uploaded to > > http://gcc-melt.org/melt-0.9.5rc0-plugin-for-gcc-4.6-or-4.7.tar.gz > > a gzipped tar archive of 4476533 bytes, of md5sum > > a66365f5bae0068a4f23d203180f5a74 > > a tentative tarball for the next melt 0.9.5 release which should be > > compilable for a C++ > > compiled gcc-4.7 (extracted from MELT branch svn rev 185881)
> > at the moment, you need to build it with make MELTGCC=gcc-4.7 > > GCCMELT_CC=g++-4.7
> > so it is not release ready yet, since I need to find out how to do > > tricks to detect if > > gcc-4.7 has been compiled in C++ or in C.
> > Alexandre, could you check that you can compile it? Please report > > bugs here. > It fails, see attached build log.
Ok, try replacing the file melt/xtramelt-ana-base.melt by the one inside the MELT branch svn rev 185922.
Tell me if it works. If it does not work, please send also me the failing generated C code.
Thanks & cheers. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***