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

Clang linker error on macOS 15.1.1 with Odin version dev-2025-03 #4922

Closed
SchoolyB opened this issue Mar 10, 2025 · 4 comments
Closed

Clang linker error on macOS 15.1.1 with Odin version dev-2025-03 #4922

SchoolyB opened this issue Mar 10, 2025 · 4 comments

Comments

@SchoolyB
Copy link

Context

Today I updated to Odin version dev-2025-03 Previously was using dev dev-2024-11. Now I am getting thrown an error that I've never seen before and am unable to use the odin build command and thus cannot compile/run my program.

Operating System & Odin Version:

        Odin:    dev-2025-03:a91d528af
	OS:      macOS Sequoia 15.1.1 (build 24B91, kernel 24.1.0)
	CPU:     Apple M2
	RAM:     16384 MiB
	Backend: LLVM 18.1.8

Expected Behavior

Program should compile

Current Behavior

Currently when using odin build the terminal throws this error:

Undefined symbols for architecture arm64:
  "___$objc_SEL$init", referenced from:
      _objc_Foundation::AutoreleasePool_init in mainmain-objc_Foundation-11d17ad20.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Pull odin version dev-2025-03
  2. run ./build_odin.sh to build new odin version
  3. Navigate to my projects root dir
  4. run odin build main
    5: Get clang error thrown

Failure Logs

Please include any relevant log snippets or files here.

Image
@samuelgozi
Copy link
Contributor

A minimal reproducible program:

package main

import ns "core:sys/darwin/Foundation"

main :: proc() {
	menu := ns.Menu.alloc()->init()
}

@hasenj
Copy link
Contributor

hasenj commented Mar 21, 2025

For anyone coming from Google and looking for a fix, gingerBill mentioned on Discord and I verified on my machine, passing -use-single-module to the build command makes it work.

@SchoolyB
Copy link
Author

For anyone coming from Google and looking for a fix, gingerBill mentioned on Discord and I verified on my machine, passing -use-single-module to the build command makes it work.

Curious if this is a temp or permanent fix. I downgraded back to dev 2024-11 for now.

@laytan laytan closed this as completed in f85db01 Mar 21, 2025
@samuelgozi
Copy link
Contributor

For anyone coming from Google and looking for a fix, gingerBill mentioned on Discord and I verified on my machine, passing -use-single-module to the build command makes it work.

Curious if this is a temp or permanent fix. I downgraded back to dev 2024-11 for now.

In the discord in the discord server he mentioned that it's not really a fix, but rather a work around until fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants