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

Issue Building on MAC OS - LLVM ERROR #701

Closed
EliSauder opened this issue Oct 25, 2023 · 2 comments
Closed

Issue Building on MAC OS - LLVM ERROR #701

EliSauder opened this issue Oct 25, 2023 · 2 comments

Comments

@EliSauder
Copy link

EliSauder commented Oct 25, 2023

Hello, I am new to using atsamd-rs and I am getting the following error when running cargo build:
LLVM ERROR: Global variable '__INTERRUPTS' has an invalid section specifier '.vector_table.interrupts': mach-o section specifier requires a segment and section separated by a comma.

I have looked through the existing and old issues and don't see something that talks about it and I'm wondering how I can get this working.

Command that is having issues: cargo build --release --example blinky_basic

Code: I have essentially copied the blinky-basic example from here: https://github.com/atsamd-rs/atsamd/tree/master/boards/arduino_nano33iot

Mac OS X: 14.0(23A344)
Architecture: M1

Cargo Version: 1.75.0-nightly

Rustup Show:

Default host: aarch64-apple-darwin
rustup home:  /Users/esauder/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin
beta-aarch64-apple-darwin (default)
nightly-aarch64-apple-darwin

installed targets for active toolchain
--------------------------------------

aarch64-apple-darwin
thumbv6m-none-eabi
thumbv7em-none-eabi
thumbv7em-none-eabihf
thumbv7m-none-eabi

active toolchain
----------------

nightly-aarch64-apple-darwin (directory override for '/Users/esauder/source/repos/school/uci/eecs159/arduino-test-project')
rustc 1.75.0-nightly (df871fbf0 2023-10-24)

arm-none-eabi-gcc version: 12.3.Rel1 (Build arm-12.35)) 12.3.1 20230626

bossac version: 1.7.0

arduino-cli version: 0.32.2 Commit: 963c1a76 Date: 2023-09-11T09:50:44Z

arduino:samd version: 1.8.13

@EliSauder EliSauder changed the title Issue Building on MAC OS Issue Building on MAC OS - LLVM ERROR Oct 25, 2023
@EliSauder
Copy link
Author

I've done some further digging and found that the following happens.

  1. Running ./build-all.py from the root of the repo successfully builds all the examples
  2. Running cargo build --release --example blinky_basic within the example folder inside of the repository (after running ./build-all.py) also works.
  3. Running cargo build --release --example blinky_basic within the example folder inside of the repository (without running ./build-all.py) also works.
  4. Building the example outside of the repository (copy all the files and folders into a different folder not in the branch of the directory structure) does not work and results in the same error.

Error: LLVM ERROR: Global variable '__INTERRUPTS' has an invalid section specifier '.vector_table.interrupts': mach-o section specifier requires a segment and section separated by a comma.

@EliSauder
Copy link
Author

Ohp, I'm dumb. I wasn't properly specifying the target. After running cargo build with --target it worked.

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

1 participant