Fail to build 8.16 with Nix for docs failure

Hello everyone, I am the maintainer of racket[-minimal] packages of Nixpkgs. Recently when I performed the routine of upgrading Racket from 8.15 to 8.16, certain error occurred:

raco setup: --- building documentation ---                         [1:26:47]
raco setup: docs failure: ftype-ref: ftype mismatch for #<ftype-pointer>
failed
 in build-one
 in loop
 in module->hash
make: *** [Makefile:22: all] Error 1

I can't find any approach to query out more information, so it just gets stuck.

The recipe can be found in pkgs/development/interpreters/racket. TLDR: I pass

  • libiconv
  • libz
  • lz4
  • ncurses
  • openssl
  • sqlite

as inputs, with

  • cairo
  • fontconfig
  • glib
  • gtk3
  • libGL
  • libjpeg
  • libpng
  • pango
  • unixODBC

in addition for the full distribution; --enable-

  • check
  • csonly
  • liblz4
  • libz
  • shared (which is said to be dummy)

and --disable-libs.

This works fine for 8.15, as well as the minimal distribution of 8.16. Only the full distribution of 8.16 does not build.

The ftype system is a Chez Scheme construct, so, at a minimum, it's a Racket bug that this error message is exposing implementation details.

Something else may also be going wrong with foreign libraries to get to this error.

I haven't tried updating the Guix package yet, but I'll see if I encounter a similar issue.

I'm able to provoke this failure by configuring with --enable-check, which refrains from compiling the Chez Scheme-implemented part of Racket in unsafe mode. That flag is intended only for debugging, but is the Nixpkgs build using that configuration flag?

I've pushed a repair to fix a ftype-ref that should be ftype-any-ref, which is the source of the error when configuring with --enable-check.

1 Like

Thanks! removing --enable-check makes it build.

That flag is intended only for debugging, but is the Nixpkgs build using that configuration flag?

Yes. I used that flag to prevent implicit but invalid flags to be passed to configure by the "standard environment" of Nixpkgs or by the user.