-
Notifications
You must be signed in to change notification settings - Fork 63
pico-blink
Build Error: Undefined symbols for architecture armv6m: "___muldi3"
#5
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
Comments
@star-light-1 |
Try using the toolchain from April 3rd, that worked for me. |
The oldest toolchain I could find in section "Trunk Development (main)" on swift.org/download is April 4, 2024, which for me produces the same error shown above.
|
I can sort-of reproduce the problem. One issue is that this part of the build script for pico-blink should not be necessary anymore, as the expectation is that the downloadable swift.org toolchain includes a valid libclang_rt.soft_static.a for the CPU arch we're building here (armv6m):
Once I drop this, I get:
The problem is that libclang_rt.soft_static.a is somehow only armv7 and contains no other slices. That will need to be fixed, but I'm not sure how that happens in the first place. The only workaround I can think of (short of actually removing the multiplication from source code, but sometimes those are really useful 😄) would be to rebuild libclang_rt from LLVM's compiler-rt from source and explicitly build the armv6m slice, and link that instead. |
@star-light-1 can I also ask which Xcode version are you using? |
This happend using Xcode 15.3 (15E204a) |
The most recent 5.10 (May 1, 2024) and 6.0 (April 30, 2024) snapshot both still produce the linker warning 5.10 fails with the undefined symbol, while 6.0 continues and produces the expected blinky.uf2 output, although not in the location that the README says it will appear. I have a pico w and it appears to reject loading it, but I need to do more testing to see if this is unrelated. |
InfoThis issue is still present, I’m experiencing this on the June-13-2024 (org.swift.59202406131a) toolchain build. I'm working on either a hanky-patch and/or a building libclang_rt.soft_static.a for armv6m (will ofc follow up with any success) QuestionIs there a suggested path or repo or chat-platform to engage contributing to or finding a longer term solution for a bug like this in the toolchain? (Also hi all 👋) |
I have a (admittedly poorly maintainable) patch that works for adding armv6m https://gist.github.com/TG-Techie/5be0cff9457bce50752c69eced81864f Or....
|
update / re: @kubamracek 's suggestion of re-buliding a slice for armv6m, Here is a version of the clang_rt I build from the main trunk of the llvm-project (753498e should be). UsageI copied the
It worked well for the blink test so far 💁♂️ Happy Hacking, |
I added what @TG-Techie said, but now i have this error:
|
@niqt , three follow ups:
|
Yeah, it was missed python dependencies... |
pico-blink
Build Errorpico-blink
Build Error: Undefined symbols for architecture armv6m: "___muldi3"
I'll use this issue to track fixing the |
Just tried the latest downloadable swift.org toolchain (swift-DEVELOPMENT-SNAPSHOT-2024-07-29-a.xctoolchain) and I no longer see this problem. I think this actually is finally resolved. |
When trying to build the
pico-blink
example on macOS with:I get the following error:
Is the
___muldi3
symbol not available on armv6m? If not, why is it being used?System information:
Toolchain ID:
Git commit of
swift-embedded-examples
:Full build log: pico-blink-build-log.txt
The text was updated successfully, but these errors were encountered: