odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.59k stars 575 forks source link

Odin fails with exit code 1 with -debug -use-separate-modules #2664

Open Hyp-X opened 1 year ago

Hyp-X commented 1 year ago

Context

Odin: dev-2023-07:b14823c1 OS: Windows 10 Professional (version: 22H2), build 19045.3208 CPU: 12th Gen Intel(R) Core(TM) i5-12500H RAM: 32472 MiB

and

Odin: dev-2023-07:b14823c1 OS: Windows 11 Professional (version: 22H2), build 22622.575 CPU: AMD Ryzen 5 5600X 6-Core Processor RAM: 32689 MiB

Behavior

odin build . -debug -use-separate-modules Exits with exit code 1 (Need a shell that shows this, but you can tell that the executable is not built)

Removing either -debug or -use-separate-modules results in a successful build.

The example is set up to be directly usable from vscode, but it is not required for the repro.

HelloOdin.zip

laytan commented 1 year ago

Same for me, I do get some output, for a bunch (all?) of the symbols: warning: (arm64) could not find object file symbol for symbol _main.foo

    Odin: dev-2023-07-nightly:1b365712
    OS:   macOS Unknown (build: 22A400, kernel: 22.1.0)
    CPU:  ARM64
    RAM:  8192 MiB
zen3ger commented 5 days ago

This seems to be solved, or at least on Linux it compiles after fixing a bug in Hello.odin

--- a/Hello.odin
+++ b/Hello.odin
@@ -10,7 +10,7 @@ Scene :: struct
        name : string,
 }

-sceneHeap: objheap.ObjectHeap(Scene, 64)
+sceneHeap: objheap.ObjectHeap(Scene)

odin report:

    Odin:    dev-2024-09:244a4acfa
    OS:      openSUSE Tumbleweed, Linux 6.10.7-1-default
    CPU:     AMD Ryzen 9 5900X 12-Core Processor            
    RAM:     31999 MiB
    Backend: LLVM 18.1.8