Problem with build/compile instructions (in Ubuntu)

weird this package is in ubuntu repo. Are you using 32-bit ubuntu ? or ARM ?

i am using a VMWARE ubuntu 32-bit system on WIN7 .
perhaps i need to do the clone using username root ?

nope ! the error is we assume that everybody use 64bit system (I think it is normal to assume that as all desktops are 64bits now)
So you are trying to install libc6-i386 that is a 32bit compatibility library for 64bit system (or something like that), and as you are in 32bit system, it isn’t present on ubuntu repo .

Would it be to hard for you to switch to 64bits ubuntu ?

1 Like

okay ,i will try it right now ,but this will take about 1-2 hours to re-install a 64bits ubuntu and clone form github . after re-do it , I will update the result . keep in touch.

It would be good to handle 32bit, some embedded systems/SBCs are still 32bit.

I agree that it is good for support 32bit ubuntu . and I have a doubt that the official link:
http://ardupilot.org/dev/docs/building-px4-for-linux-with-make.html
doesn’t update the BUILD INSTRUCTIONS present here.

It will be more helpful to update the INSTRUCTIONS , because there will be more people (like me) will do as the official link instructions and got stuck . I won’t tell you that I had been stuck for five days, and when I input the error message which is made by follow the official link into google , there is no appropriate page that matches. and i keep on and on looking for good solutions .and as you know , I failed . So i think the official link is really a big trouble for new people.

The wiki is up to dat and must be follow , not this post…

@OXINARF Could you change the title in order to not confused people that read that. The wiki must be followed not this post

@khancyr I changed the title and also merged your PR so that 32bit is accounted for. Thanks.

Hi ,khancyr . I follow your advice and re-install a 64bit ubuntu system.
After I tried the INSTRUCTION present in this post , i got stuck here for
an hour . the command window keeps display "cloning into ‘pymavlink’ "and doesn’t move on. how can i do with it ,just wait ? by the way , i am in china ,do i need a vpn connect and re-do the build command?

root@wei:/home/wei/ardupilot# source ~/.profile
root@wei:/home/wei/ardupilot# ./waf configure --board px4-v2
Setting top to : /home/wei/ardupilot
Setting out to : /home/wei/ardupilot/build
Autoconfiguration : enabled
Setting board to : px4-v2
Checking for program ‘arm-none-eabi-ar’ : /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-ar
Using toolchain : arm-none-eabi
Checking for ‘g++’ (C++ compiler) : /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-g++
Checking for ‘gcc’ (C compiler) : /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc
Checking for HAVE_CMATH_ISFINITE : no
Checking for HAVE_CMATH_ISINF : no
Checking for HAVE_CMATH_ISNAN : no
Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : no
Checking for NEED_CMATH_ISINF_STD_NAMESPACE : no
Checking for NEED_CMATH_ISNAN_STD_NAMESPACE : no
Checking for header endian.h : not found
Checking for header byteswap.h : not found
Checking for program ‘cmake’ : /usr/bin/cmake
Checking cmake version : 3.2.2
Checking for program ‘ninja, ninja-build’ : not found
Checking for program ‘make’ : /usr/bin/make
Checking for program ‘python’ : /usr/bin/python
Checking for python version >= 2.7.0 : 2.7.6
Source is git repository : yes
Update submodules : yes
Checking for program ‘git’ : /usr/bin/git
Gtest : PX4 boards currently don’t support compiling gtest
Checking for program ‘arm-none-eabi-size’ : /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-size
Benchmarks : disabled
Unit tests : disabled
’configure’ finished successfully (1.161s)
root@wei:/home/wei/ardupilot# ./waf copter
Waf: Entering directory `/home/wei/ardupilot/build/px4-v2’
[1/4] Running Submodule update: PX4Firmware
[3/4] Running Submodule update: uavcan
Submodule ‘dsdl’ (https://github.com/UAVCAN/dsdl) registered for path 'dsdl’
Submodule ‘libuavcan/dsdl_compiler/pyuavcan’ (https://github.com/UAVCAN/pyuavcan) registered for path 'libuavcan/dsdl_compiler/pyuavcan’
Submodule path ‘modules/uavcan/dsdl’: checked out '9804a3e6972825586be252ce08dd899f44994b14’
Submodule path ‘modules/uavcan/libuavcan/dsdl_compiler/pyuavcan’: checked out 'c58477a644d20ccf95a20c151f3a0402f271c3b8’
Submodule ‘dsdl’ (https://github.com/UAVCAN/dsdl) registered for path 'dsdl’
Submodule path ‘modules/uavcan/libuavcan/dsdl_compiler/pyuavcan/dsdl’: checked out ‘fd12483ddd4e58242d61d74a163e7aeaa1e0f466’

Cloning into ‘dsdl’…
Cloning into ‘libuavcan/dsdl_compiler/pyuavcan’…
Cloning into ‘dsdl’…

[4/4] Running Submodule update: mavlink
Submodule ‘pymavlink’ (git://github.com/ArduPilot/pymavlink.git) registered for path 'pymavlink’
Submodule path ‘modules/mavlink/pymavlink’: checked out ‘38f866bbda700ef9dd652b52c7917a81a7dc7750’

Cloning into ‘pymavlink’…

If it is cloning you have to wait for it to get all the data, but one hour seems way too long, specially for pymavlink. I’ve heard of some constraints in China for GitHub but I’m not sure if that’s still in place or not and if it is affecting the speed at which you get content.

till now ,it has been stuck in " Cloning into ‘pymavlink’. .“for 4 hours.
I have already tried to visit link " https://github.com/ArduPilot/pymavlink” on firefox and i got this page

that means that i can visit the link:
https://github.com/ArduPilot/pymavlink

but when use command “git://github.com/ArduPilot/pymavlink.git” it stucks and seem stuck forever.
what can i do with it ?just wait another 3 hours?

You can try editing the .gitmodules file inside the ArduPilot folder and change the git:// to https:// since I’ve read that some people behind firewalls can’t use the git protocol. But you’ve got other repositories so it is strange if that is the issue.

i am trying your instructions.
at first i end the comman line by input’ctrl+c" ,it looks

^CTraceback (most recent call last):
  File "./waf", line 12, in <module>
    subprocess.check_call(['python', waf_light] + sys.argv[1:])
  File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 1376, in wait
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
    return func(*args)
KeyboardInterrupt
root@wei:/home/wei/ardupilot# Waf: Leaving directory `/home/wei/ardupilot/build/px4-v2'
Interrupted 

