#1137045 crystal: FTBFS in bookworm

Package:
src:crystal
Source:
src:crystal
Submitter:
Santiago Vila
Date:
2026-08-18 21:25:02 UTC
Severity:
normal
Tags:
#1137045#5
Date:
2026-05-18 23:19:08 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in bookworm, this package failed to build.

[ Note: The bug is marked as fixed with the version in trixie/forky/sid, but
  packages in bookworm must still build in bookworm ].

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/bookworm/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:crystal, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean
   dh_auto_clean
	make -j2 clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
rm -rf .build
rm -rf ./docs
rm -rf src/llvm/ext/llvm_ext.o
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   debian/rules override_dh_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'

[... snipped ...]

  parses "+.Inf"
  parses "+.Inf"
  parses "+.INF"
  parses "+.INF"
  parses "-.inf"
  parses "-.inf"
  parses "-.Inf"
  parses "-.Inf"
  parses "-.INF"
  parses "-.INF"
  parses nan
  parses nan
  parses "0"
  parses "0"
  parses "123"
  parses "123"
  parses "+123"
  parses "+123"
  parses "-123"
  parses "-123"
  parses "0b0"
  parses "0b0"
  parses "0b10110"
  parses "0b10110"
  parses "00"
  parses "00"
  parses "0o0"
  parses "0o0"
  parses "0o123"
  parses "0o123"
  parses "0755"
  parses "0755"
  parses "0x0"
  parses "0x0"
  parses "0x123abc"
  parses "0x123abc"
  parses "-0x123abc"
  parses "-0x123abc"
  parses "1.2"
  parses "1.2"
  parses "0.815"
  parses "0.815"
  parses "0."
  parses "0."
  parses "-0.0"
  parses "-0.0"
  parses "1_234.2"
  parses "1_234.2"
  parses "-2E+05"
  parses "-2E+05"
  parses "+12.3"
  parses "+12.3"
  parses ".5"
  parses ".5"
  parses "+.5"
  parses "+.5"
  parses "-.5"
  parses "-.5"
  parses "2002-12-14"
  parses "2002-12-14"
  parses "2002-1-2"
  parses "2002-1-2"
  parses "2002-1-2T10:11:12"
  parses "2002-1-2T10:11:12"
  parses "2002-1-2   10:11:12"
  parses "2002-1-2   10:11:12"
  parses "2002-1-2   1:11:12"
  parses "2002-1-2   1:11:12"
  parses "2002-1-2T10:11:12.3"
  parses "2002-1-2T10:11:12.3"
  parses "2002-1-2T10:11:12.34"
  parses "2002-1-2T10:11:12.34"
  parses "2002-1-2T10:11:12.345"
  parses "2002-1-2T10:11:12.345"
  parses "2002-1-2T10:11:12.3456"
  parses "2002-1-2T10:11:12.3456"
  parses "2002-1-2T10:11:12Z"
  parses "2002-1-2T10:11:12Z"
  parses "2002-1-2T10:11:12 Z"
  parses "2002-1-2T10:11:12 Z"
  parses "2002-1-2T10:11:12 +3"
  parses "2002-1-2T10:11:12 +3"
  parses "2002-1-2T10:11:12 +03:00"
  parses "2002-1-2T10:11:12 +03:00"
  parses "2002-1-2T10:11:12 -03:00"
  parses "2002-1-2T10:11:12 -03:00"
  parses "2002-1-2T10:11:12 -03:31"
  parses "2002-1-2T10:11:12 -03:31"
  parses "2002-1-2T10:11:12-03:31"
  parses "2002-1-2T10:11:12-03:31"
  parses "2002-1-2T10:11:12 +0300"
  parses "2002-1-2T10:11:12 +0300"
  parses "2002-34-45"
  parses "2002-34-45"
  parses "2002-12-14 x"
  parses "2002-12-14 x"
  parses "2002-1-2T10:11:12x"
  parses "2002-1-2T10:11:12x"
  parses "2002-1-2T10:11:12Zx"
  parses "2002-1-2T10:11:12Zx"
  parses "2002-1-2T10:11:12+03x"
  parses "2002-1-2T10:11:12+03x"
  parses "\"1\""
  parses "\"1\""
  parses "y"
  parses "y"
  parses "Y"
  parses "Y"
  parses "n"
  parses "n"
  parses "N"
  parses "N"
  parses "!!map {1: 2}"
  parses "!!map {1: 2}"
  raises on parse "!!map 1"
  raises on parse "!!map 1"
  parses "!!omap {1: 2}"
  parses "!!omap {1: 2}"
  raises on parse "!!omap 1"
  raises on parse "!!omap 1"
  parses "!!pairs [{1: 2}, {3: 4}]"
  parses "!!pairs [{1: 2}, {3: 4}]"
  raises on parse "!!pairs 1"
  raises on parse "!!pairs 1"
  raises on parse "!!pairs [{1: 2, 3: 4}]"
  raises on parse "!!pairs [{1: 2, 3: 4}]"
  parses "!!set { 1, 2, 3 }"
  parses "!!set { 1, 2, 3 }"
  raises on parse "!!set 1"
  raises on parse "!!set 1"
  parses "!!seq [ 1, 2, 3 ]"
  parses "!!seq [ 1, 2, 3 ]"
  raises on parse "!!seq 1"
  raises on parse "!!seq 1"
  parses "!!binary aGVsbG8="
  parses "!!binary aGVsbG8="
  raises on parse "!!binary [1]"
  raises on parse "!!binary [1]"
  raises on parse "!!binary 1"
  raises on parse "!!binary 1"
  parses "!!bool yes"
  parses "!!bool yes"
  raises on parse "!!bool 1"
  raises on parse "!!bool 1"
  parses "!!float '1.2'"
  parses "!!float '1.2'"
  parses "!!float '0.5'"
  parses "!!float '0.5'"
  parses "!!float '1_234.2'"
  parses "!!float '1_234.2'"
  parses "!!float -1"
  parses "!!float -1"
  parses "!!float 0"
  parses "!!float 0"
  parses "!!float 2.3e4"
  parses "!!float 2.3e4"
  parses !!float .nan
  parses !!float .nan
  parses "!!float .inf"
  parses "!!float .inf"
  raises on parse "!!float 'hello'"
  raises on parse "!!float 'hello'"
  parses "!!int 0"
  parses "!!int 0"
  parses "!!int 123"
  parses "!!int 123"
  parses "!!int 0b10"
  parses "!!int 0b10"
  parses "!!int 0o123"
  parses "!!int 0o123"
  parses "!!int 0755"
  parses "!!int 0755"
  parses "!!int 0xabc"
  parses "!!int 0xabc"
  parses "!!int -123"
  parses "!!int -123"
  raises on parse "!!int 'hello'"
  raises on parse "!!int 'hello'"
  parses "!!null ~"
  parses "!!null ~"
  raises on parse "!!null 1"
  raises on parse "!!null 1"
  parses "!!str 1"
  parses "!!str 1"
  raises on parse "!!str [1]"
  raises on parse "!!str [1]"
  parses "!!timestamp 2010-01-02"
  parses "!!timestamp 2010-01-02"
  raises on parse "!!timestamp foo"
  raises on parse "!!timestamp foo"
  .parse_null_or
  .parse_null_or
