Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Compiler Bug #7070

Open
dustinws opened this issue Sep 10, 2024 · 6 comments
Open

Internal Compiler Bug #7070

dustinws opened this issue Sep 10, 2024 · 6 comments
Labels
bug Something isn't working linking

Comments

@dustinws
Copy link

Hello!

Today the compiler informed me that it encountered an internal compiler bug. I was just looking at the help output from roc --help and noticed the --dev flag. I tried to use it without any arguments, and then the crash happened.

I don't know if this is a bug, or just misuse.

Example

main.roc

app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.15.0/SlwdbJ-3GR7uBWQo6zlmYWNYOxnvo8r6YABXD-45UOw.tar.br" }

import pf.Stdout

main =
    Stdout.line! "hello world!"

Then run roc --dev

The output is

An internal compiler expectation was broken.
This is definitely a compiler bug.
Please file an issue here: https://github.com/roc-lang/roc/issues/new/choose
Undefined Symbol in relocation, (+a0, Relocation { kind: PltRelative, encoding: Generic, size: +20, target: Symbol(SymbolIndex(+5c)), addend: +fffffffffffffffc, implicit_addend: false }): Ok(Symbol { name: "roc_builtins.str.equal", address: +0, size: +0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Elf { st_info: +10, st_other: +2 } })
Location: crates/linker/src/elf.rs:1452:25

@dustinws
Copy link
Author

Output of roc version

roc nightly pre-release, built from commit 9a4d556 on Mo 09 Sep 2024 09:01:53 UTC

@lukewilliamboswell lukewilliamboswell added bug Something isn't working linking labels Sep 10, 2024
@lukewilliamboswell
Copy link
Collaborator

@dustinws can you confirm what os and arch you are running on, also did you use any linker flags --linker=legacy etc?

I'm just wanting to categorise this correctly and this information will be helpful for use in future.

@Anton-4
Copy link
Collaborator

Anton-4 commented Sep 11, 2024

This also happens on linux (NixOS): roc --dev examples/helloWorld.roc.

I recommend using roc dev instead @dustinws

@Anton-4
Copy link
Collaborator

Anton-4 commented Sep 11, 2024

  • add a test after we fix this

@dustinws
Copy link
Author

@lukewilliamboswell
My OS: Arch Linux 6.10.9-arch1-2

I did not use any flags related to the linker. This happened in the first couple of minutes of installing the nightly release and it was one of the first things I did after roc dev and roc build.

@Anton-4
For sure, I'll use roc dev. I just saw the option and was curious.

@dustinws
Copy link
Author

@lukewilliamboswell
Arch is x86_64, I didn't see that earlier in your comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linking
Projects
None yet
Development

No branches or pull requests

3 participants