then i modified the .gitmodules file ,and it seems it’s read-only file ,can’t be modified .
here is the operation that i made and corresponding result :slight_smile:

after that ,i input the command " ./waf copter ",now it stuck again at

./waf copter
Waf: Entering directory `/home/wei/ardupilot/build/px4-v2'
[1/4] Running Submodule update: PX4Firmware

How do you do not have permissions to save the file? I would reboot and try again, that looks very strange.

1 Like

now i use sudo gedit .gitmodules to open .gitmodules and suffcessfully change the the git:// to https://

then input the command " ./waf copter" .now it seems work

BUILD SUMMARY
Build directory: /home/wei/ardupilot/build/px4-v2
Target                    Text    Data  BSS    Total  
------------------------------------------------------
bin/arducopter-quad       969520  2852  61784  1034156
bin/arducopter-tri        968744  2852  61656  1033252
bin/arducopter-hexa       969216  2852  61784  1033852
bin/arducopter-y6         969128  2852  61784  1033764
bin/arducopter-octa       969488  2852  61784  1034124
bin/arducopter-octa-quad  969528  2852  61784  1034164
bin/arducopter-heli       961672  2848  61912  1026432
bin/arducopter-single     969144  2852  61784  1033780
bin/arducopter-coax       968632  2852  61784  1033268

PX4
The ELF files are pointed by the path in the "Target" column. The .px4 files are in
the same directory of their corresponding ELF files.

You can use the option --upload to upload the firmware to the PX4 board if you
have one connected.

PX4IO
Binary                 Text   Data  BSS   Total
-----------------------------------------------
px4-extra-files/px4io  42312   580  3122  46014

okay ,this was done .
OXINARF and khancyr, thank you for being so nice to help me . Without you , I won’t make it .
thank you very much.

may i have a suggest that the instructions present in this post update to official link ,thus every new guy can easily find the solution.

Hi,I’m also Chinese. 我也遇到了和你一样的问题。但是我的ubuntu就是64位的,但是同样遇到了no module named future的错误。不知道你更新之后这个问题怎么解决的呢?

Hi,你可以加我的QQ 我们聊一下,413045384。

@dipspb @fnoop Thanks I will try fnoop build instructions after work

Sent using the mail.com mail app

加我QQ 413045384 联系吧

------------------ 原始邮件 ------------------
发件人: “zeyu.ding”;noreply@discuss.ardupilot.org;
发送时间: 2016年12月4日(星期天) 凌晨3:49
收件人: "流星客"413045384@qq.com;

主题: [ArduPilot Discuss] [ArduCopter/Copter 3.4] Problem withbuild/compile instructions (in Ubuntu)

                                                                                                       dzy6489                 zeyu.ding               
           December 3                        

Hi,I’m also Chinese. 我也遇到了和你一样的问题。但是我的ubuntu就是64位的,但是同样遇到了no module named future的错误。不知道你更新之后这个问题怎么解决的呢?

Visit Topic or reply to this email to respond.

In Reply To
weishulin1
November 22

        may i have a suggest that the instructions  present in this post update to official link ,thus every new guy can easily find the solution.     

Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.