YAML::Schema::FailSafe
  parses "123"
  parses "123"
  parses "\n    context:\n        replace_me: \"Yes please!\"\n  "
  parses "\n    context:\n        replace_me: \"Yes please!\"\n  "
  parses "\n    first:\n      document:\n\n    second:\n      document:\n  "
  parses "\n    first:\n      document:\n\n    second:\n      document:\n  "
  raises on parse "\n    this: \"gives\"\n      an: \"error\"\n  "
  raises on parse "\n    this: \"gives\"\n      an: \"error\"\n  "
  raises on parse ":"
  raises on parse ":"
  parses "321"
  parses "321"
  parses all "\n    context:\n        replace_me: \"Yes please!\"\n  "
  parses all "\n    context:\n        replace_me: \"Yes please!\"\n  "
  parses all "\n    foo:\n      bar: 123\n\n    bar:\n      foo: 321\n  "
  parses all "\n    foo:\n      bar: 123\n\n    bar:\n      foo: 321\n  "
  raises on parse all "\n    this: \"raises\"\n      an: \"yaml\"\n        parse: \"exception\"\n  "
  raises on parse all "\n    this: \"raises\"\n      an: \"yaml\"\n        parse: \"exception\"\n  "
  raises on parse all ":"
  raises on parse all ":"

Pending:
  Math Functions for computing quotient and remainder
  Number #round edge cases
  Path #drive assert
  Path #expand converts a pathname to an absolute pathname, using a complete path assert
  Spec matchers pending block is not compiled pending has block with valid syntax, but invalid semantics
  String #reverse converts invalid code units to replacement char
  URI .parse unescaped @ in user/password should not confuse host
  OpenSSL::SSL::Context ciphers uses intermediate default ciphers
  OpenSSL::X509::Certificate #digest
  TCPServer settings
  UDPSocket #connect with a IPv6 address
  UDPSocket using IPv4 joins and transmits to multicast groups
  UDPSocket using IPv6 joins and transmits to multicast groups

