Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gforth: fix cross-compilation #104778

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

siraben
Copy link
Member

@siraben siraben commented Nov 24, 2020

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@veprbl veprbl added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Nov 24, 2020
@siraben siraben changed the title gforth: enable cross-compilation gforth: fix cross-compilation Nov 25, 2020
@siraben
Copy link
Member Author

siraben commented Jun 12, 2021

@Mindavi could you help here? I notice you recently did a lot of cross compilation fixes.

@Mindavi
Copy link
Contributor

Mindavi commented Jun 12, 2021

I can take a stab. Anything special you'd like me to take a look at, or is it that you haven't succeeded making it actually cross-compile properly?

Note to self, this is the error:

checking if aarch64-unknown-linux-gnu-gcc understands -fno-gcse... yes
checking if aarch64-unknown-linux-gnu-gcc understands -fno-strict-aliasing... yes
checking if aarch64-unknown-linux-gnu-gcc understands -fno-crossjumping... yes
checking if aarch64-unknown-linux-gnu-gcc understands -fno-reorder-blocks... yes
checking if aarch64-unknown-linux-gnu-gcc understands -falign-labels=1... yes
checking if aarch64-unknown-linux-gnu-gcc understands -falign-loops=1... yes
checking if aarch64-unknown-linux-gnu-gcc understands -falign-jumps=1... yes
checking how to suppress 'unused variable' warnings... __attribute__((unused))
checking how to invoke m4... m4 -s
checking for gforth... echo "You need to configure with a gforth in \$PATH to build this part" && false
checking for ./arch/generic/asm.fs... configure: error: cannot check for file existence when cross compiling

Not gonna work on this today, but I'll take a look in the upcoming days.

@siraben
Copy link
Member Author

siraben commented Jun 12, 2021

Thanks for the reply. I wasn't able to resolve the error about needing gforth in $PATH, despite it already being there via nativeBuildInputs.

@Mindavi
Copy link
Contributor

Mindavi commented Jun 14, 2021

Some things I've found:

AC_CHECK_FILE must be replaced with something like test -f to check if the file exists. It doesn't support cross-compiling, even though it sounds logical that it would: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Files.html. That's a simple enough patch (this should do it, I think):

diff --git a/configure.in b/configure.in
index c3602a7..51bec73 100644
--- a/configure.in
+++ b/configure.in
@@ -652,11 +652,15 @@ AC_MSG_RESULT($PREFORTH)
 #echo "machine='$machine'"
 
 dnl AC_CHECK_PROG(asm_fs,asm.fs,arch/$machine/asm.fs,,$srcdir/arch/$machine)
-AC_CHECK_FILE($srcdir/arch/$machine/asm.fs,[asm_fs=arch/$machine/asm.fs],)
+if test -f "$srcdir/arch/$machine/asm.fs"; then
+  asm_fs=arch/$machine/asm.fs
+fi
 AC_SUBST(asm_fs)
 
 dnl AC_CHECK_PROG(disasm_fs,disasm.fs,arch/$machine/disasm.fs,,$srcdir/arch/$machine)
-AC_CHECK_FILE($srcdir/arch/$machine/disasm.fs,[disasm_fs=arch/$machine/disasm.fs],)
+if test -f "$srcdir/arch/$machine/disasm.fs"; then
+  disasm_fs=arch/$machine/asm.fs
+fi
 AC_SUBST(disasm_fs)
 
 AC_PATH_PROG(INSTALL_INFO,install-info,[echo '>>>>Please make info dir entry:'],$PATH:/sbin:/usr/sbin:/usr/local/sbin)

Seems like they also did something like that here: https://git.savannah.gnu.org/cgit/gforth.git/tree/configure.ac#n864.

The error about gforth missing from the PATH may or may not be relevant.

Otherwise, this patch upon your work seems to get me further into the build:

+{ stdenv, lib, fetchurl, m4, buildPackages, gforth, autoreconfHook, automake, autoconf }:
 
 let
   version = "0.7.3";
@@ -12,7 +12,23 @@ stdenv.mkDerivation {
     sha256 = "1c1bahc9ypmca8rv2dijiqbangm1d9av286904yw48ph7ciz4qig";
   };
 
-  nativeBuildInputs = [ m4 ] ++ lib.optional crossCompiling gforth;
+  patches = [
+    # To enable cross-compilation
+    ./cross.patch
+  ];
+
+  postPatch = ''
+    rm configure
+    substituteInPlace configure.in \
+      --replace "arm*)" "aarch64*)" \
+      --replace "/sbin/ldconfig" "ldconfig"
+    autoupdate
+  '';
+
+  #strictDeps = true;
+
+  depsBuildBuild = [ automake m4 autoconf autoreconfHook ];
+  #nativeBuildInputs = [ m4 ] ++ lib.optionals crossCompiling [ gforth autoreconfHook ];
   configurePlatforms = [ "build" "host" ] ++ lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target";

However, the more I'm looking into this, the more I think that this version of gforth might not really support aarch64. I'm not sure which arch you're targeting, but it might be worth trying to get the newer / bleeding edge version building. Of course, your applications need to support that as well.

Note that I tried to simply build the bleeding edge version, but that didn't work :/. So it might take some work to get that running too.

Build errors after applying above patches
gforth-aarch64-unknown-linux-gnu> aarch64-unknown-linux-gnu-gcc -c  -I./../arch/arm -I. -Wall -O2 -fomit-frame-pointer -DHAVE_CONFIG_H -DFORCE_LL -DFORCE_REG -DDEFAULTPATH='".:/nix/store/34syz28rk4bii2rq1ab7sgfxz4vx70ac-gforth-aarch64-unknown-linux-gnu-0.7.3/lib/gforth/site-forth:/nix/store/34syz28rk4bii2rq1ab7sgfxz4vx70ac-gforth-aarch64-unknown-linux-gnu-0.7.3/share/gforth/site-forth:/nix/store/34syz28rk4bii2rq1ab7sgfxz4vx70ac-gforth-aarch64-unknown-linux-gnu-0.7.3/lib/gforth/0.7.3:/nix/store/34syz28rk4bii2rq1ab7sgfxz4vx70ac-gforth-aarch64-unknown-linux-gnu-0.7.3/share/gforth/0.7.3"'   -o ../arch/arm/cacheflush-linux.o ../arch/arm/cacheflush-linux.c
gforth-aarch64-unknown-linux-gnu> /build/cczoNQlp.s: Assembler messages:
gforth-aarch64-unknown-linux-gnu> /build/cczoNQlp.s:15: Error: operand 1 must be an integer register -- `mov r0,x3'
gforth-aarch64-unknown-linux-gnu> /build/cczoNQlp.s:16: Error: operand 1 must be an integer register -- `mov r1,x4'
gforth-aarch64-unknown-linux-gnu> /build/cczoNQlp.s:17: Error: operand 1 must be an integer register -- `mov r2,#0'
gforth-aarch64-unknown-linux-gnu> /build/cczoNQlp.s:18: Error: unknown mnemonic `swi' -- `swi #0x9f0002'
gforth-aarch64-unknown-linux-gnu> make[3]: *** [Makefile:128: ../arch/arm/cacheflush-linux.o] Error 1

Will do a check on how far I get building the native bleeding edge version.

@Mindavi
Copy link
Contributor

Mindavi commented Jun 14, 2021

I've no clue why the build of the bleeding edge version fails. I see something like Gforth kernel failed coming by, but no clue what that means and if it matters. I'm guessing it's building something, and subsequent code assumes it's there.

The command that's executed is this: /gforthker -p ".:~+:." -e "s\" doc/doc.fd.tmp\"" doc/makedoc.fs except.fs startup.fs code.fs objects.fs oof.fs moofglos.fs regexp.fs fft.fs mkdir.fs cilk.fs coverage.fs -e bye

The output (with debug enabled)
rick@nixos-asus:~/tmp/nixpkgs-gforth/gforth-0.7.9_20210610$ ./gforthker --debug -p ".:~+:." -e "s\" doc/doc.fd.tmp\"" doc/makedoc.fs except.fs startup.fs code.fs objects.fs oof.fs moofglos.fs regexp.fs fft.fs mkdir.fs cilk.fs coverage.fs   -e bye
Opened image file: ./kernl64l.fi
Magic found: Gforth6 little endian, cell=8 bytes, char=1 bytes, au=1 bytes
Compiled with gcc-10.3.0
goto * 0x40a340 0x4125d0 len=2
(docol)         0-0    0 0x40599d 0x40a45d len= 24 rest= 4 send=1
(docon)         0-0    1 0x4059bb 0x40a49b len= 19 rest= 4 send=0
(dovar)         0-0    2 0x4059d4 0x40a4d4 len= 19 rest= 4 send=0
(douser)        0-0    3 0x4059ed 0x40a50d len= 24 rest= 4 send=0
(dodefer)       0-0    4 0x405a0b 0x40a54b len= 11 rest= 0 send=1
(dofield)       0-0    5 0x405a18 0x40a578 len= 15 rest= 4 send=0
(dovalue)       0-0    6 0x405a2d 0x40a5ad len= 19 rest= 4 send=0
(dodoes)        0-0    7 0x405a46 0x40a5e6 len= 26 rest= 0 send=1
(doabicode)     0-0    8 0x405a62 0x40a622 len= 44 rest= 4 send=0
(do;abicode)    0-0    9 0x405a94 0x40a674 len= 52 rest= 4 send=0
noop            0-0   10 0x405ace 0x40a6ce len=  8 rest= 4 send=0
call            0-0   11 0x405adc 0x40a6fc len= 31 rest= 4 send=1
execute         0-0   12 0x405b01 0x40a741 len= 14 rest= 0 send=1
perform         0-0   13 0x405b11 0x40a771 len= 17 rest= 0 send=1
;s              0-0   14 0x405b24 0x40a7a4 len= 23 rest= 4 send=1
execute-;s      0-0   15 0x405b41 0x40a7e1 len= 32 rest= 0 send=1
unloop          0-0   16 0x405b63 0x40a823 len= 13 rest= 4 send=0
lit-perform     0-0   17 0x405b76 0x40a856 len= 17 rest= 0 send=1
does-xt         0-0   18 0x405b89 0x40a889 len= 33 rest= 0 send=1
branch-lp+!#    0-0   19 0x405bac 0x40a8cc len= 25 rest= 4 send=1
branch          0-0   20 0x405bcb 0x40a90b len= 11 rest= 4 send=1
?branch         0-0   21 0x405bdc 0x40a93c len= 26 rest= 4 send=1
?branch-lp+!#   0-0   22 0x405bfc 0x40a97c len= 44 rest= 4 send=1
?dup-?branch    0-0   23 0x405c2e 0x40a9ce len= 38 rest= 4 send=1
?dup-0=-?branch 0-0   24 0x405c5a 0x40aa1a len= 38 rest= 4 send=1
(next)          0-0   25 0x405c86 0x40aa66 len= 33 rest= 4 send=1
(next)-lp+!#    0-0   26 0x405cad 0x40aaad len= 55 rest= 4 send=1
(loop)          0-0   27 0x405cea 0x40ab0a len= 34 rest= 4 send=1
(loop)-lp+!#    0-0   28 0x405d12 0x40ab52 len= 56 rest= 4 send=1
(+loop)         0-0   29 0x405d50 0x40abb0 len= 56 rest= 4 send=1
(+loop)-lp+!#   0-0   30 0x405d8e 0x40ac0e len= 78 rest= 4 send=1
(-loop)         0-0   31 0x405de2 0x40ac82 len= 46 rest= 4 send=1
(-loop)-lp+!#   0-0   32 0x405e16 0x40acd6 len= 68 rest= 4 send=1
(/loop)#        0-0   33 0x405e60 0x40ad40 len= 43 rest= 4 send=1
(/loop)#-lp+!#  0-0   34 0x405e91 0x40ad91 len= 65 rest= 4 send=1
(s+loop)        0-0   35 0x405ed8 0x40adf8 len= 78 rest= 4 send=1
(s+loop)-lp+!#  0-0   36 0x405f2c 0x40ae6c len= 97 rest= 4 send=1
(for)           0-0   37 0x405f93 0x40aef3 len= 42 rest= 4 send=0
(do)            0-0   38 0x405fc3 0x40af43 len= 43 rest= 4 send=0
(?do)           0-0   39 0x405ff4 0x40af94 len= 57 rest= 4 send=1
(+do)           0-0   40 0x406033 0x40aff3 len= 57 rest= 4 send=1
(u+do)          0-0   41 0x406072 0x40b052 len= 57 rest= 4 send=1
(-do)           0-0   42 0x4060b1 0x40b0b1 len= 57 rest= 4 send=1
(u-do)          0-0   43 0x4060f0 0x40b110 len= 57 rest= 4 send=1
(try)           0-0   44 0x40612f 0x40b16f len= 87 rest= 4 send=0
uncatch         0-0   45 0x40618c 0x40b1ec len= 27 rest= 4 send=0
fast-throw      0-0   46 0x4061ad 0x40b22d len= 52 rest= 4 send=1
pushwrap        0-0   47 0x4061e7 0x40b287 len= 79 rest= 4 send=0
dropwrap        0-0   48 0x40623c 0x40b2fc len= 27 rest= 4 send=0
exit-wrap       0-0   49 0x40625d 0x40b33d len= 49 rest= 4 send=1
i               0-0   50 0x406294 0x40b394 len= 22 rest= 4 send=0
i'              0-0   51 0x4062b0 0x40b3d0 len= 23 rest= 4 send=0
j               0-0   52 0x4062cd 0x40b40d len= 23 rest= 4 send=0
k               0-0   53 0x4062ea 0x40b44a len= 23 rest= 4 send=0
move            0-0   54 0x406307 0x40b487 len= 29 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  25
cmove           0-0   55 0x40632a 0x40b4ca len= 29 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  25
cmove>          0-0   56 0x40634d 0x40b50d len= 29 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  25
fill            0-0   57 0x406370 0x40b550 len= 32 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  28
compare         0-0   58 0x406396 0x40b596 len= 39 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  29
toupper         0-0   59 0x4063c3 0x40b5e3 len= 27 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   5
capscompare     0-0   60 0x4063e4 0x40b624 len= 39 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  28
/string         0-0   61 0x406411 0x40b671 len= 23 rest= 4 send=0
safe/string     0-0   62 0x40642e 0x40b6ae len= 85 rest= 4 send=0
lit             0-0   63 0x406489 0x40b729 len= 18 rest= 4 send=0
+               0-0   64 0x4064a1 0x40b761 len= 21 rest= 4 send=0
lit+            0-0   65 0x4064bc 0x40b79c len= 17 rest= 4 send=0
under+          0-0   66 0x4064d3 0x40b7d3 len= 19 rest= 4 send=0
-               0-0   67 0x4064ec 0x40b80c len= 21 rest= 4 send=0
negate          0-0   68 0x406507 0x40b847 len= 11 rest= 4 send=0
1+              0-0   69 0x406518 0x40b878 len= 12 rest= 4 send=0
1-              0-0   70 0x40652a 0x40b8aa len= 12 rest= 4 send=0
max             0-0   71 0x40653c 0x40b8dc len= 27 rest= 4 send=0
min             0-0   72 0x40655d 0x40b91d len= 27 rest= 4 send=0
abs             0-0   73 0x40657e 0x40b95e len= 21 rest= 4 send=0
*               0-0   74 0x406599 0x40b999 len= 23 rest= 4 send=0
/f              0-0   75 0x4065b6 0x40b9d6 len= 56 rest= 4 send=0
modf            0-0   76 0x4065f4 0x40ba34 len= 55 rest= 4 send=0
/modf           0-0   77 0x406631 0x40ba91 len= 61 rest= 4 send=0
*/modf          0-0   78 0x406674 0x40baf4 len=115 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  79
*/f             0-0   79 0x4066ed 0x40bb8d len= 84 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  66
/s              0-0   80 0x406747 0x40bc07 len= 35 rest= 4 send=0
mods            0-0   81 0x406770 0x40bc50 len= 35 rest= 4 send=0
/mods           0-0   82 0x406799 0x40bc99 len= 31 rest= 4 send=0
*/mods          0-0   83 0x4067be 0x40bcde len= 41 rest= 4 send=0
*/s             0-0   84 0x4067ed 0x40bd2d len= 37 rest= 4 send=0
2*              0-0   85 0x406818 0x40bd78 len= 11 rest= 4 send=0
2/              0-0   86 0x406829 0x40bda9 len= 11 rest= 4 send=0
fm/mod          0-0   87 0x40683a 0x40bdda len=108 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  75
sm/rem          0-0   88 0x4068ac 0x40be6c len= 36 rest= 4 send=0
m*              0-0   89 0x4068d6 0x40beb6 len= 22 rest= 4 send=0
um*             0-0   90 0x4068f2 0x40bef2 len= 22 rest= 4 send=0
um/mod          0-0   91 0x40690e 0x40bf2e len= 36 rest= 4 send=0
u/-stage2m      0-0   92 0x406938 0x40bf78 len= 31 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  20
umod-stage2m    0-0   93 0x40695d 0x40bfbd len= 45 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  20
u/mod-stage2m   0-0   94 0x406990 0x40c010 len= 41 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  19
/f-stage2m      0-0   95 0x4069bf 0x40c05f len= 31 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  20
modf-stage2m    0-0   96 0x4069e4 0x40c0a4 len= 39 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  20
/modf-stage2m   0-0   97 0x406a11 0x40c0f1 len= 38 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  16
m+              0-0   98 0x406a3d 0x40c13d len= 54 rest= 4 send=0
d+              0-0   99 0x406a79 0x40c199 len= 40 rest= 4 send=0
d-              0-0  100 0x406aa7 0x40c1e7 len= 40 rest= 4 send=0
dnegate         0-0  101 0x406ad5 0x40c235 len= 32 rest= 4 send=0
d2*             0-0  102 0x406afb 0x40c27b len= 30 rest= 4 send=0
d2/             0-0  103 0x406b1f 0x40c2bf len= 30 rest= 4 send=0
and             0-0  104 0x406b43 0x40c303 len= 21 rest= 4 send=0
or              0-0  105 0x406b5e 0x40c33e len= 21 rest= 4 send=0
xor             0-0  106 0x406b79 0x40c379 len= 21 rest= 4 send=0
invert          0-0  107 0x406b94 0x40c3b4 len= 11 rest= 4 send=0
rshift          0-0  108 0x406ba5 0x40c3e5 len= 21 rest= 4 send=0
lshift          0-0  109 0x406bc0 0x40c420 len= 21 rest= 4 send=0
umax            0-0  110 0x406bdb 0x40c45b len= 27 rest= 4 send=0
umin            0-0  111 0x406bfc 0x40c49c len= 27 rest= 4 send=0
mux             0-0  112 0x406c1d 0x40c4dd len= 33 rest= 4 send=0
select          0-0  113 0x406c44 0x40c524 len= 28 rest= 4 send=0
dlshift         0-0  114 0x406c66 0x40c566 len= 50 rest= 4 send=0
drshift         0-0  115 0x406c9e 0x40c5be len= 50 rest= 4 send=0
rol             0-0  116 0x406cd6 0x40c616 len= 21 rest= 4 send=0
ror             0-0  117 0x406cf1 0x40c651 len= 21 rest= 4 send=0
drol            0-0  118 0x406d0c 0x40c68c len=100 rest= 4 send=0
dror            0-0  119 0x406d76 0x40c716 len= 96 rest= 4 send=0
du/mod          0-0  120 0x406ddc 0x40c79c len= 53 rest= 4 send=0
u/              0-0  121 0x406e17 0x40c7f7 len= 35 rest= 4 send=0
umod            0-0  122 0x406e40 0x40c840 len= 35 rest= 4 send=0
u/mod           0-0  123 0x406e69 0x40c889 len= 31 rest= 4 send=0
u*/mod          0-0  124 0x406e8e 0x40c8ce len= 41 rest= 4 send=0
u*/             0-0  125 0x406ebd 0x40c91d len= 37 rest= 4 send=0
arshift         0-0  126 0x406ee8 0x40c968 len= 21 rest= 4 send=0
darshift        0-0  127 0x406f03 0x40c9a3 len= 55 rest= 4 send=0
0=              0-0  128 0x406f40 0x40ca00 len= 23 rest= 4 send=0
0<>             0-0  129 0x406f5d 0x40ca3d len= 23 rest= 4 send=0
0<              0-0  130 0x406f7a 0x40ca7a len= 12 rest= 4 send=0
0>              0-0  131 0x406f8c 0x40caac len= 23 rest= 4 send=0
0<=             0-0  132 0x406fa9 0x40cae9 len= 23 rest= 4 send=0
0>=             0-0  133 0x406fc6 0x40cb26 len= 21 rest= 4 send=0
=               0-0  134 0x406fe1 0x40cb61 len= 31 rest= 4 send=0
<>              0-0  135 0x407006 0x40cba6 len= 31 rest= 4 send=0
<               0-0  136 0x40702b 0x40cbeb len= 31 rest= 4 send=0
>               0-0  137 0x407050 0x40cc30 len= 31 rest= 4 send=0
<=              0-0  138 0x407075 0x40cc75 len= 31 rest= 4 send=0
>=              0-0  139 0x40709a 0x40ccba len= 31 rest= 4 send=0
u=              0-0  140 0x4070bf 0x40ccff len= 31 rest= 4 send=0
u<>             0-0  141 0x4070e4 0x40cd44 len= 31 rest= 4 send=0
u<              0-0  142 0x407109 0x40cd89 len= 25 rest= 4 send=0
u>              0-0  143 0x407128 0x40cdc8 len= 31 rest= 4 send=0
u<=             0-0  144 0x40714d 0x40ce0d len= 31 rest= 4 send=0
u>=             0-0  145 0x407172 0x40ce52 len= 31 rest= 4 send=0
d=              0-0  146 0x407197 0x40ce97 len= 42 rest= 4 send=0
d<>             0-0  147 0x4071c7 0x40cee7 len= 42 rest= 4 send=0
d<              0-0  148 0x4071f7 0x40cf37 len= 39 rest= 4 send=0
d>              0-0  149 0x407224 0x40cf84 len= 39 rest= 4 send=0
d<=             0-0  150 0x407251 0x40cfd1 len= 39 rest= 4 send=0
d>=             0-0  151 0x40727e 0x40d01e len= 39 rest= 4 send=0
d0=             0-0  152 0x4072ab 0x40d06b len= 31 rest= 4 send=0
d0<>            0-0  153 0x4072d0 0x40d0b0 len= 31 rest= 4 send=0
d0<             0-0  154 0x4072f5 0x40d0f5 len= 22 rest= 4 send=0
d0>             0-0  155 0x407311 0x40d131 len= 42 rest= 4 send=0
d0<=            0-0  156 0x407341 0x40d181 len= 46 rest= 4 send=0
d0>=            0-0  157 0x407375 0x40d1d5 len= 25 rest= 4 send=0
du=             0-0  158 0x407394 0x40d214 len= 42 rest= 4 send=0
du<>            0-0  159 0x4073c4 0x40d264 len= 42 rest= 4 send=0
du<             0-0  160 0x4073f4 0x40d2b4 len= 33 rest= 4 send=0
du>             0-0  161 0x40741b 0x40d2fb len= 33 rest= 4 send=0
du<=            0-0  162 0x407442 0x40d342 len= 39 rest= 4 send=0
du>=            0-0  163 0x40746f 0x40d38f len= 39 rest= 4 send=0
within          0-0  164 0x40749c 0x40d3dc len= 36 rest= 4 send=0
useraddr        0-0  165 0x4074c6 0x40d426 len= 23 rest= 4 send=0
up!             0-0  166 0x4074e3 0x40d463 len= 24 rest= 4 send=0
sp@             0-0  167 0x407501 0x40d4a1 len= 18 rest= 4 send=0
sp!             0-0  168 0x407519 0x40d4d9 len= 11 rest= 4 send=0
rp@             0-0  169 0x40752a 0x40d50a len= 19 rest= 4 send=0
rp!             0-0  170 0x407543 0x40d543 len= 19 rest= 4 send=0
fp@             0-0  171 0x40755c 0x40d57c len= 16 rest= 4 send=0
fp!             0-0  172 0x407572 0x40d5b2 len= 15 rest= 4 send=0
>r              0-0  173 0x407587 0x40d5e7 len= 31 rest= 4 send=0
r>              0-0  174 0x4075ac 0x40d62c len= 30 rest= 4 send=0
rdrop           0-0  175 0x4075d0 0x40d670 len= 23 rest= 4 send=0
2>r             0-0  176 0x4075ed 0x40d6ad len= 43 rest= 4 send=0
2r>             0-0  177 0x40761e 0x40d6fe len= 38 rest= 4 send=0
2r@             0-0  178 0x40764a 0x40d74a len= 30 rest= 4 send=0
2rdrop          0-0  179 0x40766e 0x40d78e len= 24 rest= 4 send=0
over            0-0  180 0x40768c 0x40d7cc len= 19 rest= 4 send=0
drop            0-0  181 0x4076a5 0x40d805 len= 15 rest= 4 send=0
swap            0-0  182 0x4076ba 0x40d83a len= 22 rest= 4 send=0
dup             0-0  183 0x4076d6 0x40d876 len= 18 rest= 4 send=0
rot             0-0  184 0x4076ee 0x40d8ae len= 30 rest= 4 send=0
-rot            0-0  185 0x407712 0x40d8f2 len= 30 rest= 4 send=0
nip             0-0  186 0x407736 0x40d936 len= 18 rest= 4 send=0
tuck            0-0  187 0x40774e 0x40d96e len= 30 rest= 4 send=0
?dup            0-0  188 0x407772 0x40d9b2 len= 36 rest= 4 send=0
pick            0-0  189 0x40779c 0x40d9fc len= 22 rest= 4 send=0
third           0-0  190 0x4077b8 0x40da38 len= 19 rest= 4 send=0
fourth          0-0  191 0x4077d1 0x40da71 len= 19 rest= 4 send=0
2drop           0-0  192 0x4077ea 0x40daaa len= 16 rest= 4 send=0
2dup            0-0  193 0x407800 0x40dae0 len= 26 rest= 4 send=0
2over           0-0  194 0x407820 0x40db20 len= 27 rest= 4 send=0
2swap           0-0  195 0x407841 0x40db61 len= 38 rest= 4 send=0
2rot            0-0  196 0x40786d 0x40dbad len= 54 rest= 4 send=0
2nip            0-0  197 0x4078a9 0x40dc09 len= 30 rest= 4 send=0
2tuck           0-0  198 0x4078cd 0x40dc4d len= 51 rest= 4 send=0
user@           0-0  199 0x407906 0x40dca6 len= 27 rest= 4 send=0
sps@            0-0  200 0x407927 0x40dce7 len= 16 rest= 4 send=0
@               0-0  201 0x40793d 0x40dd1d len= 17 rest= 4 send=0
lit@            0-0  202 0x407954 0x40dd54 len= 21 rest= 4 send=0
!               0-0  203 0x40796f 0x40dd8f len= 22 rest= 4 send=0
+!              0-0  204 0x40798b 0x40ddcb len= 22 rest= 4 send=0
c@              0-0  205 0x4079a7 0x40de07 len= 17 rest= 4 send=0
c!              0-0  206 0x4079be 0x40de3e len= 21 rest= 4 send=0
2!              0-0  207 0x4079d9 0x40de79 len= 31 rest= 4 send=0
2@              0-0  208 0x4079fe 0x40debe len= 29 rest= 4 send=0
cell+           0-0  209 0x407a21 0x40df01 len= 12 rest= 4 send=0
cells           0-0  210 0x407a33 0x40df33 len= 12 rest= 4 send=0
char+           0-0  211 0x407a45 0x40df65 len= 12 rest= 4 send=0
(chars)         0-0  212 0x407a57 0x40df97 len=  8 rest= 4 send=0
count           0-0  213 0x407a65 0x40dfc5 len= 32 rest= 4 send=0
cell/           0-0  214 0x407a8b 0x40e00b len= 12 rest= 4 send=0
cell-           0-0  215 0x407a9d 0x40e03d len= 12 rest= 4 send=0
inc#            0-0  216 0x407aaf 0x40e06f len= 15 rest= 4 send=0
(listlfind)     0-0  217 0x407ac4 0x40e0a4 len= 35 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  24
(hashlfind)     0-0  218 0x407aed 0x40e0ed len= 35 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  25
(tablelfind)    0-0  219 0x407b16 0x40e136 len= 35 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  24
(hashkey1)      0-0  220 0x407b3f 0x40e17f len= 35 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  24
(hashkey2)      0-0  221 0x407b68 0x40e1c8 len= 52 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  29
hashkey2        0-0  222 0x407ba2 0x40e222 len= 55 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  51
(parse-white)   0-0  223 0x407bdf 0x40e27f len= 27 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  16
scan            0-0  224 0x407c00 0x40e2c0 len= 70 rest= 4 send=0
skip            0-0  225 0x407c4c 0x40e32c len= 70 rest= 4 send=0
aligned         0-0  226 0x407c98 0x40e398 len= 22 rest= 4 send=0
faligned        0-0  227 0x407cb4 0x40e3d4 len= 22 rest= 4 send=0
threading-method 0-0  228 0x407cd0 0x40e410 len= 20 rest= 4 send=0
debugging-method 0-0  229 0x407cea 0x40e44a len= 20 rest= 4 send=0
(key-file)      0-0  230 0x407d04 0x40e484 len= 37 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   7
key?-file       0-0  231 0x407d2f 0x40e4cf len= 49 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   7
stdin           0-0  232 0x407d66 0x40e526 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   7
stdout          0-0  233 0x407d85 0x40e565 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   7
stderr          0-0  234 0x407da4 0x40e5a4 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   8
term-prep?      0-0  235 0x407dc3 0x40e5e3 len= 28 rest= 4 send=0
(form)          0-0  236 0x407de5 0x40e625 len= 39 rest= 4 send=0
isatty          0-0  237 0x407e12 0x40e672 len= 31 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  12
isfg            0-0  238 0x407e37 0x40e6b7 len= 56 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   8
wcwidth         0-0  239 0x407e75 0x40e715 len= 21 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  12
flush-icache    0-0  240 0x407e90 0x40e750 len= 12 rest= 4 send=0
(bye)           0-0  241 0x407ea2 0x40e782 len= 55 rest= 4 send=1
   non_reloc: engine1!=engine2 offset  16
