koka-lang / koka

Koka language compiler and interpreter

Home Page:http://koka-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[homebrew] regression build only failed with macos 12 intel build

chenrui333 opened this issue Β· comments

πŸ‘‹ while trying to upgrade koka to the latest release, 3.0.1, we ran into some regression test failure as below

    Minitest::Assertion: Expected /420000/ to match "\e]4;0;?\e\\\e[6ncompile: /usr/local/Cellar/koka/3.0.1/share/koka/v3.0.1/lib/samples/basic/rbtree.kk
    loading: std/core
    loading: std/core/types
    loading: std/core/hnd
    compile: /usr/local/Cellar/koka/3.0.1/share/koka/v3.0.1/lib/std/core/hnd.kk
    check  : std/core/hnd
    compile: /usr/local/Cellar/koka/3.0.1/share/koka/v3.0.1/lib/std/core.kk
    check  : std/core
    loading: std/os/env
    loading: std/os/path
    loading: std/text/parse
    compile: /usr/local/Cellar/koka/3.0.1/share/koka/v3.0.1/lib/std/text/parse.kk
    check  : std/text/parse
    compile: /usr/local/Cellar/koka/3.0.1/share/koka/v3.0.1/lib/std/os/path.kk
    check  : std/os/path
    compile: /usr/local/Cellar/koka/3.0.1/share/koka/v3.0.1/lib/std/os/env.kk
    check  : std/os/env
    check  : samples/basic/rbtree
    linking: samples_basic_rbtree
    created: /private/tmp/.koka/v3.0.1/clang-drelease/samples_basic_rbtree
     
    failure during program run:
      
       \"/private/tmp/.koka/v3.0.1/clang-drelease/samples_basic_rbtree\" 
    
    ".

The same regression test works fine for the other environments:

    (testpath/"hellobrew.kk").write('pub fun main() println("Hello Homebrew")')
    assert_match "Hello Homebrew", shell_output("#{bin}/koka -e hellobrew.kk")
    assert_match "420000", shell_output("#{bin}/koka -O2 -e samples/basic/rbtree")

Full build log, https://github.com/Homebrew/homebrew-core/actions/runs/7546799685/job/20545498099?pr=159906
relates to Homebrew/homebrew-core#159906

Interesting. I'm not sure what would have caused this. I can confirm it works fine on MacOS 14 (Intel).

yeah, it is a bit funny, it only applies to 12 build

commented

Hmm, I don't have a macos 12 Intel build to try on .. can you try running this in the interactive prompt and see if you can see more information? Like:

$ koka
> :l samples/basic/rbtree
> main()

or maybe stack exec koka if you built it from scratch. Thanks for the heads up.
(I am guessing some header file is missing or the compiler is an older clang that does not support atomics -- although weird that it worked before...)