Failures:

  1) TCPServer .new address resolution raises when host doesn't exist
     Failure/Error: err.os_error.should eq({% if flag?(:win32) %}WinError::WSAHOST_NOT_FOUND{% else %}Errno.new(LibC::EAI_NONAME){% end %})

       Expected: -2
            got: -5

     # spec/std/socket/tcp_server_spec.cr:91

  2) TCPServer .new address resolution raises (rather than segfault on darwin) when host doesn't exist and port is 0
     Failure/Error: err.os_error.should eq({% if flag?(:win32) %}WinError::WSAHOST_NOT_FOUND{% else %}Errno.new(LibC::EAI_NONAME){% end %})

       Expected: -2
            got: -5

     # spec/std/socket/tcp_server_spec.cr:98

  3) TCPSocket #connect address resolution raises when host doesn't exist
     Failure/Error: error.os_error.should eq({% if flag?(:win32) %}WinError::WSAHOST_NOT_FOUND{% else %}Errno.new(LibC::EAI_NONAME){% end %})

       Expected: -2
            got: -5

     # spec/std/socket/tcp_socket_spec.cr:70

  4) TCPSocket #connect address resolution raises (rather than segfault on darwin) when host doesn't exist and port is 0
     Failure/Error: error.os_error.should eq({% if flag?(:win32) %}WinError::WSAHOST_NOT_FOUND{% else %}Errno.new(LibC::EAI_NONAME){% end %})

       Expected: -2
            got: -5

     # spec/std/socket/tcp_socket_spec.cr:77

Finished in 51.92 seconds
14802 examples, 4 failures, 0 errors, 13 pending

Failed examples:

crystal spec spec/std/socket/tcp_server_spec.cr:87 # TCPServer .new address resolution raises when host doesn't exist
crystal spec spec/std/socket/tcp_server_spec.cr:94 # TCPServer .new address resolution raises (rather than segfault on darwin) when host doesn't exist and port is 0
crystal spec spec/std/socket/tcp_socket_spec.cr:66 # TCPSocket #connect address resolution raises when host doesn't exist
crystal spec spec/std/socket/tcp_socket_spec.cr:73 # TCPSocket #connect address resolution raises (rather than segfault on darwin) when host doesn't exist and port is 0
make[2]: *** [Makefile:88: std_spec] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [debian/rules:54: override_dh_auto_test] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:22: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

#1137045#12
Date:
2026-05-23 14:31:32 UTC
From:
To:
notfixed 1137045 1.14.0+dfsg-1
thanks

Note: A similar failure happens when building the package in unstable
using the old schroot backend (which was the default in bookworm).

Given that this usually happens when the package attempts to use
Internet during build, which is considered RC, I'm marking
this bug as not really fixed in the unstable version.

Thanks.

#1137045#19
Date:
2026-05-23 15:10:51 UTC
From:
To:
retitle 1137045 crystal: Tries to access Internet during build
thanks

Hi. One of the tests tries to resolve "doesnotexist.example.org", which
is a DNS resolution and therefore does count as Internet access.

Thanks.

#1137045#26
Date:
2026-05-23 16:24:55 UTC
From:
To:
tags 1137045 patch
thanks

Hello. It seems that the package itself already has a framework to
skip network tests.

The attached patch works for me.

Try building the package with sbuild using the old schroot backend,
with and without the patch, to see the difference.

Thanks.

#1137045#35
Date:
2026-08-18 09:43:03 UTC
From:
To:
Hi,

I gave Santiago's patch a try on crystal 1.18.2+dfsg-1, and it works for
me.

I could not use schroot on this machine, so I tested it with sbuild's
unshare backend, with networking disabled. The full build completed
successfully:

  compiler_spec:   13306 examples, 0 failures, 0 errors, 18 pending
  std_spec:        17491 examples, 0 failures, 0 errors, 28 pending
  primitives_spec:   717 examples, 0 failures, 0 errors, 0 pending

For comparison, the unpatched std_spec ran 17563 examples, with 33
pending. The difference is exactly 72 examples and 5 pending examples,
matching all the examples tagged "network" in the five socket spec
files. The compiler and primitives counts did not change.

One slightly confusing detail is that the unpatched build also passed
with the unshare backend. This is because the resolver error from its
isolated network namespace is accepted by the current tests. To check
the actual network activity, I also ran those five socket spec files
under strace in a network-enabled environment. Without the filter,
strace recorded five connect(2) calls to DNS port 53 (15 system calls
involving port 53 in total). With "--tag '~network'", no examples were
selected and strace recorded no DNS or connect calls.

So the patch appears to do exactly what we want: it skips only the 72
network-tagged examples, and the rest of the test suite still passes.

As of today, crystal 1.18.2+dfsg-1 and its reverse dependency shards are
still scheduled for autoremoval from testing on 22 August because of
this bug. Could you please apply the patch and upload a fixed version
before then?

