whitefield-framework / whitefield

Whitefield provides a simulation environment for wireless sensor networks by combining RF simulation provided by NS3 and network stack provided by popular IoT OSes such as Contiki/RIOT/OpenThread.
GNU General Public License v2.0
82 stars 23 forks source link

Atomic_sync.c file compilation error when activating RIOT #118

Closed sabriCHALLOUF closed 3 years ago

sabriCHALLOUF commented 3 years ago

Describe the bug OS : Ubuntu 20.04 GCC version : 9.3.0 or 7.5.0 After installation of the Whitefield and when activating the the RIOT OS using ./scripts/setup --riot 1, the installation is aborted with an error related to the compilation of the file : atomic_sync.c file

To Reproduce Steps to reproduce the behavior:

  1. Under Ubuntu 20.04
  2. Download the Whitefield sources
  3. Set up the Whitefield with default options
  4. Activate the RIOT OS using in the Whitefield directory the command : ./scripts/setup --riot 1
  5. See error

Expected behavior No error should be raised and the activation of the RIOT should terminate successfully.

Screenshots image

Additional context May be the GCC version cause this problem.

sabriCHALLOUF commented 3 years ago

I tried with the Ubuntu 16.04 containing gcc version 5.7 and the problem disappears.

nyrahul commented 3 years ago

Fixed this issue with PR #119.

The problem was that Whitefield was using an old fork of RIOT which could not compile on the latest GCC.

This fix will make Whitefield with RIOT + Contiki work on Ubuntu 20.04 with the latest GCC.

Synced the Whitefield's RIOT fork to upstream latest. Handled all the corresponding changes in netif/netdev interfaces of RIOT and now it compiles all fine.

Ideally, in the future, it would be great to have Whitefield's plug-and-play mode operating with RIOT such that there is no dependency on synchronizing with the latest RIOT all the time.