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:
lake new bar mathcd bar; lake update- Add one executable target to
lakefile.toml:
[[lean_exe]]
name = "foo"
root = "Main"
- Add
Main.leanwith
import Mathlib.Order.PropInstances
def main := IO.println "hi"
- 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