(system)        0-0  242 0x407edf 0x40e7df len= 87 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  22
getenv          0-0  243 0x407f3c 0x40e85c len=103 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  21
open-pipe       0-0  244 0x407fa9 0x40e8e9 len=136 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  25
close-pipe      0-0  245 0x408037 0x40e997 len= 55 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  12
time&date       0-0  246 0x408074 0x40e9f4 len=123 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  21
(ms)            0-0  247 0x4080f5 0x40ea95 len= 20 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  16
heap-allocate   0-0  248 0x40810f 0x40eacf len= 71 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  43
heap-free       0-0  249 0x40815c 0x40eb3c len= 27 rest= 4 send=0
heap-resize     0-0  250 0x40817d 0x40eb7d len=112 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  74
strerror        0-0  251 0x4081f3 0x40ec13 len= 38 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  16
strsignal       0-0  252 0x40821f 0x40ec5f len= 38 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  16
call-c          0-0  253 0x40824b 0x40ecab len= 29 rest= 4 send=0
call-c#         0-0  254 0x40826e 0x40ecee len= 28 rest= 4 send=0
gforth-pointers 0-0  255 0x408290 0x40ed30 len= 22 rest= 4 send=0
close-file      0-0  256 0x4082ac 0x40ed6c len= 48 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   8
open-file       0-0  257 0x4082e2 0x40edc2 len=101 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  29
create-file     0-0  258 0x40834d 0x40ee4d len=104 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  30
delete-file     0-0  259 0x4083bb 0x40eedb len= 89 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  16
rename-file     0-0  260 0x40841a 0x40ef5a len= 39 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  28
file-position   0-0  261 0x408447 0x40efa7 len= 74 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  12
reposition-file 0-0  262 0x408497 0x40f017 len= 61 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  18
file-size       0-0  263 0x4084da 0x40f07a len=118 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  12
resize-file     0-0  264 0x408556 0x40f116 len= 76 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  21
read-file       0-0  265 0x4085a8 0x40f188 len=180 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  67
(read-line)     0-0  266 0x408662 0x40f262 len= 84 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  34
write-file      0-0  267 0x4086bc 0x40f2dc len=169 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  70
emit-file       0-0  268 0x40876b 0x40f3ab len=102 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  28
flush-file      0-0  269 0x4087d7 0x40f437 len= 48 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   8
file-status     0-0  270 0x40880d 0x40f48d len= 27 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  16
file-eof?       0-0  271 0x40882e 0x40f4ce len= 24 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  12
open-dir        0-0  272 0x40884c 0x40f50c len=110 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  21
read-dir        0-0  273 0x4088c0 0x40f5a0 len=159 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  39
close-dir       0-0  274 0x408965 0x40f665 len= 47 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   9
filename-match  0-0  275 0x40899a 0x40f6ba len=146 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  38
set-dir         0-0  276 0x408a32 0x40f772 len= 88 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  16
get-dir         0-0  277 0x408a90 0x40f7f0 len= 58 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  16
=mkdir          0-0  278 0x408ad0 0x40f850 len=101 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  25
newline         0-0  279 0x408b3b 0x40f8db len= 31 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   7
utime           0-0  280 0x408b60 0x40f920 len= 45 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  26
cputime         0-0  281 0x408b93 0x40f973 len= 79 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  26
ntime           0-0  282 0x408be8 0x40f9e8 len= 45 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  27
(ns)            0-0  283 0x408c1b 0x40fa3b len=100 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  58
f=              0-0  284 0x408c85 0x40fac5 len= 52 rest= 4 send=0
f<>             0-0  285 0x408cbf 0x40fb1f len= 52 rest= 4 send=0
f<              0-0  286 0x408cf9 0x40fb79 len= 43 rest= 4 send=0
f>              0-0  287 0x408d2a 0x40fbca len= 43 rest= 4 send=0
f<=             0-0  288 0x408d5b 0x40fc1b len= 43 rest= 4 send=0
f>=             0-0  289 0x408d8c 0x40fc6c len= 43 rest= 4 send=0
f0=             0-0  290 0x408dbd 0x40fcbd len= 51 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  25
f0<>            0-0  291 0x408df6 0x40fd16 len= 51 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  24
f0<             0-0  292 0x408e2f 0x40fd6f len= 40 rest= 4 send=0
f0>             0-0  293 0x408e5d 0x40fdbd len= 42 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  24
f0<=            0-0  294 0x408e8d 0x40fe0d len= 40 rest= 4 send=0
f0>=            0-0  295 0x408ebb 0x40fe5b len= 42 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  24
s>f             0-0  296 0x408eeb 0x40feab len= 37 rest= 4 send=0
d>f             0-0  297 0x408f16 0x40fef6 len= 37 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  28
f>d             0-0  298 0x408f41 0x40ff41 len= 35 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  25
f>s             0-0  299 0x408f6a 0x40ff8a len= 28 rest= 4 send=0
f!              0-0  300 0x408f8c 0x40ffcc len= 31 rest= 4 send=0
f@              0-0  301 0x408fb1 0x410011 len= 32 rest= 4 send=0
df@             0-0  302 0x408fd7 0x410057 len= 32 rest= 4 send=0
df!             0-0  303 0x408ffd 0x41009d len= 31 rest= 4 send=0
sf@             0-0  304 0x409022 0x4100e2 len= 36 rest= 4 send=0
sf!             0-0  305 0x40904c 0x41012c len= 35 rest= 4 send=0
f+              0-0  306 0x409075 0x410175 len= 32 rest= 4 send=0
f-              0-0  307 0x40909b 0x4101bb len= 32 rest= 4 send=0
f*              0-0  308 0x4090c1 0x410201 len= 32 rest= 4 send=0
f/              0-0  309 0x4090e7 0x410247 len= 32 rest= 4 send=0
f**             0-0  310 0x40910d 0x41028d len= 37 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  28
fm*             0-0  311 0x409138 0x4102d8 len= 36 rest= 4 send=0
fm/             0-0  312 0x409162 0x410322 len= 40 rest= 4 send=0
fm*/            0-0  313 0x409190 0x410370 len= 53 rest= 4 send=0
f**2            0-0  314 0x4091cb 0x4103cb len= 24 rest= 4 send=0
fnegate         0-0  315 0x4091e9 0x410409 len= 28 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  14
fdrop           0-0  316 0x40920b 0x41044b len= 19 rest= 4 send=0
fdup            0-0  317 0x409224 0x410484 len= 27 rest= 4 send=0
fswap           0-0  318 0x409245 0x4104c5 len= 34 rest= 4 send=0
fover           0-0  319 0x40926d 0x41050d len= 28 rest= 4 send=0
frot            0-0  320 0x40928f 0x41054f len= 48 rest= 4 send=0
fnip            0-0  321 0x4092c5 0x4105a5 len= 27 rest= 4 send=0
ftuck           0-0  322 0x4092e6 0x4105e6 len= 43 rest= 4 send=0
float+          0-0  323 0x409317 0x410637 len= 12 rest= 4 send=0
floats          0-0  324 0x409329 0x410669 len= 12 rest= 4 send=0
floor           0-0  325 0x40933b 0x41069b len=106 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  14
fround          0-0  326 0x4093ab 0x41072b len= 75 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   8
fmax            0-0  327 0x4093fc 0x41079c len= 32 rest= 4 send=0
fmin            0-0  328 0x409422 0x4107e2 len= 32 rest= 4 send=0
represent       0-0  329 0x409448 0x410828 len= 56 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  36
>float          0-0  330 0x409486 0x410886 len= 70 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  30
fabs            0-0  331 0x4094d2 0x4108f2 len= 28 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  14
facos           0-0  332 0x4094f4 0x410934 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
fasin           0-0  333 0x409513 0x410973 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
fatan           0-0  334 0x409532 0x4109b2 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
fatan2          0-0  335 0x409551 0x4109f1 len= 37 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  28
fcos            0-0  336 0x40957c 0x410a3c len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
fexp            0-0  337 0x40959b 0x410a7b len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
fexpm1          0-0  338 0x4095ba 0x410aba len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  16
fln             0-0  339 0x4095d9 0x410af9 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
flnp1           0-0  340 0x4095f8 0x410b38 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
flog            0-0  341 0x409617 0x410b77 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
falog           0-0  342 0x409636 0x410bb6 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
fsin            0-0  343 0x409655 0x410bf5 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
fsincos         0-0  344 0x409674 0x410c34 len= 58 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  33
fsqrt           0-0  345 0x4096b4 0x410c94 len= 42 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  30
ftan            0-0  346 0x4096e4 0x410ce4 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  16
fsinh           0-0  347 0x409703 0x410d23 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
fcosh           0-0  348 0x409722 0x410d62 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
ftanh           0-0  349 0x409741 0x410da1 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
fasinh          0-0  350 0x409760 0x410de0 len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
facosh          0-0  351 0x40977f 0x410e1f len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
fatanh          0-0  352 0x40979e 0x410e5e len= 25 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  15
sfloats         0-0  353 0x4097bd 0x410e9d len= 12 rest= 4 send=0
dfloats         0-0  354 0x4097cf 0x410ecf len= 12 rest= 4 send=0
sfaligned       0-0  355 0x4097e1 0x410f01 len= 22 rest= 4 send=0
dfaligned       0-0  356 0x4097fd 0x410f3d len= 22 rest= 4 send=0
v*              0-0  357 0x409819 0x410f79 len= 50 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  41
faxpy           0-0  358 0x409851 0x410fd1 len= 48 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  44
>float1         0-0  359 0x409887 0x411027 len= 70 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  29
float/          0-0  360 0x4098d3 0x411093 len= 12 rest= 4 send=0
dfloat/         0-0  361 0x4098e5 0x4110c5 len= 12 rest= 4 send=0
sfloat/         0-0  362 0x4098f7 0x4110f7 len= 12 rest= 4 send=0
f-rot           0-0  363 0x409909 0x411129 len= 48 rest= 4 send=0
flit            0-0  364 0x40993f 0x41117f len= 26 rest= 4 send=0
@local#         0-0  365 0x40995f 0x4111bf len= 22 rest= 4 send=0
@local0         0-0  366 0x40997b 0x4111fb len= 19 rest= 4 send=0
@local1         0-0  367 0x409994 0x411234 len= 19 rest= 4 send=0
@local2         0-0  368 0x4099ad 0x41126d len= 19 rest= 4 send=0
@local3         0-0  369 0x4099c6 0x4112a6 len= 19 rest= 4 send=0
f@local#        0-0  370 0x4099df 0x4112df len= 29 rest= 4 send=0
f@local0        0-0  371 0x409a02 0x411322 len= 26 rest= 4 send=0
f@local1        0-0  372 0x409a22 0x411362 len= 26 rest= 4 send=0
laddr#          0-0  373 0x409a42 0x4113a2 len= 21 rest= 4 send=0
lp+!#           0-0  374 0x409a5d 0x4113dd len= 21 rest= 4 send=0
lp-             0-0  375 0x409a78 0x411418 len= 12 rest= 4 send=0
lp+             0-0  376 0x409a8a 0x41144a len= 19 rest= 4 send=0
lp+2            0-0  377 0x409aa3 0x411483 len= 19 rest= 4 send=0
lp!             0-0  378 0x409abc 0x4114bc len= 15 rest= 4 send=0
>l              0-0  379 0x409ad1 0x4114f1 len= 26 rest= 4 send=0
f>l             0-0  380 0x409af1 0x411531 len= 31 rest= 4 send=0
fpick           0-0  381 0x409b16 0x411576 len= 34 rest= 4 send=0
fthird          0-0  382 0x409b3e 0x4115be len= 28 rest= 4 send=0
ffourth         0-0  383 0x409b60 0x411600 len= 28 rest= 4 send=0
open-lib        0-0  384 0x409b82 0x411642 len= 31 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  20
lib-sym         0-0  385 0x409ba7 0x411687 len= 88 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  29
wcall           0-0  386 0x409c05 0x411705 len= 68 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  36
uw@             0-0  387 0x409c4f 0x41176f len= 17 rest= 4 send=0
sw@             0-0  388 0x409c66 0x4117a6 len= 18 rest= 4 send=0
w!              0-0  389 0x409c7e 0x4117de len= 22 rest= 4 send=0
ul@             0-0  390 0x409c9a 0x41181a len= 16 rest= 4 send=0
sl@             0-0  391 0x409cb0 0x411850 len= 17 rest= 4 send=0
l!              0-0  392 0x409cc7 0x411887 len= 21 rest= 4 send=0
lib-error       0-0  393 0x409ce2 0x4118c2 len= 35 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   5
be-w!           0-0  394 0x409d0b 0x41190b len= 26 rest= 4 send=0
be-l!           0-0  395 0x409d2b 0x41194b len= 23 rest= 4 send=0
le-w!           0-0  396 0x409d48 0x411988 len= 22 rest= 4 send=0
le-l!           0-0  397 0x409d64 0x4119c4 len= 21 rest= 4 send=0
be-uw@          0-0  398 0x409d7f 0x4119ff len= 24 rest= 4 send=0
be-ul@          0-0  399 0x409d9d 0x411a3d len= 20 rest= 4 send=0
le-uw@          0-0  400 0x409db7 0x411a77 len= 17 rest= 4 send=0
le-ul@          0-0  401 0x409dce 0x411aae len= 16 rest= 4 send=0
close-lib       0-0  402 0x409de4 0x411ae4 len= 20 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  17
x!              0-0  403 0x409dfe 0x411b1e len= 22 rest= 4 send=0
ux@             0-0  404 0x409e1a 0x411b5a len= 17 rest= 4 send=0
sx@             0-0  405 0x409e31 0x411b91 len= 17 rest= 4 send=0
be-x!           0-0  406 0x409e48 0x411bc8 len= 25 rest= 4 send=0
le-x!           0-0  407 0x409e67 0x411c07 len= 22 rest= 4 send=0
be-ux@          0-0  408 0x409e83 0x411c43 len= 20 rest= 4 send=0
le-ux@          0-0  409 0x409e9d 0x411c7d len= 17 rest= 4 send=0
xd!             0-0  410 0x409eb4 0x411cb4 len= 22 rest= 4 send=0
uxd@            0-0  411 0x409ed0 0x411cf0 len= 29 rest= 4 send=0
sxd@            0-0  412 0x409ef3 0x411d33 len= 29 rest= 4 send=0
be-xd!          0-0  413 0x409f16 0x411d76 len= 25 rest= 4 send=0
le-xd!          0-0  414 0x409f35 0x411db5 len= 22 rest= 4 send=0
be-uxd@         0-0  415 0x409f51 0x411df1 len= 32 rest= 4 send=0
le-uxd@         0-0  416 0x409f77 0x411e37 len= 29 rest= 4 send=0
w><             0-0  417 0x409f9a 0x411e7a len= 22 rest= 4 send=0
l><             0-0  418 0x409fb6 0x411eb6 len= 18 rest= 4 send=0
x><             0-0  419 0x409fce 0x411eee len= 17 rest= 4 send=0
xd><            0-0  420 0x409fe5 0x411f25 len= 26 rest= 4 send=0
c>s             0-0  421 0x40a005 0x411f65 len= 15 rest= 4 send=0
w>s             0-0  422 0x40a01a 0x411f9a len= 15 rest= 4 send=0
l>s             0-0  423 0x40a02f 0x411fcf len= 14 rest= 4 send=0
>pow2           0-0  424 0x40a043 0x412003 len= 51 rest= 4 send=0
log2            0-0  425 0x40a07c 0x41205c len= 44 rest= 4 send=0
!@              0-0  426 0x40a0ae 0x4120ae len= 29 rest= 4 send=0
+!@             0-0  427 0x40a0d1 0x4120f1 len= 31 rest= 4 send=0
?!@             0-0  428 0x40a0f6 0x412136 len= 35 rest= 4 send=0
barrier         0-0  429 0x40a11f 0x41217f len= 11 rest= 4 send=0
compile-prim1   0-0  430 0x40a130 0x4121b0 len= 20 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  16
finish-code     0-0  431 0x40a14a 0x4121ea len= 13 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   5
forget-dyncode  0-0  432 0x40a15d 0x41221d len= 21 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  12
decompile-prim  0-0  433 0x40a178 0x412258 len= 19 rest= 4 send=0
   non_reloc: engine1!=engine2 offset  12
