# Fail to build 8.16 with Nix for docs failure

**URL:** <https://racket.discourse.group/t/fail-to-build-8-16-with-nix-for-docs-failure/3609>\
**Category:** Distro Packagers\
**Tags:** question, documentation\
**Created:** [March 7, 2025, 4:14am UTC](https://racket.discourse.group/t/fail-to-build-8-16-with-nix-for-docs-failure/3609 "2025-03-07T04:14:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rczb](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/rczb/32/2137_2.png) [@rczb](https://racket.discourse.group/u/rczb)\
**Post date:** [March 7, 2025, 4:14am UTC](https://racket.discourse.group/t/fail-to-build-8-16-with-nix-for-docs-failure/3609/1 "2025-03-07T04:14:51Z")

</div>

Hello everyone, I am the maintainer of `racket[-minimal]` packages of [Nixpkgs](https://github.com/NixOS/nixpkgs/). Recently when I performed the routine of [upgrading Racket from 8.15 to 8.16](https://github.com/NixOS/nixpkgs/pull/387460), certain error occurred:

```log
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`](https://github.com/NixOS/nixpkgs/tree/master/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.

---

<div class="post-metadata">

**Author:** ![LiberalArtist](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/liberalartist/32/151_2.png) [@LiberalArtist](https://racket.discourse.group/u/LiberalArtist)\
**Post date:** [March 7, 2025, 4:54am UTC](https://racket.discourse.group/t/fail-to-build-8-16-with-nix-for-docs-failure/3609/2 "2025-03-07T04:54:57Z")

</div>

> [@rczb](#):
>
> ```scheme
> 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
> 
> ```

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.

---

<div class="post-metadata">

**Author:** ![mflatt](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/mflatt/32/6_2.png) [@mflatt](https://racket.discourse.group/u/mflatt)\
**Post date:** [March 9, 2025, 2:14am UTC](https://racket.discourse.group/t/fail-to-build-8-16-with-nix-for-docs-failure/3609/3 "2025-03-09T02:14:13Z")

</div>

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](https://github.com/racket/racket/commit/3edb41e2951966b65094c05f7d43fe753f03ff96) to fix a `ftype-ref` that should be `ftype-any-ref`, which is the source of the error when configuring with `--enable-check`.

---

<div class="post-metadata">

**Author:** ![rczb](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/rczb/32/2137_2.png) [@rczb](https://racket.discourse.group/u/rczb)\
**Post date:** [March 9, 2025, 6:50am UTC](https://racket.discourse.group/t/fail-to-build-8-16-with-nix-for-docs-failure/3609/4 "2025-03-09T06:50:36Z")

</div>

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.
