openthread / ot-reference-release

BSD 3-Clause "New" or "Revised" License
11 stars 27 forks source link

Build ncs type reference release failed with the new sdk-nrf commit #61

Closed sunytt closed 1 year ago

sunytt commented 1 year ago

I have updated the GH action in PR to run REFERENCE_PLATFORM=ncs REFERENCE_RELEASE_TYPE=1.3 ./script/make-reference-release.bash

It uses the updated sdk-nrf commit e434ec2f11f2fed6bd24c2f0bc2c3e98486d2a90: https://github.com/openthread/ot-reference-release/actions/runs/5368877565/jobs/9740027480#step:5:617

and the job failed with below error:

https://github.com/openthread/ot-reference-release/actions/runs/5368877565/jobs/9740027480#step:5:3999

/home/runner/work/ot-reference-release/ot-reference-release/ncs/zephyr/drivers/ieee802154/ieee802154_nrf5.c: In function 'nrf5_configure':
/home/runner/work/ot-reference-release/ot-reference-release/ncs/zephyr/drivers/ieee802154/ieee802154_nrf5.c:947:3: error: a label can only be part of a statement and a declaration is not a statement
  947 |   uint64_t csl_rx_time = target_time_convert_to_64_bits(config->csl_rx_time);
      |   ^~~~~~~~
/home/runner/work/ot-reference-release/ot-reference-release/ncs/zephyr/drivers/ieee802154/ieee802154_nrf5.c:964:3: error: a label can only be part of a statement and a declaration is not a statement
  964 |   uint64_t start = target_time_convert_to_64_bits(config->rx_slot.start);
      |   ^~~~~~~~
[523/654] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/home/runner/work/ot-reference-release/ot-reference-release/ncs/zephyr/misc/empty_file.c.obj
[524/654] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_nrfx_uarte.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /tmp/ncs_cli_1_2

I wonder what might be missing here? @canisLupus1313 could you please help take a look?

canisLupus1313 commented 1 year ago

@sunytt I will take a look into it.

canisLupus1313 commented 1 year ago

@sunytt Where do you get your toolchain from?

sunytt commented 1 year ago

@sunytt Where do you get your toolchain from?

Thanks for looking! @canisLupus1313

In the GH action I used:

cd /tmp
sudo apt-get update
sudo apt-get --no-install-recommends install -y ninja-build gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
wget --tries 4 --no-check-certificate --quiet https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 -O gcc-arm.tar.bz2
tar xjf gcc-arm.tar.bz2

export PATH=/tmp/gcc-arm-none-eabi-9-2019-q4-major/bin:$PATH
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH=/tmp/gcc-arm-none-eabi-9-2019-q4-major/
REFERENCE_PLATFORM=ncs REFERENCE_RELEASE_TYPE=1.3 ./script/make-reference-release.bash
canisLupus1313 commented 1 year ago

Ok so for me on my local machine, it builds however I'm using the toolchain installed as in instructions below: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/installation/installing.html#install-the-zephyr-sdk

So essentially:

cd $HOME
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.1/zephyr-sdk-0.16.1_linux-x86_64.tar.xz
wget -O - https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.1/sha256.sum | shasum --check --ignore-missing
tar xf zephyr-sdk-0.16.1_linux-x86_64.tar.xz
cd zephyr-sdk-0.16.1
./setup.sh

I haven't spotted any more differences in the env setup so let's see if this helps.

BTW have you tried to build it locally?

sunytt commented 1 year ago

Thanks @canisLupus1313 ! With the zephyr sdk installed I can build locally now, will try to see if GH action can work as well.

Previously using the gnuarmemb toolchain I was also able to build both locally and in GH action, not sure why it stopped working.

canisLupus1313 commented 1 year ago

@sunytt I can see that the PR mentioned is still not resolved. Do you need any more assistance?

sunytt commented 1 year ago

Thanks for your help @canisLupus1313 ! I'll close this issue as I can build now.

For that PR I'll need to do some refactoring.