#1137045#40
Date:
2026-08-18 21:23:51 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
crystal, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1137045@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
David Suárez <deiv@debian.org> (supplier of updated crystal package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 18 Aug 2026 22:47:38 +0200
Source: crystal
Architecture: source
Version: 1.21.0+dfsg-1
Distribution: unstable
Urgency: medium
Maintainer: David Suárez <deiv@debian.org>
Changed-By: David Suárez <deiv@debian.org>
Closes: 1124047 1137045
Changes:
 crystal (1.21.0+dfsg-1) unstable; urgency=medium
 .
   * New upstream version.
   * Build with LLVM 21 (Closes: #1124047).
   * Update disable-udp-multicast-specs patch to disable
       internet facing specs (Closes: #1137045).
   * Update standards version; no changes needed.
   * Align manpages with new manuals.
Checksums-Sha1:
 0d7582c69c34c4fda1cc0624c3837201ecfb3865 2205 crystal_1.21.0+dfsg-1.dsc
 8493036d23fcd57991200f7ea8def2691f6beefb 2775524 crystal_1.21.0+dfsg.orig.tar.xz
 9e4801101a0899319a640638390930933b48320d 67396 crystal_1.21.0+dfsg-1.debian.tar.xz
 bdf8a3c3b45be384cc7cc78e6ca1457c038d1e0c 9482 crystal_1.21.0+dfsg-1_amd64.buildinfo
Checksums-Sha256:
 94be3230533a53f23b7687b14168f4497a7fe1c80c99a2c5662fa24bf370b30b 2205 crystal_1.21.0+dfsg-1.dsc
 349a3730969fae09ebfbd64f63c99a275757bfd2880071cf58e8f657230722d2 2775524 crystal_1.21.0+dfsg.orig.tar.xz
 0729aa666ce7bc2b28a9e0a914cec3f4a40d0de6270c754478717d466176bc15 67396 crystal_1.21.0+dfsg-1.debian.tar.xz
 d0a3ef1cfb5240768eb529c48a2a30682fcdfc59a3ecb2487a01473e254fbc90 9482 crystal_1.21.0+dfsg-1_amd64.buildinfo
Files:
 2a417546fd193a4bb044a72378857f70 2205 devel optional crystal_1.21.0+dfsg-1.dsc
 0fff7d394da3974bddd9836c0120699a 2775524 devel optional crystal_1.21.0+dfsg.orig.tar.xz
 f4145d543cfbf272062aac8dbf1792be 67396 devel optional crystal_1.21.0+dfsg-1.debian.tar.xz
 bedabb7c13501c8b3389a77c50b927ef 9482 devel optional crystal_1.21.0+dfsg-1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJEBAEBCgAuFiEExFAZYDOyRoLv5EydfLboPYYFQjoFAmqEx1kQHGRlaXZAZGVi
aWFuLm9yZwAKCRB8tug9hgVCOh4gEACWEMjM/FAZzQxnKA2yvDqdd8M+wcgyjYpP
iKkyIBS0vosmiPnyB6FUj7B1PeUPKjymvZ04fkASYddtinjBEUnNGR4BDcmFeTf7
3khc6xJMtOS4H6vhe3wBbyAgpCzQzdhpbwnrgUd9eVu8WcA3so+g0a0IpNJvYLgf
md1AAejEloByjSxVWpMBjFsZHVCsKR1T4dZREIz4G+rTYAFG9VP+EsgA9lnEDBM2
k9ebagy+mZvdD8NG1txjhBNUneECb5Gx7Ri9TowjklOCuZsp4v0QHWGNMOQhBEU9
jF7tdnSxxKZgaoZ3LUexKeYqKuQ8np1crZOWMTqBx7j+fyhkNxXUMF4S0hoj7rRT
6z5MDGQxULwsN+MM5OTVxsMHIz5JfbIZDg01NXxvDoc9Off6Y65GwhGJA6MDlOPF
vnqOgFu0/2phR3jyJuTKIawYhYJ/CL8tKrqecDEynPUoY43J7intYBI4OumXt6bk
XIeTNBvSXRxlrctSev6DNZUCEtnnFw3fwdYUBXsdUrltNjbE8QrprjSGp3qqj3Rz
gSg31ARAtRQ7tpOSW4tGAiLT3EwEepZ5T34f6YRNqlnj3ihiVt2U5qzMHmsQ9VTx
cyHfmaauA9I1Nv4JvmrXrhRs/MDVIVFcsE8M+wHZyl9sZ0gHqKlEzoIi8sGOpIab
FWtz9srA9w==
=XepE
-----END PGP SIGNATURE-----