tag-offsets     0-0  434 0x40a191 0x412291 len= 22 rest= 4 send=0
finish-code|    0-0  435 0x40a1ad 0x4122cd len= 13 rest= 4 send=0
   non_reloc: engine1!=engine2 offset   5
abi-call        0-0  436 0x40a1c0 0x412300 len= 43 rest= 4 send=0
;abi-code-exec  0-0  437 0x40a1f1 0x412351 len= 52 rest= 4 send=0
lit-execute     0-0  438 0x40a22b 0x4123ab len= 14 rest= 0 send=1
>o              0-0  439 0x40a23b 0x4123db len= 41 rest= 4 send=0
o>              0-0  440 0x40a26a 0x41242a len= 28 rest= 4 send=0
o#+             0-0  441 0x40a28c 0x41246c len= 23 rest= 4 send=0
o#exec          0-0  442 0x40a2a9 0x4124a9 len= 27 rest= 0 send=1
x#exec          0-0  443 0x40a2c6 0x4124e6 len= 25 rest= 0 send=1
u#exec          0-0  444 0x40a2e1 0x412521 len= 35 rest= 0 send=1
u#+             0-0  445 0x40a306 0x412566 len= 31 rest= 4 send=0
Using 0 static superinsts
pagesize=4096
try mmap((nil), $801000, ..., dev_zero, ...); success, address=0x6bcbee068000
try mprotect(0x6bcbee868000,$1000,PROT_NONE); ok
mmap($800000) succeeds, address=0x6bcbee068000
try mmap(0x6bcbee068000, $66aa0, ..., MAP_FIXED|MAP_FILE, imagefile, 0); success, address=0x6bcbee068000
relocate section 0, 0x100:66a40
Did not use 0 bytes in code block
try mmap((nil), $80000, ..., dev_zero, ...); success, address=0x6bcbedfe8000
mmap($80000) succeeds, address=0x6bcbedfe8000
relocate section 1, 0x6bcbfc2a1a08:3
try mmap((nil), $2a000, ..., dev_zero, ...); success, address=0x6bcbedfbe000
try mprotect(0x6bcbedfbf000,$1000,PROT_NONE); ok
try mprotect(0x6bcbedfc8000,$1000,PROT_NONE); ok
try mprotect(0x6bcbedfd1000,$1000,PROT_NONE); ok
try mprotect(0x6bcbedfda000,$1000,PROT_NONE); ok
try mprotect(0x6bcbedfe3000,$1000,PROT_NONE); ok
Booting Gforth: 0x6bcbee077c08
setjmp(0x78197355f410)
run Gforth engine with ip=0x6bcbee077c08
Did not use 224 bytes in code block
try mmap((nil), $80000, ..., dev_zero, ...); success, address=0x6bcbedb98000
mmap($80000) succeeds, address=0x6bcbedb98000

