9

When I want to run "ant run" in contiki-3.9/tools/cooja, I am facing following error:

BUILD FAILED /home/user/contiki-3.0/tools/cooja/build.xml:199: The following error occurred while executing this line: /home/user/contiki-3.0/tools/cooja/apps/mspsim/build.xml:29: - Could not find the MSPSim build file. Did you run "git submodule update --init"?

but actually I ran

             git submodule init
             git submodule update

before using "ant run".

Please help me on this problem, I'm new to contiki-os and should use it for my master thesis

Jongware
  • 22,200
  • 8
  • 54
  • 100
niousha
  • 103
  • 1
  • 1
  • 6

6 Answers6

24

The following worked for me:

  1. Download the mspsim separately from this link https://github.com/contiki-os/mspsim (check your home/contiki/tools/mspsim and home/contiki-3.0/tools/mspsim directories, both are probably empty).
  2. Remove the empty mspsim directory from both places
  3. After unzip mspsim-master, paste the unzipped mspsim-master directory on both places
  4. Rename the directory from mspsim-master to mspsim on both palces.
  5. Go to terminal (user@instant-contiki:~/contiki-3.0/tools/cooja$) and run this command ant run
  6. No need to use sudo

Enjoy!

K' Dash
  • 3
  • 2
Renan
  • 256
  • 2
  • 2
4

Please notice the last warring. If your English is not good, use Goolge Translate please. Just run "git submodule update --init" before run "ant run".

leo
  • 41
  • 2
  • 1
    The contiki directory on VM image is not a git repo, so it is not possible to apply git submodule update. Relax man, for sure he tried the obvious solution ... – Filipe Calasans Jun 05 '16 at 15:52
  • Thank you this was the answer that worked it is essentially making the same thing jsut a lot easier. I should read all the tipps the error messages give me I gues. Thank you for this answer this is the best in my opinion – Ilja KO May 26 '18 at 19:39
2

Then when I, ant run same appears again

BUILD FAILED
/home/user/contiki-3.0/tools/cooja/build.xml:199: The following error
occurred while executing this line:
/home/user/contiki-3.0/tools/cooja/apps/mspsim/build.xml:29: -
----------------
Could not find the MSPSim build file. Did you run "git submodule update
--init"?

My solution:

cd tools/cooja
rm -rf .git
cd ..
sudo git submodule update --init

Enjoy Cooja :)

  • Thank you so much for your response, but the problem was because of being the mspsim directory empty in original source of contiki that I download from github, so I had to redownload the mentioned directory – niousha Mar 20 '16 at 16:45
1
  • go to: contiki/tools/cooja
  • run: git submodule update --init in the terminal
  • now, try: ant run
RobC
  • 22,977
  • 20
  • 73
  • 80
Ashwin Kannan
  • 91
  • 1
  • 11
1

Another solution for the Instant Contiki VMs would be:

mkdir ~/Downloads/contiki_clone

cd ~/Downloads/contiki_clone

git clone https://github.com/contiki-os/contiki.git

When it clones the Contiki, simply:

cd contiki/tools/cooja

git submodule update --init

ant run

These commands will let you have a brand new Contiki on your instant Contiki VM. You can simply delete the older contiki files in home directory and use this one. If you like to clone an older version, then:

mkdir ~/Downloads/contiki_clone

cd ~/Downloads/contiki_clone

git clone https://github.com/contiki-os/contiki.git

cd contiki

git checkout hash_of_the_older_version

cd tools/cooja

git submodule update --init
RobC
  • 22,977
  • 20
  • 73
  • 80
Tlos
  • 151
  • 1
  • 12
-2

Below steps worked for me after downloading and booting instant contiki 3.0 in VMware player.

cd contiki

git submodule update --init

cd tools/cooja/

ant run

Instant contiki 3.0 downloaded from here.

Remaining instructions are here.

RobC
  • 22,977
  • 20
  • 73
  • 80