idris-lang / Idris2

A purely functional programming language with first class types
https://idris-lang.org/
Other
2.53k stars 379 forks source link

Fedora FC38, FC39 with racket 7.9 — "make bootstrap-racket" freezes on compilation #3261

Open belonesox opened 7 months ago

belonesox commented 7 months ago

Trying install idris2 with racket on Fedora with racket 7.9 (tested on FC38 and FC39, on several desktops, racket-7.9-1.fc38.x86_64, racket-7.9-1.fc39.x86_64)

Compilation raco exe idris2_app/idris2-boot.rkt from make bootstrap-racket hangs with 100% CPU utilization (waiting lot of hours, nothing interesed in verbose --vv in stdout).

If we run with strace and interrupt build we have stack

[stas@stasbox64gb Idris2]$ strace -e trace=file -f -o strace.log make bootstrap-racket 
mkdir -p bootstrap-build/idris2_app
cp /home/stas/projects/-discopal/idris/Idris2/support/c/libidris2_support.so bootstrap-build/idris2_app/
sed 's|__PREFIX__|/home/stas/projects/-discopal/idris/Idris2/bootstrap-build|g' \
    bootstrap/idris2_app/idris2.rkt \
    > bootstrap-build/idris2_app/idris2-boot.rkt
/bin/sh ./bootstrap-stage1-racket.sh
Bootstrapping IDRIS2_VERSION=0.7.0
Building idris2-boot from idris2-boot.rkt
^Cuser break
  context...:
   /usr/share/racket/collects/racket/private/stxcase.rkt:20:7: loop
   [repeats 1 more time]
   /usr/share/racket/collects/racket/private/case.rkt:14:4: try-next
   /usr/share/racket/collects/compiler/embed.rkt:450:0: get-code
   /usr/share/racket/collects/racket/private/map.rkt:269:4: loop
   /usr/share/racket/collects/compiler/embed.rkt:1159:0: do-write-module-bundle
   /usr/share/racket/collects/compiler/embed.rkt:1759:33
   /usr/share/racket/collects/compiler/private/elf.rkt:287:0: expand-elf
   /usr/share/racket/collects/compiler/embed.rkt:1531:6
   "/usr/share/racket/pkgs/compiler-lib/compiler/commands/exe.rkt": [running body]
   "/usr/share/racket/collects/raco/raco.rkt": [running body]
   "/usr/share/racket/collects/raco/main.rkt": [running body]
make: *** [Makefile:276: bootstrap-racket] Error 1

on strace.log

…
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/compatibility-doc/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/math-lib/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/compiler-lib/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/data-lib/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/data-enumerate-lib/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/data-doc/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/syntax-color-lib/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/db-lib/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/db-doc/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/deinprogramm-signature/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/htdp-lib/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/scheme-lib/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/wxme-lib/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/snip-lib/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/htdp-doc/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/gui-doc/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/pict-doc/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/pict-lib/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/planet-lib/typed-racket", 0x7ffde2fec790, 0) = -1 ENOENT (No such file or directory)
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/typed-racket-lib/typed-racket", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/typed-racket-lib/typed-racket/typecheck", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
2407877 newfstatat(AT_FDCWD, "/usr/share/racket/pkgs/typed-racket-lib/typed-racket/typecheck/renamer.rkt", {st_mode=S_IFREG|0644, st_size=1448, ...}, 0) = 0
2407877 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7f2502b40600} ---
2407877 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7f2502dfac40} ---
2407877 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7f2504ea7690} ---
2407877 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7f2505025e00} ---
2407877 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7f2502bb52a8} ---
2407877 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7f2502a37f28} ---

…
infinite loop with SIGSEGV
…

Strace.log attached → strace.zip


Same problem with installing via idris-pack, first fire the issue, but definitely, idris-pack is not guilty.


With Chez Scheme (from dnf copr enable superboum/chez-scheme) compilation/installation goes OK.

Should I check different versions of Racket while compiling "idris2_app/idris2-boot.rkt" or maybe I should fire some debug mode? Or may be I should make test script that reproduce the bug in all distro using distrobox?

CodingCellist commented 7 months ago

Should I check different versions of Racket while compiling "idris2_app/idris2-boot.rkt"

If you can install a newer version of Racket, I would try that yes. From a bit of searching and digging around, it seems Racket 8.0 was a major change so it is possible that Idris does not compile pre-v8.0. Annoyingly, it doesn't seem like Fedora provides a newer version by default despite Racket v8.0 being over 3 years old at this point, so you will need to install it manually or via a community repo.

juhp commented 6 months ago

I have racket 8.12 ready for Fedora 39+ in updates-testing - you could try that. (I will probably push them stable soon too.)