objects.fs:416:30: warning: redefined catch
kernel/basics.fs:240:7: warning: original location
oof.fs:110:11: warning: redefined >o
prim:3527:1: warning: original location
oof.fs:115:11: warning: redefined o>
prim:3531:1: warning: original location
oof.fs:417:17: warning: redefined bind
objects.fs:475:3: warning: original location
oof.fs:500:38: warning: redefined object
objects.fs:523:11: warning: original location
oof.fs:656:53: warning: redefined interface
objects.fs:226:3: warning: original location
moofglos.fs:7:47: warning: redefined method
objects.fs:157:3: warning: original location
moofglos.fs:16:12: warning: redefined class
objects.fs:290:3: warning: original location
moofglos.fs:21:51: warning: redefined end-class
objects.fs:331:3: warning: original location
moofglos.fs:36:31: warning: redefined object
oof.fs:500:8: warning: original location
regexp.fs:61:42: warning: redefined or!
kernel/comp.fs:393:3: warning: original location
segv_handler 11 0x6bcbedfe7af0 0x6bcbedfe79c0 @0x31f

throw code -9 to 0x78197355f410

caught signal, throwing exception -9, ip=0x6bcbee0cf140 rp=0x6bcbedfd0e10
header=0x6bcbee068060, UP=0x6bcbedfbe000
run Gforth engine with ip=0x6bcbee08d458

