help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help compiling the JIT


From: Piotr Klibert
Subject: Re: Need help compiling the JIT
Date: Tue, 08 Jun 2021 16:59:20 +0200
User-agent: Cyrus-JMAP/3.5.0-alpha0-519-g27a961944e-fm-20210531.001-g27a96194

> 
> Can you give an indication please what compile problem you encountered ?
> 

My previous post was light on details because it was written from memory, sorry 
about that. I recompiled GST during the weekend and this time I recorded the 
details. The problem was about a redefinition of three variables, which were 
repeated across `genbc-impl.c` and `genbc-decl.c`. Assuming that the files will 
be compiled together anyway, I added `extern` to the declaractions in 
`genbc-impl.c`, which made the compilation pass. The exact error message 
(formatted for brevity) looked like this:

    /usr/bin/ld: genbc-impl.o:.../libgst/genbc-impl.c:913: 
    multiple definition of `yynerrs'; 
genbc-decl.o:.../libgst/genbc-decl.c:1016: first defined here

    /usr/bin/ld: genbc-impl.o:.../libgst/genbc-impl.c:908:
    multiple definition of `yychar'; genbc-decl.o:.../libgst/genbc-decl.c:1011: 
first defined here

    /usr/bin/ld: genbc-impl.o:.../libgst/genbc-impl.c:911:
    multiple definition of `yylval'; genbc-decl.o:.../libgst/genbc-decl.c:1014: 
first defined here

    collect2: error: ld returned 1 exit status

My problem is that I don't know anything about the tools used to generate the 
.c files, so while I fixed it for myself, I have no idea how to make it so the 
declarations are not repeated next time. I suspect that the fix is trivial to 
anyone who knows the tooling used, so I thought it will be more efficient to 
report it here instead of trying to fix this on my own :-)

I didn't encounter the problem with `-f` option; not sure why, but I started 
with `gst file.st -a arg1 ...` command syntax and it worked/works ok. I had a 
bigger problem with locating `SystemDictionary>>arguments` (ie. where the 
cmdline args are stored), as I was a bit confused by 
`SystemDictionary>>arguments:do:`, but there's a question on SO that helped me.


Best regards,
Piotr Klibert


On Mon, Jun 7, 2021, at 20:55, stes@PANDORA.BE wrote:
> 
> ----- Op 4 jun 2021 om 16:50 schreef Piotr Klibert piotrklibert@fastmail.com:
> 
> > 2. I encountered some problems compiling GST - in the code generated from
> > 'genbc-impl.y' apparently. Which build tools versions I should include in 
> > the
> > bug report in this case, and also in general?
> 
> 
> This depends on the problem.
> I can confirm that the build tools and PATH settings are important;
> for example to succesfully build I have to use  NM='/usr/gnu/bin/nm'
> and the build fails with weird messages in the case of the 
> auto-detected /usr/bin/nm on my system.
> 
> This requires some puzzling and investigation ...
> 
> I would also like to draw your attention to an extremely simple but 
> very important patch,
> posted here by Tino Calancha :
> 
> Date:   Thu Mar 25 15:46:18 2021 +0100
> 
>      * main.c (long_options): Option "file" requires an argument
> 
> diff --git a/main.c b/main.c
> index f28aad3e..a4a9128b 100644
> --- a/main.c
> +++ b/main.c
> @@ -132,7 +132,7 @@ static const struct option long_options[] = {
>     {"core-dump", 0, 0, 'c'},
>     {"declaration-trace", 0, 0, 'D'},
>     {"execution-trace", 0, 0, 'E'},
> -  {"file", 0, 0, 'f'},
> +  {"file", 1, 0, 'f'},
> 
> 
> Hopefully that *important* patch gets added to GNU smalltalk 3.3 or 3.2.6 !
> 
> Perhaps you can try to contact Steve Byrne (sbb@gnu.org) and Paolo 
> Bonzini (bonzini@gnu.org)
> or Holger Hans Peter Freyther  <holger@freyther.de>
> 
> Holger Freyther and Paolo Bonzini sometimes help on this list, and are around.
> 
> Regards,
> David Stes
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]