Zulip Chat Archive

Stream: general

Topic: executable has no output after adding import


Christian Merten (Jul 23 2025 at 23:51):

While playing around with verso, I stumbled upon the following: After importing Mathlib, an executable (called via lake exe) stopped producing output.

I did not manage to make it mathlib-free, but here is how to reproduce:

  1. lake new bar math
  2. cd bar; lake update
  3. Add one executable target to lakefile.toml:
[[lean_exe]]
name = "foo"
root = "Main"
  1. Add Main.lean with
import Mathlib.Order.PropInstances

def main := IO.println "hi"
  1. Run lake exe foo.

Output: Nothing, no error message and no "hi". If the mathlib import is removed, the expected output appears.
(One can certainly minimize further by inlining code from the imports).

Eric Wieser (Jul 23 2025 at 23:55):

What does echo $? give?

Christian Merten (Jul 23 2025 at 23:58):

139, so segmentation fault I assume?

Eric Wieser (Jul 24 2025 at 00:06):

This is already reported elsewhere

Eric Wieser (Jul 24 2025 at 00:07):

#mathlib4 > `import Mathlib.Order.PropInstances` causing segment fault @ 💬

Christian Merten (Jul 24 2025 at 00:09):

Thanks!


Last updated: Dec 20 2025 at 21:32 UTC