uncaught exception: Invalid memory address
Start returned 2
*** Gforth kernel failed ***

No clue what that is supposed to mean...

@Mindavi
Copy link
Contributor

Mindavi commented Jun 14, 2021

For armv7l it seems the result is different.

I did do this to ensure that gforth is picked up from the path:

+  makeFlags = lib.optionals crossCompiling [
+    "ENGINE=${buildPackages.gforth}/bin/gforth"
+  ];

Still fails though :(

gforth-armv7l-unknown-linux-gnueabihf> ./preforth -p ".:~+:." -e 's" mach16b.fs"' ./kernel/main.fs -e "save-cross kernl16b.fi- /nix/store/l3xniapazd836zwbbyssb554wp697gzb-gforth-armv7l-unknown-linux-gnueabihf-0.7.3/bin/gforth-0.7.3 bye"
gforth-armv7l-unknown-linux-gnueabihf> ./engine/gforth-ll: line 1: syntax error: unexpected word (expecting ")")

@siraben
Copy link
Member Author

siraben commented Jun 15, 2021

Hi @Mindavi, thanks for looking into this. My attempts have been to cross-compile to armv7l, i.e. pkgs.raspberryPi.gforth. How did building the bleeding edge version go?

@Mindavi
Copy link
Contributor

Mindavi commented Jun 16, 2021

Ah ok, good to know. The bleeding edge experience I described above, it didn't go very well.

@siraben
Copy link
Member Author

siraben commented Jun 16, 2021

I will incorporate your diffs into this PR and rebase on master, but looks like we're stuck for a while and should revisit next release.

@siraben
Copy link
Member Author

siraben commented Nov 15, 2021

@Artturin you might be interested in this cross-compilation issue also

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 19, 2022
Co-authored-by: Artturin <Artturin@artturin.com>
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 22, 2023
@Artturin
Copy link
Member

Artturin commented Sep 22, 2023

All libtool with -mode=link fail with gcc: command not found

gforth-aarch64-unknown-linux-gnu> libtool --tag=CC --mode=link aarch64-unknown-linux-gnu-gcc -version-info 0:8:0 -rpath /nix/store/gysnrlq4b5wcs2cbx5wznwvxs5gl6s1n-gforth-aarch64-unknown-linux-gnu-0.7.9_20230518/lib  -pthread  libengine-ll.lo libengine2-ll.lo libmain-ll.lo libio.lo libsignals.lo libsupport-ll.lo libarm64-cacheflush.lo libmemcmp.lo libfnmatch.lo -ldl -lrt -lm   -o libgforth-ll.la
gforth-aarch64-unknown-linux-gnu> libtool: link: gcc -shared  -fPIC -DPIC  .libs/libengine-ll.o .libs/libengine2-ll.o .libs/libmain-ll.o .libs/libio.o .libs/libsignals.o .libs/libsupport-ll.o .libs/libarm64-cacheflush.o .libs/libmemcmp.o .libs/libfnmatch.o   -ldl -lrt -lm    -pthread -Wl,-soname -Wl,libgforth-ll.so.0 -o .libs/libgforth-ll.so.0.0.8
gforth-aarch64-unknown-linux-gnu> /nix/store/nxz0vkhska9x8r74kn8ahz032w5qhd5r-libtool-2.4.7/bin/libtool: line 10840: gcc: command not found

-mode=compile work and use the correct CC

pkgsCross.aarch64-multiplatform.gforth

@siraben
Copy link
Member Author

siraben commented Apr 4, 2024

@Artturin how would I set mode=compile for libtool?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants