#Execution crash on MacOS Sonoma

1 messages · Page 1 of 1 (latest)

sweet quail
#

Hi all, recently I have upgraded my MacOS installation to Sonoma on my M2 MacBook Air.
Trying to compile even a simple program results in a successfull compilation, but with a warning stating: ld: warning: ignoring duplicate libraries: '-lSystem' .
Trying to execute the resulting compiled execuitable causes the program to crash even before reaching the main.
I have tried to rebuild the compiler with the latest August release and upgrading all my brew packages, but the problem remains. Is anybody able to help me out?

upbeat thorn
#

Sure,
I get the same flag issue but no issue with program execution.

#

What compiler verison are you using?

#

Did you upgrade brew before or after? And do you maybe have a sample program that you where trying to build. Not that there is a weird call conv issue again.

undone pewter
#

it might be worth mentioning that sonoma includes a new implementation of ld called ld-prime (the old implementation was called ld64). in the stable release of xcode 15 ld-prime and ld64 aren’t available as separate binaries (as opposed to the beta release). you can switch back to ld64 by passing -ld_classic, which i’d think would fix any problems caused by the update.

in particular, the fact that you now have a warning being emitted where previously there was none feels like a very “new linker” thing. like, i can imagine the linker people at apple thinking “oh we’re making a new linker from scratch, so hey why not add a warning in here that no one thought to add before”

limber orchid
#

I have the latests installed on Sonoma running with LLVM 17. I get the warning but not issues with running compiled programs with odin

limber orchid
upbeat thorn
#

The warning is i guess just a oversight in the compiler flags that aren’t required anymore as these are defaults now. Or maybe something goofed up the extra flags.

#

But i’d not say that is the issue with crashing the execution.
Possible to launch it via LLDB via console?

limber orchid
sweet quail
# upbeat thorn What compiler verison are you using?

Sorry for the late replay, I didn’t check discord lately.
The program failed before and after upgrading the brew packages.
I tried to use the august and September versions of the compiler (both compiled form source for native arm), both failed. Tomorrow I will try with the October one and using the linker flags and changes mentioned above.
As for the code base that I’m trying to compile, even the smallest hello world program fails.

#

Also everything worked before upgrading to Sonoma. C and c++ programs work without problems, both with apple’s clang and the brew package of gcc.

limber orchid
sweet quail
#

llvm 14, installed via brew

sweet quail
#

Even with the October compiler build the program fails. Trying to mess with the linker still failed

upbeat thorn
#

Can you maybe share the llvm-ir?

#

I got no issues with the llvm 14 install on sonoma and also the 17 (with slight modifications) Both brew variants of llvm i don’t use the apple version because it’s a bit different.

sweet quail
#

This is the generated llvm ir. The original source code was

package main

import "core:fmt"

main :: proc() {
    fmt.print("Hello world!")
}

The program was compiled using odin build src -build-mode=llvm-ir -out=build/app.ir.