Coder Social home page Coder Social logo

Comments (12)

lights0123 avatar lights0123 commented on June 17, 2024

rustc --version? I know that nightly-2020-07-27 works on Linux at least, and you need at least nightly-2020-07-24 (or maybe -23?) for it to build. I'm not running any nightly later than nightly-2020-07-27 yet, as rustfmt isn't available for it.

from avr-hal.

Gregoor avatar Gregoor commented on June 17, 2024

Huh! I was running on 2020-07-25, a rustup update nightly gave me 2020-07-26 which didn't fix it yet. I guess I'll try another update tomorrow or will install it without rustup!

from avr-hal.

lights0123 avatar lights0123 commented on June 17, 2024

And you've pulled this repository since this commit 5 days ago, right?

from avr-hal.

Gregoor avatar Gregoor commented on June 17, 2024

Yup, I'm on c8bde5f

from avr-hal.

Rahix avatar Rahix commented on June 17, 2024

Huh, never seen that one before ... Looks strange to say the least. On first glance I'd say you are compiling for the wrong target but that doesn't seem to be the case ... Things to come to mind:

  • Paste the log from cargo build --verbose --examples, maybe there's a hint hidden somewhere ...
  • You can check whether .cargo/config.toml in boards/arduino-uno exists and has the contents shown here on GitHub.
  • Do you have a proper version of avr-gcc, avr-binutils, and avr-libc installed? Can you also show what versions?
  • Run cargo update in case you are pulling in an old dependency in some weird way.
    • Or go nuclear and remove any Cargo.lock + target/ directory + possibly sccache directory (if you're using that).

from avr-hal.

Gregoor avatar Gregoor commented on June 17, 2024

I'm not sure if I have avr-binutils installed but the rest I've got from WINAVR which is.. adjusts glasses ... from 2010:

$ avr-gcc  --version
avr-gcc.exe (WinAVR 20100110) 4.3.3

$ avr-cpp.exe --version
avr-cpp.exe (WinAVR 20100110) 4.3.3
Here's the cargo build
$ cargo build --verbose --examples
       Fresh unicode-xid v0.2.1
       Fresh semver-parser v0.7.0
       Fresh proc-macro-hack v0.5.18
       Fresh nb v1.0.0
       Fresh void v1.0.2
       Fresh ufmt-write v0.1.0 (https://github.com/Rahix/ufmt.git?rev=12225dc1678e42fecb0e8635bf80f501e24817d9#12225dc1)       Fresh cfg-if v0.1.10
       Fresh vcell v0.1.2
       Fresh panic-halt v0.2.0
       Fresh semver v0.9.0
       Fresh nb v0.1.3
       Fresh paste-impl v0.1.18
       Fresh proc-macro2 v1.0.19
       Fresh rustc_version v0.2.3
       Fresh embedded-hal v0.2.4
       Fresh quote v1.0.7
       Fresh paste v0.1.18
       Fresh syn v1.0.36
       Fresh bare-metal v0.2.5
       Fresh ufmt-macros v0.1.1 (https://github.com/Rahix/ufmt.git?rev=12225dc1678e42fecb0e8635bf80f501e24817d9#12225dc1)
       Fresh avr-device-macros v0.1.0
       Fresh ufmt v0.1.0 (https://github.com/Rahix/ufmt.git?rev=12225dc1678e42fecb0e8635bf80f501e24817d9#12225dc1)
       Fresh avr-device v0.1.0
       Fresh avr-hal-generic v0.1.0 (C:\Users\grego\code\avr-hal\avr-hal-generic)
       Fresh atmega32u4-hal v0.1.0 (C:\Users\grego\code\avr-hal\chips\atmega32u4-hal)
       Fresh atmega328p-hal v0.1.0 (C:\Users\grego\code\avr-hal\chips\atmega328p-hal)
       Fresh atmega1280-hal v0.1.0 (C:\Users\grego\code\avr-hal\chips\atmega1280-hal)
       Fresh attiny85-hal v0.1.0 (C:\Users\grego\code\avr-hal\chips\attiny85-hal)
   Compiling arduino-leonardo v0.1.0 (C:\Users\grego\code\avr-hal\boards\arduino-leonardo)
   Compiling bigavr6 v0.1.0 (C:\Users\grego\code\avr-hal\boards\bigavr6)
     Running `rustc --crate-name arduino_leonardo --edition=2018 'boards\arduino-leonardo\src\lib.rs' --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=s -C panic=abort -Clinker-plugin-lto -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="rt"' -C metadata=743d4ac3215ce35d -C extra-filename=-743d4ac3215ce35d --out-dir 'C:\Users\grego\code\avr-hal\target\debug\deps' -C 'incremental=C:\Users\grego\code\avr-hal\target\debug\incremental' -L 'dependency=C:\Users\grego\code\avr-hal\target\debug\deps' --extern 'atmega32u4_hal=C:\Users\grego\code\avr-hal\target\debug\deps\libatmega32u4_hal-05ec469b8608b567.rmeta' --extern 'avr_hal_generic=C:\Users\grego\code\avr-hal\target\debug\deps\libavr_hal_generic-3e975191fba3f363.rmeta'`
   Compiling trinket v0.1.0 (C:\Users\grego\code\avr-hal\boards\trinket)
   Compiling arduino-uno v0.1.0 (C:\Users\grego\code\avr-hal\boards\arduino-uno)
     Running `rustc --crate-name bigavr6 --edition=2018 'boards\bigavr6\src\lib.rs' --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=s -C panic=abort -Clinker-plugin-lto -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="rt"' -C metadata=eb7bd84a0ba7a8a1 -C extra-filename=-eb7bd84a0ba7a8a1 --out-dir 'C:\Users\grego\code\avr-hal\target\debug\deps' -C 'incremental=C:\Users\grego\code\avr-hal\target\debug\incremental' -L 'dependency=C:\Users\grego\code\avr-hal\target\debug\deps' --extern 'atmega1280_hal=C:\Users\grego\code\avr-hal\target\debug\deps\libatmega1280_hal-f37c77eb46e01ad6.rmeta' --extern 'avr_hal_generic=C:\Users\grego\code\avr-hal\target\debug\deps\libavr_hal_generic-3e975191fba3f363.rmeta'`
     Running `rustc --crate-name trinket --edition=2018 'boards\trinket\src\lib.rs' --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=s -C panic=abort -Clinker-plugin-lto -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="rt"' -C metadata=c5b5d45392ab0113 -C extra-filename=-c5b5d45392ab0113 --out-dir 'C:\Users\grego\code\avr-hal\target\debug\deps' -C 'incremental=C:\Users\grego\code\avr-hal\target\debug\incremental' -L 'dependency=C:\Users\grego\code\avr-hal\target\debug\deps' --extern 'attiny85_hal=C:\Users\grego\code\avr-hal\target\debug\deps\libattiny85_hal-55c9383553d9b936.rmeta' --extern 'avr_hal_generic=C:\Users\grego\code\avr-hal\target\debug\deps\libavr_hal_generic-3e975191fba3f363.rmeta'`
     Running `rustc --crate-name uno_serial --edition=2018 'boards\arduino-uno\examples\uno-serial.rs' --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=s -C panic=abort -C lto -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="rt"' -C metadata=07d5d3dddbf556c2 --out-dir 'C:\Users\grego\code\avr-hal\target\debug\examples' -C 'incremental=C:\Users\grego\code\avr-hal\target\debug\incremental' -L 'dependency=C:\Users\grego\code\avr-hal\target\debug\deps' --extern 'arduino_uno=C:\Users\grego\code\avr-hal\target\debug\deps\libarduino_uno-61bbfb7e45f58e23.rlib' --extern 'atmega328p_hal=C:\Users\grego\code\avr-hal\target\debug\deps\libatmega328p_hal-31882f687be1c3d2.rlib' --extern 'avr_hal_generic=C:\Users\grego\code\avr-hal\target\debug\deps\libavr_hal_generic-3e975191fba3f363.rlib' --extern 'nb=C:\Users\grego\code\avr-hal\target\debug\deps\libnb-b1a0beafcc543e3f.rlib' --extern 'panic_halt=C:\Users\grego\code\avr-hal\target\debug\deps\libpanic_halt-c0afcf08f7f0945b.rlib' --extern 'ufmt=C:\Users\grego\code\avr-hal\target\debug\deps\libufmt-e483cb9389bfb2cd.rlib'`
     Running `rustc --crate-name uno_panic --edition=2018 'boards\arduino-uno\examples\uno-panic.rs' --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=s -C panic=abort -C lto -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="rt"' -C metadata=07d5d3dddbf556c2 --out-dir 'C:\Users\grego\code\avr-hal\target\debug\examples' -C 'incremental=C:\Users\grego\code\avr-hal\target\debug\incremental' -L 'dependency=C:\Users\grego\code\avr-hal\target\debug\deps' --extern 'arduino_uno=C:\Users\grego\code\avr-hal\target\debug\deps\libarduino_uno-61bbfb7e45f58e23.rlib' --extern 'atmega328p_hal=C:\Users\grego\code\avr-hal\target\debug\deps\libatmega328p_hal-31882f687be1c3d2.rlib' --extern 'avr_hal_generic=C:\Users\grego\code\avr-hal\target\debug\deps\libavr_hal_generic-3e975191fba3f363.rlib' --extern 'nb=C:\Users\grego\code\avr-hal\target\debug\deps\libnb-b1a0beafcc543e3f.rlib' --extern 'panic_halt=C:\Users\grego\code\avr-hal\target\debug\deps\libpanic_halt-c0afcf08f7f0945b.rlib' --extern 'ufmt=C:\Users\grego\code\avr-hal\target\debug\deps\libufmt-e483cb9389bfb2cd.rlib'`
     Running `rustc --crate-name uno_adc --edition=2018 'boards\arduino-uno\examples\uno-adc.rs' --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=s -C panic=abort -C lto -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="rt"' -C metadata=07d5d3dddbf556c2 --out-dir 'C:\Users\grego\code\avr-hal\target\debug\examples' -C 'incremental=C:\Users\grego\code\avr-hal\target\debug\incremental' -L 'dependency=C:\Users\grego\code\avr-hal\target\debug\deps' --extern 'arduino_uno=C:\Users\grego\code\avr-hal\target\debug\deps\libarduino_uno-61bbfb7e45f58e23.rlib' --extern 'atmega328p_hal=C:\Users\grego\code\avr-hal\target\debug\deps\libatmega328p_hal-31882f687be1c3d2.rlib' --extern 'avr_hal_generic=C:\Users\grego\code\avr-hal\target\debug\deps\libavr_hal_generic-3e975191fba3f363.rlib' --extern 'nb=C:\Users\grego\code\avr-hal\target\debug\deps\libnb-b1a0beafcc543e3f.rlib' --extern 'panic_halt=C:\Users\grego\code\avr-hal\target\debug\deps\libpanic_halt-c0afcf08f7f0945b.rlib' --extern 'ufmt=C:\Users\grego\code\avr-hal\target\debug\deps\libufmt-e483cb9389bfb2cd.rlib'`
     Running `rustc --crate-name uno_i2cdetect --edition=2018 'boards\arduino-uno\examples\uno-i2cdetect.rs' --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=s -C panic=abort -C lto -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="rt"' -C metadata=07d5d3dddbf556c2 --out-dir 'C:\Users\grego\code\avr-hal\target\debug\examples' -C 'incremental=C:\Users\grego\code\avr-hal\target\debug\incremental' -L 'dependency=C:\Users\grego\code\avr-hal\target\debug\deps' --extern 'arduino_uno=C:\Users\grego\code\avr-hal\target\debug\deps\libarduino_uno-61bbfb7e45f58e23.rlib' --extern 'atmega328p_hal=C:\Users\grego\code\avr-hal\target\debug\deps\libatmega328p_hal-31882f687be1c3d2.rlib' --extern 'avr_hal_generic=C:\Users\grego\code\avr-hal\target\debug\deps\libavr_hal_generic-3e975191fba3f363.rlib' --extern 'nb=C:\Users\grego\code\avr-hal\target\debug\deps\libnb-b1a0beafcc543e3f.rlib' --extern 'panic_halt=C:\Users\grego\code\avr-hal\target\debug\deps\libpanic_halt-c0afcf08f7f0945b.rlib' --extern 'ufmt=C:\Users\grego\code\avr-hal\target\debug\deps\libufmt-e483cb9389bfb2cd.rlib'`
     Running `rustc --crate-name uno_blink --edition=2018 'boards\arduino-uno\examples\uno-blink.rs' --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=s -C panic=abort -C lto -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="rt"' -C metadata=07d5d3dddbf556c2 --out-dir 'C:\Users\grego\code\avr-hal\target\debug\examples' -C 'incremental=C:\Users\grego\code\avr-hal\target\debug\incremental' -L 'dependency=C:\Users\grego\code\avr-hal\target\debug\deps' --extern 'arduino_uno=C:\Users\grego\code\avr-hal\target\debug\deps\libarduino_uno-61bbfb7e45f58e23.rlib' --extern 'atmega328p_hal=C:\Users\grego\code\avr-hal\target\debug\deps\libatmega328p_hal-31882f687be1c3d2.rlib' --extern 'avr_hal_generic=C:\Users\grego\code\avr-hal\target\debug\deps\libavr_hal_generic-3e975191fba3f363.rlib' --extern 'nb=C:\Users\grego\code\avr-hal\target\debug\deps\libnb-b1a0beafcc543e3f.rlib' --extern 'panic_halt=C:\Users\grego\code\avr-hal\target\debug\deps\libpanic_halt-c0afcf08f7f0945b.rlib' --extern 'ufmt=C:\Users\grego\code\avr-hal\target\debug\deps\libufmt-e483cb9389bfb2cd.rlib'`
     Running `rustc --crate-name uno_spi_feedback --edition=2018 'boards\arduino-uno\examples\uno-spi-feedback.rs' --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=s -C panic=abort -C lto -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="rt"' -C metadata=07d5d3dddbf556c2 --out-dir 'C:\Users\grego\code\avr-hal\target\debug\examples' -C 'incremental=C:\Users\grego\code\avr-hal\target\debug\incremental' -L 'dependency=C:\Users\grego\code\avr-hal\target\debug\deps' --extern 'arduino_uno=C:\Users\grego\code\avr-hal\target\debug\deps\libarduino_uno-61bbfb7e45f58e23.rlib' --extern 'atmega328p_hal=C:\Users\grego\code\avr-hal\target\debug\deps\libatmega328p_hal-31882f687be1c3d2.rlib' --extern 'avr_hal_generic=C:\Users\grego\code\avr-hal\target\debug\deps\libavr_hal_generic-3e975191fba3f363.rlib' --extern 'nb=C:\Users\grego\code\avr-hal\target\debug\deps\libnb-b1a0beafcc543e3f.rlib' --extern 'panic_halt=C:\Users\grego\code\avr-hal\target\debug\deps\libpanic_halt-c0afcf08f7f0945b.rlib' --extern 'ufmt=C:\Users\grego\code\avr-hal\target\debug\deps\libufmt-e483cb9389bfb2cd.rlib'`
     Running `rustc --crate-name bigavr6_serial --edition=2018 'boards\bigavr6\examples\bigavr6-serial.rs' --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=s -C panic=abort -C lto -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="rt"' -C metadata=d8ecbd567d98d1e2 --out-dir 'C:\Users\grego\code\avr-hal\target\debug\examples' -C 'incremental=C:\Users\grego\code\avr-hal\target\debug\incremental' -L 'dependency=C:\Users\grego\code\avr-hal\target\debug\deps' --extern 'atmega1280_hal=C:\Users\grego\code\avr-hal\target\debug\deps\libatmega1280_hal-f37c77eb46e01ad6.rlib' --extern 'avr_hal_generic=C:\Users\grego\code\avr-hal\target\debug\deps\libavr_hal_generic-3e975191fba3f363.rlib' --extern 'bigavr6=C:\Users\grego\code\avr-hal\target\debug\deps\libbigavr6-eb7bd84a0ba7a8a1.rlib' --extern 'nb=C:\Users\grego\code\avr-hal\target\debug\deps\libnb-b1a0beafcc543e3f.rlib' --extern 'panic_halt=C:\Users\grego\code\avr-hal\target\debug\deps\libpanic_halt-c0afcf08f7f0945b.rlib' --extern 'ufmt=C:\Users\grego\code\avr-hal\target\debug\deps\libufmt-e483cb9389bfb2cd.rlib'`
     Running `rustc --crate-name bigavr6_panic --edition=2018 'boards\bigavr6\examples\bigavr6-panic.rs' --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=s -C panic=abort -C lto -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="rt"' -C metadata=d8ecbd567d98d1e2 --out-dir 'C:\Users\grego\code\avr-hal\target\debug\examples' -C 'incremental=C:\Users\grego\code\avr-hal\target\debug\incremental' -L 'dependency=C:\Users\grego\code\avr-hal\target\debug\deps' --extern 'atmega1280_hal=C:\Users\grego\code\avr-hal\target\debug\deps\libatmega1280_hal-f37c77eb46e01ad6.rlib' --extern 'avr_hal_generic=C:\Users\grego\code\avr-hal\target\debug\deps\libavr_hal_generic-3e975191fba3f363.rlib' --extern 'bigavr6=C:\Users\grego\code\avr-hal\target\debug\deps\libbigavr6-eb7bd84a0ba7a8a1.rlib' --extern 'nb=C:\Users\grego\code\avr-hal\target\debug\deps\libnb-b1a0beafcc543e3f.rlib' --extern 'panic_halt=C:\Users\grego\code\avr-hal\target\debug\deps\libpanic_halt-c0afcf08f7f0945b.rlib' --extern 'ufmt=C:\Users\grego\code\avr-hal\target\debug\deps\libufmt-e483cb9389bfb2cd.rlib'`

error: unknown use of instruction mnemonic without a size suffix
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     in %al,0x35
  |     ^

error: invalid instruction mnemonic 'sei'
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     sei
  |     ^^^

error: aborting due to 2 previous errors

error: could not compile `arduino-uno`.

Caused by:
  process didn't exit successfully: `rustc --crate-name uno_blink --edition=2018 'boards\arduino-uno\examples\uno-blink.rs' --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=s -C panic=abort -C lto -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="rt"' -C metadata=07d5d3dddbf556c2 --out-dir 'C:\Users\grego\code\avr-hal\target\debug\examples' -C 'incremental=C:\Users\grego\code\avr-hal\target\debug\incremental' -L 'dependency=C:\Users\grego\code\avr-hal\target\debug\deps' --extern 'arduino_uno=C:\Users\grego\code\avr-hal\target\debug\deps\libarduino_uno-61bbfb7e45f58e23.rlib' --extern 'atmega328p_hal=C:\Users\grego\code\avr-hal\target\debug\deps\libatmega328p_hal-31882f687be1c3d2.rlib' --extern 'avr_hal_generic=C:\Users\grego\code\avr-hal\target\debug\deps\libavr_hal_generic-3e975191fba3f363.rlib' --extern 'nb=C:\Users\grego\code\avr-hal\target\debug\deps\libnb-b1a0beafcc543e3f.rlib' --extern 'panic_halt=C:\Users\grego\code\avr-hal\target\debug\deps\libpanic_halt-c0afcf08f7f0945b.rlib' --extern 'ufmt=C:\Users\grego\code\avr-hal\target\debug\deps\libufmt-e483cb9389bfb2cd.rlib'` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: unknown use of instruction mnemonic without a size suffix
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     in %al,0x35
  |     ^

error: invalid instruction mnemonic 'sei'
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     sei
  |     ^^^

error: aborting due to 2 previous errors

error: unknown use of instruction mnemonic without a size suffix
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     in %cl,0x35
  |     ^

error: invalid instruction mnemonic 'sei'
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     sei
  |     ^^^

error: unknown use of instruction mnemonic without a size suffix
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     in %al,0x35
  |     ^

error: invalid instruction mnemonic 'sei'
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     sei
  |     ^^^

error: aborting due to 2 previous errors

error: aborting due to 2 previous errors

error: unknown use of instruction mnemonic without a size suffix
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     in %al,0x35
  |     ^

error: invalid instruction mnemonic 'sei'
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     sei
  |     ^^^

error: aborting due to 2 previous errors

error: unknown use of instruction mnemonic without a size suffix
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     in %al,0x35
  |     ^

error: invalid instruction mnemonic 'sei'
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     sei
  |     ^^^

error: aborting due to 2 previous errors

error: unknown use of instruction mnemonic without a size suffix
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     in %cl,0x35
  |     ^

error: invalid instruction mnemonic 'sei'
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     sei
  |     ^^^

error: unknown use of instruction mnemonic without a size suffix
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     in %al,0x35
  |     ^

error: invalid instruction mnemonic 'sei'
  |
note: instantiated into assembly here
 --> <inline asm>:1:2
  |
1 |     sei
  |     ^^^

error: aborting due to 2 previous errors

error: aborting due to 2 previous errors

error: build failed

Oh also I realized I might've not run it from the right dir? From the uno dir I get:

grego@Dellste MSYS ~/code/avr-hal/boards/arduino-uno (master)
$ cargo +nightly build --example uno-blink
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --target '\\?\C:\Users\grego\code\avr-hal\boards\arduino-uno\avr-atmega328p.json' --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
  --- stderr
  error: Error loading target specification: SyntaxError(InvalidSyntax, 1, 1). Use `--print target-list` for a list of built-in targets

Can't say that I learned anything from that error yet. My .cargo/config.toml is the same as in master indeed.

from avr-hal.

lights0123 avatar lights0123 commented on June 17, 2024

Ok, it looks like Rust isn't picking up on the target. I wonder if that's because NTFS doesn't like the fact that avr-atmega328p.json in boards/arduino-uno is a symlink? Try replacing the file boards/arduino-uno/avr-atmega328p.json with chips/atmega328p-hal/avr-atmega328p.json (just copy it).

from avr-hal.

Gregoor avatar Gregoor commented on June 17, 2024

Oh I don't know how you got that from that but it seemed to have done the trick. Thank you for looking into it with me. Anything I can do to prevent other NTFS-people from running into it?

from avr-hal.

lights0123 avatar lights0123 commented on June 17, 2024

I figured that out because the 6th line in you last code block indicated that it had trouble reading the file, and seeing the path \\?\C:\Users\grego\code\avr-hal\boards\arduino-uno\avr-atmega328p.json made me think that maybe some weird Windows FS thing was going on.

It turns out that Windows still doesn't support symlinks by non-admin users by default, wtf! To fix this (stolen from StackOverflow):

  • Enable "Developer mode" in Windows 10
  • git config --global core.symlinks true
  • re-clone this repo, or switch to another branch and back (git checkout -b temp && git checkout master)

@Rahix, we should either document this or remove symlinks.

from avr-hal.

Rahix avatar Rahix commented on June 17, 2024

It turns out that Windows still doesn't support symlinks by non-admin users by default, wtf!

What a mess ...

@Rahix, we should either document this or remove symlinks.

Right, I'll think about it. Now that we can use .cargo/config.toml for naming the target json files, I think it would be okay to do without the symlinks. Previously this would mean additional work because you'd have to export RUSTC_TARGET_PATH and I wanted it easy with export RUSTC_TARGET_PATH=$(pwd) instead of export RUSTC_TARGET_PATH=/path/to/wherevever/the/actual/target/file/is/.

from avr-hal.

Gregoor avatar Gregoor commented on June 17, 2024

It turns out that Windows still doesn't support symlinks by non-admin users by default, wtf! To fix this (stolen from StackOverflow):

  • Enable "Developer mode" in Windows 10
  • git config --global core.symlinks true
  • re-clone this repo, or switch to another branch and back (git checkout -b temp && git checkout master)

Yup that worked too! Though a branch switch wasn't enough for me, had to re-clone. Thanks again :)

from avr-hal.

Rahix avatar Rahix commented on June 17, 2024

No more symlinks in this repository so hopefully no more build-issues on windows!

from avr-hal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.