# Compiling ardusub error

**URL:** <https://discuss.bluerobotics.com/t/compiling-ardusub-error/229>\
**Category:** Blue Robotics Software\
**Created:** [March 4, 2016, 4:33am UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229 "2016-03-04T04:33:58Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![vorney](https://avatars.discourse-cdn.com/v4/letter/v/a9adbd/32.png) [@vorney](https://discuss.bluerobotics.com/u/vorney)\
**Post date:** [March 4, 2016, 4:33am UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/1 "2016-03-04T04:33:58Z")

</div>

hi all

why the error occurred when i followed the instruction of compiling ardusub firmware? the prompt is followed:

![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/1X/0617b5bb444b7a874e552102481078aaaa3762d1.jpg)

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [March 4, 2016, 7:00am UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/2 "2016-03-04T07:00:51Z")

</div>

> <https://github.com/bluerobotics/ardusub/blob/master/libraries/AC_Fence/AC_Fence.h#L80>

For the build type to be determined correctly, I think the directory must be named ‘ArduSub’, not ‘ardusub’ as it appears to be for you.

Let me know if this helps -Jacob

---

<div class="post-metadata">

**Author:** ![vorney](https://avatars.discourse-cdn.com/v4/letter/v/a9adbd/32.png) [@vorney](https://discuss.bluerobotics.com/u/vorney)\
**Post date:** [March 4, 2016, 10:28am UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/3 "2016-03-04T10:28:31Z")

</div>

@Jacob

Thanks a lots for your helps, yes, the error disappere when i follow your instruction, the compiling is successful

and attachment is the results. the reseaon is exactly to write wrong the directory name.

![](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/1X/ef8d74b130fa8b619dffe467f50a42544f006c25.jpg)

---

<div class="post-metadata">

**Author:** ![irfanmasoudi](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/irfanmasoudi/32/3029_2.png) [@irfanmasoudi](https://discuss.bluerobotics.com/u/irfanmasoudi)\
**Post date:** [November 28, 2018, 4:50pm UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/4 "2018-11-28T16:50:32Z")

</div>

Hi @jwalser can you help me to fix my problem. Actually I have ever succeed for compiling, but after use new github repository I got some problem. How can I solve this?

 ![error](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/c/ceb165fb75793518191decc2a3d39d02a03f0d37.png)

---

<div class="post-metadata">

**Author:** ![patrickelectric](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/patrickelectric/32/2162_2.png) [@patrickelectric](https://discuss.bluerobotics.com/u/patrickelectric)\
**Post date:** [November 28, 2018, 4:52pm UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/5 "2018-11-28T16:52:08Z")

</div>

Hi Irfan,

You can take a look in the documentation [here](http://ardupilot.org/dev/docs/building-the-code.html).

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [November 28, 2018, 5:02pm UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/6 "2018-11-28T17:02:13Z")

</div>

probably  
`git submodule update --init --recursive`

---

<div class="post-metadata">

**Author:** ![irfanmasoudi](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/irfanmasoudi/32/3029_2.png) [@irfanmasoudi](https://discuss.bluerobotics.com/u/irfanmasoudi)\
**Post date:** [November 28, 2018, 5:13pm UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/7 "2018-11-28T17:13:17Z")

</div>

> [@jwalser](#):
>
> git submodule update --init --recursive

Yes i have done that. And still error

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [November 28, 2018, 5:52pm UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/8 "2018-11-28T17:52:17Z")

</div>

It says that you are missing a file. This is how you get all of the files. Please try @patrickelectric advice.

---

<div class="post-metadata">

**Author:** ![irfanmasoudi](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/irfanmasoudi/32/3029_2.png) [@irfanmasoudi](https://discuss.bluerobotics.com/u/irfanmasoudi)\
**Post date:** [November 28, 2018, 6:45pm UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/9 "2018-11-28T18:45:01Z")

</div>

I’ve applied all the instructions to get the code from ardupilot’s github repository.

---

<div class="post-metadata">

**Author:** ![patrickelectric](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/patrickelectric/32/2162_2.png) [@patrickelectric](https://discuss.bluerobotics.com/u/patrickelectric)\
**Post date:** [November 28, 2018, 6:51pm UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/10 "2018-11-28T18:51:29Z")

</div>

Hello Irfan,

Run this in your terminal (corrected):

```auto
git clone https://github.com/ArduPilot/ardupilot &&
cd ardupilot &&
git submodule update --init --recursive &&
./waf configure --board px4-v2 &&
./waf sub

```

And send the output for us in [pastebin](https://pastebin.com/). Probably you have missed a configuration step.

---

<div class="post-metadata">

**Author:** ![irfanmasoudi](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/irfanmasoudi/32/3029_2.png) [@irfanmasoudi](https://discuss.bluerobotics.com/u/irfanmasoudi)\
**Post date:** [November 28, 2018, 8:15pm UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/11 "2018-11-28T20:15:22Z")

</div>

this is the output [Waf: Entering directory `/home/io/ardupilot/build/px4-v2'[5/14] CMake Configu - Pastebin.com](https://pastebin.com/4tpXdg6H)  
I have tried many times to configure it, but I just got the same problem

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [November 28, 2018, 8:43pm UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/12 "2018-11-28T20:43:27Z")

</div>

> [@patrickelectric](#):
>
> Run this in your terminal:
> 
> ```auto
> git clone https://github.com/ArduPilot/ardupilot &&
> cd ardupilot &&
> git submodule update --init --recursive &&
> ./waf configure --board px4-v2 &&
> ./waf sub-v2
> 
> ```

There is a mistake in @patrickelectric command. It should be:

```auto
git clone https://github.com/ArduPilot/ardupilot &&
cd ardupilot &&
git submodule update --init --recursive &&
./waf configure --board px4-v2 &&
./waf sub

```

@irfanmasoudi There is a problem in the way that you are trying to get help. You showed us some output, but you did not show us the commands that you entered, and you did not show the entire output of the commands that @patrickelectric suggested. For example, we have no proof that you did the submodule update and that all the files were downloaded successfully. How can we know that there are no errors in the commands that you need before you build?

I have tested the command I put here, and it works. Please show the complete paste of the commands + output as I have here: [https://pastebin.com/SgT6TfPM](https://pastebin.com/SgT6TfPM)

---

<div class="post-metadata">

**Author:** ![irfanmasoudi](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/irfanmasoudi/32/3029_2.png) [@irfanmasoudi](https://discuss.bluerobotics.com/u/irfanmasoudi)\
**Post date:** [November 28, 2018, 9:32pm UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/13 "2018-11-28T21:32:24Z")

</div>

[\> cd ardupilot &&\> git submodule update --init --recursive &&\> ./waf configu - Pastebin.com](https://pastebin.com/w7Vn3XQt) this is the complete output

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [November 28, 2018, 10:28pm UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/14 "2018-11-28T22:28:51Z")

</div>

Did you install the correct arm-none-eabi according to the first link @patrickelectric gave?

```auto
$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 227977]
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

```

---

<div class="post-metadata">

**Author:** ![patrickelectric](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/patrickelectric/32/2162_2.png) [@patrickelectric](https://discuss.bluerobotics.com/u/patrickelectric)\
**Post date:** [November 29, 2018, 10:37am UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/15 "2018-11-29T10:37:32Z")

</div>

Hi,

Sorry for the wrong command `./waf sub-v2`, the correct command is `./waf sub`, it was probably a typo from px4-v2 line in my control-c.

@irfanmasoudi, From your last log, it appears that you are using the wrong compile version (ArduPilot only supports 4.9), as described by @jwalser. Please follow the documentation as described here:

> [@Compiling ardusub error](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/5):
>
> Hi Irfan, You can take a look in the documentation [here](http://ardupilot.org/dev/docs/building-the-code.html).

---

<div class="post-metadata">

**Author:** ![irfanmasoudi](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/irfanmasoudi/32/3029_2.png) [@irfanmasoudi](https://discuss.bluerobotics.com/u/irfanmasoudi)\
**Post date:** [November 30, 2018, 10:03am UTC](https://discuss.bluerobotics.com/t/compiling-ardusub-error/229/16 "2018-11-30T10:03:58Z")

</div>

> [@jwalser](#):
>
> ./waf configure --board px4-v2 &&

Thank you very much guys. ArduSub’s compile is working properly. Even though I just need to reinstall my laptop. 😁
