Lỗi build ./waf

PFIEVer

Trứng gà
Chào các anh/ các bạn,
Hiện team em đang bị vướng ở dòng
./waf
Đã google search nhưng chưa tìm được hướng giải quyết. Em đính kèm code dưới đây (1 cái e tự compiler, 1 cái e down source code anh Hiệp up):
#1. Source code từ a Hiệp
hoanghao@hoanghao:~/FlyMew_Ardupilot-master$ ./waf
Waf: Entering directory `/home/hoanghao/FlyMew_Ardupilot-master/build/bbbmini'
Command ['/usr/bin/git', 'rev-parse', '--short=8', 'HEAD'] returned 128

#2. Em tự clone và git project theo hướng dẫn
hoanghao@hoanghao:~/FlyMew_Ardupilot$ ./waf
Waf: Entering directory `/home/hoanghao/FlyMew_Ardupilot/build/bbbmini'
[1/4] Processing modules/mavlink/message_definitions/v1.0/ardupilotmega.xml
Validation skipped for /home/hoanghao/FlyMew_Ardupilot/modules/mavlink/message_definitions/v1.0/ardupilotmega.xml.
Parsing /home/hoanghao/FlyMew_Ardupilot/modules/mavlink/message_definitions/v1.0/ardupilotmega.xml
Note: message DATA64 is longer than 64 bytes long (74 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message DATA96 is longer than 64 bytes long (106 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message REMOTE_LOG_DATA_BLOCK is longer than 64 bytes long (214 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message DEVICE_OP_READ_REPLY is longer than 64 bytes long (143 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message DEVICE_OP_WRITE is longer than 64 bytes long (187 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Validation skipped for /home/hoanghao/FlyMew_Ardupilot/modules/mavlink/message_definitions/v1.0/common.xml.
Parsing /home/hoanghao/FlyMew_Ardupilot/modules/mavlink/message_definitions/v1.0/common.xml
Note: message GPS_STATUS is longer than 64 bytes long (109 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message ATTITUDE_QUATERNION_COV is longer than 64 bytes long (80 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message GLOBAL_POSITION_INT_COV is longer than 64 bytes long (189 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message LOCAL_POSITION_NED_COV is longer than 64 bytes long (233 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message HIL_ACTUATOR_CONTROLS is longer than 64 bytes long (89 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message HIGHRES_IMU is longer than 64 bytes long (70 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message HIL_SENSOR is longer than 64 bytes long (72 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message SIM_STATE is longer than 64 bytes long (92 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message FILE_TRANSFER_PROTOCOL is longer than 64 bytes long (262 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message HIL_STATE_QUATERNION is longer than 64 bytes long (72 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message LOG_DATA is longer than 64 bytes long (105 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message GPS_INJECT_DATA is longer than 64 bytes long (121 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message SERIAL_CONTROL is longer than 64 bytes long (87 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message ENCAPSULATED_DATA is longer than 64 bytes long (263 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message RESOURCE_REQUEST is longer than 64 bytes long (251 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message FOLLOW_TARGET is longer than 64 bytes long (101 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message CONTROL_SYSTEM_STATE is longer than 64 bytes long (108 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message AUTOPILOT_VERSION is longer than 64 bytes long (68 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message GPS_INPUT is longer than 64 bytes long (71 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message GPS_RTCM_DATA is longer than 64 bytes long (190 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message V2_EXTENSION is longer than 64 bytes long (262 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message CAMERA_INFORMATION is longer than 64 bytes long (94 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message CAMERA_IMAGE_CAPTURED is longer than 64 bytes long (263 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message LOGGING_DATA is longer than 64 bytes long (263 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message LOGGING_DATA_ACKED is longer than 64 bytes long (263 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Validation skipped for /home/hoanghao/FlyMew_Ardupilot/modules/mavlink/message_definitions/v1.0/uAvionix.xml.
Parsing /home/hoanghao/FlyMew_Ardupilot/modules/mavlink/message_definitions/v1.0/uAvionix.xml
Merged enum MAV_CMD
Found 208 MAVLink message types in 3 XML files
Generating C implementation in directory /home/hoanghao/FlyMew_Ardupilot/build/bbbmini/libraries/GCS_MAVLink/include/mavlink/v2.0/ardupilotmega
Generating C implementation in directory /home/hoanghao/FlyMew_Ardupilot/build/bbbmini/libraries/GCS_MAVLink/include/mavlink/v2.0/common
Generating C implementation in directory /home/hoanghao/FlyMew_Ardupilot/build/bbbmini/libraries/GCS_MAVLink/include/mavlink/v2.0/uAvionix
Copying fixed headers for protocol 2.0 to /home/hoanghao/FlyMew_Ardupilot/build/bbbmini/libraries/GCS_MAVLink/include/mavlink/v2.0

WARNING: Unable to load XML validator libraries. XML validation will not be performed
Traceback (most recent call last):
File "/home/hoanghao/FlyMew_Ardupilot/modules/mavlink/pymavlink/tools/mavgen.py", line 30, in <module>
mavgen.mavgen(args, args.definitions)
File "/home/hoanghao/FlyMew_Ardupilot/modules/mavlink/pymavlink/generator/mavgen.py", line 133, in mavgen
mavgen_c.generate(opts.output, xml)
File "/home/hoanghao/FlyMew_Ardupilot/modules/mavlink/pymavlink/generator/mavgen_c.py", line 700, in generate
copy_fixed_headers(basename, xml_list[0])
File "/home/hoanghao/FlyMew_Ardupilot/modules/mavlink/pymavlink/generator/mavgen_c.py", line 534, in copy_fixed_headers
shutil.copy(src, dest)
File "/usr/lib/python2.7/shutil.py", line 119, in copy
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/home/hoanghao/FlyMew_Ardupilot/modules/mavlink/pymavlink/generator/C/include_v2.0/protocol.h'

mavgen returned 1 error code
Waf: Leaving directory `/home/hoanghao/FlyMew_Ardupilot/build/bbbmini'
Build failed
-> task in 'mavlink' failed (exit status 1):
{task 140103333235600: mavgen ardupilotmega.xml -> }
''
Mong các anh/ các bạn giúp đỡ.
 

Sang Trần

Gà con
Staff member
Chào bạn,
Lỗi như trên mình cũng chưa gặp bao giờ nên bạn thử kiểm tra lại các quá trình cài đặt
Ở bước
Code:
sudo ./Tools/scripts/install-prereqs-ubuntu.sh
bạn có thấy error gì không ?

Bạn có thể sử dụng file này mình đã config và tải về đủ thư viện chỉ cần ./waf để build
https://drive.google.com/file/d/0B1uSPql5f2i4SmY1VFRqWWU4Y00/view

Nếu vẫn không được ngày mai bạn đem lên lab lúc 9h để mình kiểm tra lại nhé :1cool_byebye:
 

PFIEVer

Trứng gà
E gui ket qua e run lai code do. Theo em nhin so qua thi khong co error.
hoanghao@hoanghao:~/FlyMew_Ardupilot$ sudo ./Tools/scripts/install-prereqs-ubuntu.sh
[sudo] password for hoanghao:
+ OPT=/opt
+ BASE_PKGS='build-essential ccache g++ gawk git make wget'
+ PYTHON_PKGS='future lxml pymavlink MAVProxy'
+ PX4_PKGS='python-argparse openocd flex bison libncurses5-dev autoconf texinfo libftdi-dev zlib1g-dev zip genromfs python-empy cmake cmake-data'
+ ARM_LINUX_PKGS='g++-arm-linux-gnueabihf pkg-config-arm-linux-gnueabihf'
+ SITL_PKGS='libtool libxml2-dev libxslt1-dev python-dev python-pip python-setuptools python-matplotlib python-serial python-scipy python-opencv python-numpy python-pyparsing realpath'
+ ASSUME_YES=false
+ UBUNTU_YEAR=15
+ UBUNTU_MONTH=10
++ lsb_release -r -s
+ version=16.04
++ cut -d. -f1
++ echo 16.04
+ yrelease=16
++ cut -d. -f2
++ echo 16.04
+ mrelease=04
+ '[' 16 -ge 15 ']'
+ '[' 16 -gt 15 ']'
+ SITL_PKGS+=' python-wxgtk3.0 libtool-bin'
++ uname -m
+ MACHINE_TYPE=x86_64
+ '[' x86_64 == x86_64 ']'
+ PX4_PKGS+=' libc6-i386'
+ ARM_ROOT=gcc-arm-none-eabi-4_9-2015q3
+ ARM_TARBALL=gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2
+ ARM_TARBALL_URL=http://firmware.ardupilot.org/Tools/PX4-tools/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2
+ ARDUPILOT_TOOLS=Tools/autotest
+ OPTIND=1
+ getopts y opt
+ false
+ APT_GET='sudo apt-get'
+ read -r UBUNTU_CODENAME
++ lsb_release -c -s
+ '[' xenial = precise ']'
+ '[' xenial = trusty ']'
+ sudo usermod -a -G dialout root
+ sudo apt-get remove modemmanager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'modemmanager' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ sudo apt-get update
Hit:1 http://vn.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://vn.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:4 http://vn.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [384 kB]
Get:6 http://vn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [653 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [356 kB]
Get:8 http://vn.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [618 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [170 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [60,2 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [62,1 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [51,4 kB]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [85,1 kB]
Get:14 http://vn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [307 kB]
Get:15 http://vn.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [225 kB]
Get:16 http://vn.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [544 kB]
Get:17 http://vn.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [518 kB]
Get:18 http://vn.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [174 kB]
Get:19 http://vn.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [245 kB]
Get:20 http://vn.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [5.892 B]
Get:21 http://vn.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3.328 B]
Get:22 http://vn.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [4.588 B]
Fetched 4.772 kB in 40s (117 kB/s)
Reading package lists... Done
+ sudo apt-get install build-essential ccache g++ gawk git make wget libtool libxml2-dev libxslt1-dev python-dev python-pip python-setuptools python-matplotlib python-serial python-scipy python-opencv python-numpy python-pyparsing realpath python-wxgtk3.0 libtool-bin python-argparse openocd flex bison libncurses5-dev autoconf texinfo libftdi-dev zlib1g-dev zip genromfs python-empy cmake cmake-data libc6-i386 g++-arm-linux-gnueabihf pkg-config-arm-linux-gnueabihf
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libpython2.7-stdlib' instead of 'python-argparse'
autoconf is already the newest version (2.69-9).
bison is already the newest version (2:3.0.4.dfsg-1).
build-essential is already the newest version (12.1ubuntu2).
ccache is already the newest version (3.2.4-1).
flex is already the newest version (2.6.0-11).
g++ is already the newest version (4:5.3.1-1ubuntu1).
g++-arm-linux-gnueabihf is already the newest version (4:5.3.1-1ubuntu1).
gawk is already the newest version (1:4.1.3+dfsg-0.1).
libncurses5-dev is already the newest version (6.0+20160213-1ubuntu1).
libtool is already the newest version (2.4.6-0.1).
libtool-bin is already the newest version (2.4.6-0.1).
make is already the newest version (4.1-6).
python-dev is already the newest version (2.7.11-1).
python-numpy is already the newest version (1:1.11.0-1ubuntu1).
python-serial is already the newest version (3.0.1-1).
python-setuptools is already the newest version (20.7.0-1).
zip is already the newest version (3.0-11).
genromfs is already the newest version (0.5.2-2build2).
libftdi-dev is already the newest version (0.20-4build1).
openocd is already the newest version (0.9.0-1build1).
pkg-config-arm-linux-gnueabihf is already the newest version (4:5.3.1-1ubuntu1).
python-empy is already the newest version (3.3.2-1build1).
python-matplotlib is already the newest version (1.5.1-1ubuntu1).
python-opencv is already the newest version (2.4.9.1+dfsg-1.5ubuntu1).
python-scipy is already the newest version (0.17.0-1).
python-wxgtk3.0 is already the newest version (3.0.2.0+dfsg-1build1).
texinfo is already the newest version (6.1.0.dfsg.1-5).
cmake is already the newest version (3.5.1-1ubuntu3).
cmake-data is already the newest version (3.5.1-1ubuntu3).
git is already the newest version (1:2.7.4-0ubuntu1.3).
libc6-i386 is already the newest version (2.23-0ubuntu9).
libpython2.7-stdlib is already the newest version (2.7.12-1ubuntu0~16.04.1).
libxml2-dev is already the newest version (2.9.3+dfsg1-1ubuntu0.3).
libxslt1-dev is already the newest version (1.1.28-2.1ubuntu0.1).
python-pyparsing is already the newest version (2.0.3+dfsg1-1ubuntu0.1).
realpath is already the newest version (8.25-2ubuntu3~16.04).
wget is already the newest version (1.17.1-1ubuntu1.3).
zlib1g-dev is already the newest version (1:1.2.8.dfsg-2ubuntu4.1).
python-pip is already the newest version (8.1.1-2ubuntu0.4).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
+ sudo pip2 -q install -U future lxml pymavlink MAVProxy
+ '[' '!' -d /opt/gcc-arm-none-eabi-4_9-2015q3 ']'
+++ realpath ./Tools/scripts/install-prereqs-ubuntu.sh
++ dirname /home/hoanghao/FlyMew_Ardupilot/Tools/scripts/install-prereqs-ubuntu.sh
+ SCRIPT_DIR=/home/hoanghao/FlyMew_Ardupilot/Tools/scripts
++ realpath /home/hoanghao/FlyMew_Ardupilot/Tools/scripts/../../
+ ARDUPILOT_ROOT=/home/hoanghao/FlyMew_Ardupilot
+ exportline='export PATH=/opt/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH'
+ grep -Fxq 'export PATH=/opt/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH' /home/hoanghao/.profile
+ exportline2='export PATH=/home/hoanghao/FlyMew_Ardupilot/Tools/autotest:$PATH'
+ grep -Fxq 'export PATH=/home/hoanghao/FlyMew_Ardupilot/Tools/autotest:$PATH' /home/hoanghao/.profile
+ apt-cache search arm-none-eabi
binutils-arm-none-eabi - GNU assembler, linker and binary utilities for ARM Cortex-A/R/M processors
gcc-arm-none-eabi - GCC cross compiler for ARM Cortex-A/R/M processors
gcc-arm-none-eabi-source - GCC cross compiler for ARM Cortex-A/R/M processors (source)
gdb-arm-none-eabi - GNU debugger for ARM Cortex-A/R/M processors
libnewlib-arm-none-eabi - C library and math library compiled for bare metal using Cortex A/R/M
libstdc++-arm-none-eabi-newlib - GNU Standard C++ Library v3 for ARM Cortex-A/R/M processors (newlib)
ubertooth-firmware - Firmware for Ubertooth
ubertooth-firmware-
Chào bạn,
Lỗi như trên mình cũng chưa gặp bao giờ nên bạn thử kiểm tra lại các quá trình cài đặt
Ở bước
Code:
sudo ./Tools/scripts/install-prereqs-ubuntu.sh
bạn có thấy error gì không ?

Bạn có thể sử dụng file này mình đã config và tải về đủ thư viện chỉ cần ./waf để build
https://drive.google.com/file/d/0B1uSPql5f2i4SmY1VFRqWWU4Y00/view

Nếu vẫn không được ngày mai bạn đem lên lab lúc 9h để mình kiểm tra lại nhé :1cool_byebye:
source - Source code for the Ubertooth firmware
 
Top