gforth
[Top][All Lists]
Advanced

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

vmgen examples don't build with install from snapshot tarball


From: M. Edward (Ed) Borasky
Subject: vmgen examples don't build with install from snapshot tarball
Date: Thu, 30 Jun 2022 03:23:45 +0000

How to reproduce:


1.  Install Debian on Windows Subsystem for Linux. Resulting system is 
"bullseye" release.
2.  Download and unpack 
http://www.complang.tuwien.ac.at/forth/gforth/Snapshots/current/gforth.tar.xz.
3.  Follow build from source instructions in "INSTALL.md".
4.  "cd" into "vmgen-ex" or "vmgen-ex2". Both fail with the same error.
5. Type "make". Result is

$ make
bison -y mini.y && mv y.tab.c mini.tab.c
mini.y:76.16-20: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
   76 | %type <string> IDENT;
      |                ^~~~~
mini.y:77.13-15: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
   77 | %type <num> NUM;
      |             ^~~
m4 mini-inst.vmg >mini.vmg
vmgen mini.vmg

in file included from *the terminal*:0:-94105607416479:
in file included from *the terminal*:-1:1:
/usr/local/share/gforth/0.7.9_20220428/prims2x0.6.2.fs:64:12: error: Undefined 
word
: latestxt >>>lastcfa<<< @ ;
Backtrace:
/usr/local/share/gforth/0.7.9_20220428/kernel/int.fs:321:10:  0 $7F2477A41430 
throw make: *** [Makefile:42: mini-gen.i] Error 243


This *does* work with "gforth" / "vmgen" from the Debian distro repositories. 
If I install "gforth" and "flex" and edit the Makefile to specify 
"VMGEN=/usr/bin/vmgen" it works.

$ grep ^VMGEN Makefile
VMGEN=/usr/bin/vmgen
~/gforth-0.7.9_20220428/vmgen-ex$ make
bison -y mini.y && mv y.tab.c mini.tab.c
mini.y:76.16-20: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
   76 | %type <string> IDENT;
      |                ^~~~~
mini.y:77.13-15: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
   77 | %type <num> NUM;
      |             ^~~
m4 mini-inst.vmg >mini.vmg
/usr/bin/vmgen mini.vmg
flex -l mini.l
gcc -O3 -fomit-frame-pointer -Wall    -c -o mini.tab.o mini.tab.c
In file included from mini.y:145:
lex.yy.c:1294:16: warning: ‘input’ defined but not used [-Wunused-function]
 1294 |     static int input  (void)
      |                ^~~~~
lex.yy.c:1247:17: warning: ‘yyunput’ defined but not used [-Wunused-function]
 1247 |     static void yyunput (int c, char * yy_bp )
      |                 ^~~~~~~
gcc -O3 -fomit-frame-pointer -Wall    -c -o support.o support.c
support.c: In function ‘lookup_func’:
support.c:95:9: warning: implicit declaration of function ‘strcmp’ 
[-Wimplicit-function-declaration]
   95 |     if (strcmp(p->name,name)==0)
      |         ^~~~~~
gcc -O3 -fomit-frame-pointer -Wall    -c -o peephole.o peephole.c
gcc -O3 -fomit-frame-pointer -Wall    -c -o profile.o profile.c
gcc -O3 -fomit-frame-pointer -Wall    -c -o disasm.o disasm.c
gcc -O3 -fomit-frame-pointer -Wall    -c -o engine.o engine.c
In file included from engine.c:206:
mini-vm.i: In function ‘engine’:
mini-vm.i:354:6: warning: variable ‘i’ set but not used 
[-Wunused-but-set-variable]
  354 | Cell i;
      |      ^
gcc -O3 -fomit-frame-pointer -Wall -DVM_DEBUG -DVM_PROFILING 
-Dengine=engine_debug -c -o engine-debug.o engine.c
gcc -O3 -fomit-frame-pointer -Wall mini.tab.o support.o peephole.o profile.o 
disasm.o engine.o engine-debug.o -o mini

$ /usr/bin/vmgen --version
vmgen (gforth) 0.7.3
gforth 0.7.3
Copyright (C) 2001,2002,2003,2007,2008 Free Software Foundation, Inc.
This program is part of Gforth

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.


--
How many people can stand on the shoulders of a giant before the giant 
collapses?

Sent with Proton Mail secure email.



reply via email to

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