Re: Problem to resolve 3.3 release; regarding point 3.) bison, genbc and modern linkers

John Howard <[email protected]> Fri, 23 Feb 2024 11:39:16 -0600
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <[email protected]>
Less error-prone for others if you create a Diff of your Makefile changes ag=
ainst the original local file.

> diff -U original changed

for universal format, which the Patch tool can use.

Then post with Subject: [PATCH] Makefile.

I don=E2=80=99t use Emacs. Diff and Patch automatically determine the lines t=
hat change.

On Feb 22, 2024, at 9:55 PM, Jean-Marc Farinas <[email protected]> wrote=
:

Compiling gnu smalltalk from source was not possible for me.
There where multiple definitions for yychar, yylval etc.
and genbc was not compiled.

I have added a linker flag in the generated
makefile after the configure script was executed.
It is a direct editing of the resulting makefile and not
the configure script files (I have not tried using LDFLAGS with configure sc=
ript, being afraid it will be applied to all
programs). I don't understand very well how autotools work.

But with this modification I was able to build a "gst" program, and running '=
make check' seem to give adequate results, but not 100%
(it will be left for another session).

My steps after cloning the gnu-smalltalk git package

1) autoreconf -vif
2) ./configure
3) and then, the really ugly hack: in the libgst/Makefile
add -Wl,allow-multiple-definition to compile genbc.
Theline will look like:

genbc$(EXEEXT): $(genbc_OBJECTS) $(genbc_DEPENDENCIES) $(EXTRA_genbc_DEPENDE=
NCIES)
@rm -f genbc$(EXEEXT)
$(AM_V_CCLD)$(LINK) -Wl,-allow-multiple-definition $(genbc_OBJECTS) $(genbc_=
LDADD) $(LIBS)

It enabled me to have a working "gst".

If the compilation request is done through emacs, following errors will poin=
t directly to the file and line where change must be inserted.

Hope it help, and if there is a less "hacky" way to have a running
program it would be nicer than this solution.

Jean-Marc Farinas