Error when creating an executable of a script

I tried to make an exe out of a script and got back this error:

expand-elf: cannot move SHT_PROGBITS section
  context...:
   /data/data/com.termux/files/usr/share/racket/collects/compiler/private/elf.rkt:442:11: for-loop
   /data/data/com.termux/files/usr/share/racket/collects/compiler/private/elf.rkt:365:7
   /data/data/com.termux/files/usr/share/racket/collects/racket/private/kw-file.rkt:139:2: call-with-output-file*
   /data/data/com.termux/files/usr/share/racket/collects/racket/private/kw-file.rkt:125:2: call-with-input-file*
   /data/data/com.termux/files/usr/share/racket/collects/compiler/embed.rkt:1580:6
   /data/data/com.termux/files/usr/share/racket/collects/racket/private/more-scheme.rkt:206:2: call-handled-body

What's going on? I believe I've made exes successfully in the past on this platform (android 64-bit, termux). But definitely on prior versions. The only new thing I've done this time is use define-runtime-path.

I was able to produce the same error on a hello world. Something is failing when using raco exe for presumably any script.

Thanks for the report!

It looks like variation in the layout of the C-compiled starter executable has exposed a problem with raco exe. Based inspection of the executables at Index of /apt/termux-main/pool/main/r/racket/, I think I've tracked down the problem and pushed a repair: raco exe: repair ELF update to add a section · racket/racket@bf288da · GitHub

1 Like