mozilla-sensorweb / sensorweb-firmware

Contains all code that runs on the SensorWeb device
Mozilla Public License 2.0
4 stars 3 forks source link

Error: print macros already defined #32

Closed tdz closed 7 years ago

tdz commented 7 years ago

Running ./build.sh, I got the following error today:

error[E0428]: a macro named print has already been defined in this module error[E0428]: a macro named println has already been defined in this module error: aborting due to 2 previous errors error: Could not compile sensorweb-firmware.

Caused by: process didn't exit successfully: rustc src/main.rs --crate-name sensorweb_firmware --crate-type bin -C panic=abort -g -C metadata=53109325ec47cbb2 -C extra-filename=-53109325ec47cbb2 --out-dir /home/mozilla/Projects/mozilla/src/sensorweb/sensorweb-firmware/target/thumbv7em-none-eabi/debug/deps --emit=dep-info,link --target thumbv7em-none-eabi -L dependency=/home/mozilla/Projects/mozilla/src/sensorweb/sensorweb-firmware/target/thumbv7em-none-eabi/debug/deps --extern sensorweb_sys=/home/mozilla/Projects/mozilla/src/sensorweb/sensorweb-firmware/target/thumbv7em-none-eabi/debug/deps/libsensorweb_sys-6ac3dbe2f33149e3.rlib --extern freertos_rs=/home/mozilla/Projects/mozilla/src/sensorweb/sensorweb-firmware/target/thumbv7em-none-eabi/debug/deps/libfreertos_rs-9355b9a390b957e8.rlib --extern freertos_alloc=/home/mozilla/Projects/mozilla/src/sensorweb/sensorweb-firmware/target/thumbv7em-none-eabi/debug/deps/libfreertos_alloc-3c2f95d37e0c1ef2.rlib --extern cc3200=/home/mozilla/Projects/mozilla/src/sensorweb/sensorweb-firmware/target/thumbv7em-none-eabi/debug/deps/libcc3200-eca4f5ced93a1632.rlib -C link-arg=-Tlayout.ld -C link-arg=-nostartfiles -C link-arg=-Wl,-Map=firmware.map --sysroot /home/mozilla/.xargo -L native=/home/mozilla/Projects/mozilla/src/sensorweb/sensorweb-firmware/target/thumbv7em-none-eabi/debug/build/sensorweb-sys-44bf968803a0cff5/out -L native=/home/mozilla/Projects/mozilla/src/sensorweb/sensorweb-firmware/target/thumbv7em-none-eabi/debug/build/freertos_alloc-7c43e7bce82a38b5/out -L native=/usr/lib/gcc/arm-none-eabi/5.2.0/../../../../arm-none-eabi/lib/armv7e-m -L native=/usr/lib/gcc/arm-none-eabi/5.2.0/armv7e-m -L native=/home/mozilla/Projects/mozilla/src/sensorweb/sensorweb-firmware/target/thumbv7em-none-eabi/debug/build/cc3200-sys-60022d3b4ada1ff5/out (exit code: 101)

Rust is

rustc --version rustc 1.15.0-nightly (ba872f270 2016-11-17)

tdz commented 7 years ago

@dhylands @fabricedesre

tdz commented 7 years ago

Revolved. I used the wrong version of cc3200-rs.

tdz commented 7 years ago

I'm reopening this issue.

I'd like to use the simplelink code of the master branch of cc3200-rs, but with the master branch I get the error message.

fabricedesre commented 7 years ago

Is your crate using #[no_std] ? It has too to prevent rust to pull the macros from the std library.

dhylands commented 7 years ago

I'd recommend that you copy one of the examples from cc3200-rs as your starting point.

I also used rustup to install nightly-2016-11-06 version of the toolchain. The scripts/travis.sh script will have the particular verison that working.

rustc --version should report:

rustc 1.14.0-nightly (cae6ab1c4 2016-11-05)
fabricedesre commented 7 years ago

Fixed by https://github.com/fabricedesre/cc3200-rs/commit/3d09e82f1a0bac661807f5221b898fe64dc83c30