Forum

[Solved] Build failed for Rpi4

Hello,

I got build error for Rpi4.

It looks like python syntax error.

| g++ -o src/slm/tslmendian/writer.o -c -isystem/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/recipe-sysroot-native/usr/include -O2 -pipe -pipe -DHAVE_CONFIG_H -DSUNPINYIN_DATA_DIR='"/usr/local/share/sunpinyin"' -I. -Isrc -Isrc/lexicon -Isrc/ime-core -Isrc/slm -Isrc/slm/slmpack -Isrc/slm/tools -Isrc/slm/slminfo -Isrc/slm/tslmendian -Isrc/slm/getwordfreq -Isrc/slm/thread -Isrc/slm/ids2ngram -Isrc/slm/slmbuild -Isrc/slm/slmprune -Isrc/slm/mmseg -Isrc/slm/tslminfo -Isrc/slm/slmseg -Isrc/pinyin -I/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/recipe-sysroot-native/usr/include src/slm/tslmendian/writer.cpp
| cd python && ./pinyin_info_gen.py > ../src/pinyin/pinyin_info.h
| File "./pinyin_info_gen.py", line 41
| print 'static const char *%s[] = { %s };' % (name, ', '.join ('"%s"' % s for s in var))
| ^
| SyntaxError: invalid syntax
| Install file: "/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/lm_sc.3gm.arpa" as "Dictionary/lm_sc.3gm.arpa"
| g++ -o src/slm/sim_dict.o -c -isystem/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/recipe-sysroot-native/usr/include -O2 -pipe -pipe -DHAVE_CONFIG_H -DSUNPINYIN_DATA_DIR='"/usr/local/share/sunpinyin"' -I. -Isrc -Isrc/lexicon -Isrc/ime-core -Isrc/slm -Isrc/slm/slmpack -Isrc/slm/tools -Isrc/slm/slminfo -Isrc/slm/tslmendian -Isrc/slm/getwordfreq -Isrc/slm/thread -Isrc/slm/ids2ngram -Isrc/slm/slmbuild -Isrc/slm/slmprune -Isrc/slm/mmseg -Isrc/slm/tslminfo -Isrc/slm/slmseg -Isrc/pinyin -I/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/recipe-sysroot-native/usr/include src/slm/sim_dict.cpp
| g++ -o src/slm/sim_sen.o -c -isystem/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/recipe-sysroot-native/usr/include -O2 -pipe -pipe -DHAVE_CONFIG_H -DSUNPINYIN_DATA_DIR='"/usr/local/share/sunpinyin"' -I. -Isrc -Isrc/lexicon -Isrc/ime-core -Isrc/slm -Isrc/slm/slmpack -Isrc/slm/tools -Isrc/slm/slminfo -Isrc/slm/tslmendian -Isrc/slm/getwordfreq -Isrc/slm/thread -Isrc/slm/ids2ngram -Isrc/slm/slmbuild -Isrc/slm/slmprune -Isrc/slm/mmseg -Isrc/slm/tslminfo -Isrc/slm/slmseg -Isrc/pinyin -I/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/recipe-sysroot-native/usr/include src/slm/sim_sen.cpp
| scons: *** [src/pinyin/pinyin_info.h] Error 1
| scons: building terminated because of errors.
| ERROR: scons build execution failed.

Build system is Ubuntu 18.04.4 LTS

I've followed each step.

$ git clone https://github.com/webosose/build-webos.git

$ mv build-webos webos_rpi4

$ cd webos_rpi4

$ sudo scripts/prerequisites.sh

$ ./mcf -p 10 -b 10 raspberrypi4

$ source oe-init-build-env

$ bitbake webos-image

The OSE version: builds/master/154

commit 01a1b618c7aa17a54cb18c664a6707344b7634b6 (HEAD -> master, tag: v2.3.0, tag: builds/master/154, origin/master, origin/HEAD)
Author: Minjae Kim nate.kim@lge.com
Date: Wed Jan 22 18:50:08 2020 +0900

webos-image: Update layer pins for 2020-01-22 (build 154)

meta-webosose as of 2020-01-22 18:19:43 +0900

82acd7142 com.palm.service.devmode=4
704d31936 ose: activitymanager=5 luna-service2-security-conf=14
        webos-initscripts=42

Am I missed something?

Whole log

user143group143:~/webos_rpi4$ ./mcf -p 10 -b 10 raspberrypi4
2020-02-10T12:49:05 INFO main MCF-6.2.3: Updating build directory
2020-02-10T12:49:05 INFO main Checking for local changes in [bitbake]
2020-02-10T12:49:05 INFO main [bitbake] is up-to-date.
2020-02-10T12:49:05 INFO main Checking for local changes in [oe-core]
2020-02-10T12:49:05 INFO main [oe-core] is up-to-date.
2020-02-10T12:49:05 INFO main Checking for local changes in [meta-oe]
2020-02-10T12:49:05 INFO main Updating [meta-oe]
2020-02-10T12:49:05 INFO main Done updating [meta-oe]
2020-02-10T12:49:05 INFO main Checking for local changes in [meta-updater]
2020-02-10T12:49:06 INFO main [meta-updater] is up-to-date.
2020-02-10T12:49:06 INFO main Checking for local changes in [meta-virtualization]
2020-02-10T12:49:06 INFO main [meta-virtualization] is up-to-date.
2020-02-10T12:49:06 INFO main Checking for local changes in [meta-qt5]
2020-02-10T12:49:06 INFO main Updating [meta-qt5]
2020-02-10T12:49:06 INFO main Done updating [meta-qt5]
2020-02-10T12:49:06 INFO main Checking for local changes in [meta-webosose]
2020-02-10T12:49:06 INFO main Updating [meta-webosose]
2020-02-10T12:49:06 INFO main Done updating [meta-webosose]
2020-02-10T12:49:06 INFO main Checking for local changes in [meta-raspberrypi]
2020-02-10T12:49:06 INFO main [meta-raspberrypi] is up-to-date.
2020-02-10T12:49:06 INFO main Checking for local changes in [meta-security]
2020-02-10T12:49:06 INFO main [meta-security] is up-to-date.
2020-02-10T12:49:06 INFO main Repo Update Summary
2020-02-10T12:49:06 INFO main ===================
2020-02-10T12:49:06 INFO main No local changes found
2020-02-10T12:49:06 WARNING main WARNING: ICECC package installation check failed, disabling build from using ICECC.
2020-02-10T12:49:06 INFO main MCF-6.2.3: Configuring build directory BUILD
2020-02-10T12:49:06 INFO main MCF-6.2.3: Done configuring build directory BUILD
2020-02-10T12:49:06 WARNING main No mirror for github.com was detected, please define mirrors in ~/.gitconfig if some are available
2020-02-10T12:49:06 INFO main Done.
user143group143:~/webos_rpi4$ source oe-init-build-env
Altered environment for raspberrypi4@webos development
user143group143:~/webos_rpi4$ bitbake webos-image
Parsing recipes: 100% |#################################################################################################################################| Time: 0:00:22
Parsing of 2607 .bb files complete (0 cached, 2607 parsed). 3622 targets, 374 skipped, 44 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "1.40.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-18.04"
TARGET_SYS = "arm-webos-linux-gnueabi"
MACHINE = "raspberrypi4"
DISTRO = "webos"
DISTRO_VERSION = "1.0.g"
TUNE_FEATURES = "arm armv7ve vfp thumb neon vfpv4 callconvention-hard cortexa7"
TARGET_FPU = "hard"
WEBOS_DISTRO_RELEASE_CODENAME = "webos-master"
WEBOS_DISTRO_BUILD_ID = "unofficial"
WEBOS_DISTRO_TOPDIR_REVISION = "01a1b618c7aa17a54cb18c664a6707344b7634b6"
WEBOS_DISTRO_TOPDIR_DESCRIBE = "builds/master/154"
DATETIME = "20200210034944"
meta-security = "thud:31dc4e7532fa7a82060e0b50e5eb8d0414aa7e93"
meta-webos-smack
meta-webos-virtualization
meta-webos-updater
meta-webos-raspberrypi = "master:82acd7142e93f9b61b78d6f27d825350d82d03e7"
meta-raspberrypi = "thud:4e5be97d75668804694412f9b86e9291edb38b9d"
meta-webos
meta-webos-backports-3.0
meta-webos-backports-2.7 = "master:82acd7142e93f9b61b78d6f27d825350d82d03e7"
meta-qt5 = "warrior:171871280307126c94faeeb90fb635a26495459d"
meta-virtualization = "thud:7685c7d415e0002c448007960837ae8898cd57a5"
meta-updater = "thud:0b087a34b708bfd808a013b3656f543d2709692e"
meta-filesystems
meta-python
meta-networking
meta-multimedia
meta-oe = "thud:446bd615fd7cb9bc7a159fe5c2019ed08d1a7a93"
meta = "thud:cd7cf933b3235560ec71576d8f3836dff736a39f"

Initialising tasks: 100% |##############################################################################################################################| Time: 0:00:08
Sstate summary: Wanted 2731 Found 944 Missed 1787 Current 0 (34% match, 0% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: g-media-pipeline-1.0.0-21-r4 do_patch:
Some of the context lines in patches were ignored. This can lead to incorrectly applied patches.
The context lines in the patches can be updated with devtool:

devtool modify <recipe>
devtool finish --force-patch-refresh <recipe> <layer_path>

Then the updated patches and the source tree (in devtool's workspace)
should be reviewed to make sure the patches apply in the correct place
and don't introduce duplicate lines (which can, and does happen
when some of the context is ignored). Further information:
http://lists.openembedded.org/pipermail/openembedded-core/2018-March/148675.html
https://bugzilla.yoctoproject.org/show_bug.cgi?id=10450
Details:
Applying patch 0001-Add-raspberrypi4-and-raspberrypi4-64-targets.patch
patching file CMakeLists.txt
Hunk #1 succeeded at 34 with fuzz 1.

Now at patch 0001-Add-raspberrypi4-and-raspberrypi4-64-targets.patch
WARNING: connman-1.35-r0 do_patch:
Some of the context lines in patches were ignored. This can lead to incorrectly applied patches.
The context lines in the patches can be updated with devtool:

devtool modify <recipe>
devtool finish --force-patch-refresh <recipe> <layer_path>

Then the updated patches and the source tree (in devtool's workspace)
should be reviewed to make sure the patches apply in the correct place
and don't introduce duplicate lines (which can, and does happen
when some of the context is ignored). Further information:
http://lists.openembedded.org/pipermail/openembedded-core/2018-March/148675.html
https://bugzilla.yoctoproject.org/show_bug.cgi?id=10450
Details:
Applying patch 0011-Provide-station-information-when-AP-mode.patch
patching file gsupplicant/gsupplicant.h
patching file gsupplicant/supplicant.c
patching file include/technology.h
patching file plugins/wifi.c
Hunk #1 succeeded at 3286 (offset -1 lines).
Hunk #2 succeeded at 3525 (offset -1 lines).
patching file src/connman.h
patching file src/manager.c
patching file src/technology.c
Hunk #1 succeeded at 2074 (offset -44 lines).
patching file src/tethering.c
Hunk #1 succeeded at 29 with fuzz 1.
Hunk #2 succeeded at 52 (offset -2 lines).
Hunk #3 succeeded at 63 (offset -2 lines).
Hunk #4 succeeded at 80 (offset -2 lines).
Hunk #5 succeeded at 749 (offset -2 lines).
Hunk #6 succeeded at 772 (offset -2 lines).

Now at patch 0011-Provide-station-information-when-AP-mode.patch
ERROR: sunpinyin-native-2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1 do_compile: scons build execution failed.
ERROR: sunpinyin-native-2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1 do_compile: Function failed: do_compile (log file is located at /home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/temp/log.do_compile.9642)
ERROR: Logfile of failure stored in: /home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/temp/log.do_compile.9642
Log data follows:
| DEBUG: Executing shell function do_compile
| scons: Reading SConscript files ...
| Checking for pkg-config... yes
| Checking for sqlite3... yes
| Checking for C header file assert.h... yes
| Checking for C function bind_textdomain_codeset()... yes
| Checking for C function dcgettext()... yes
| Checking for C function exp2()... no
| Checking for C header file fcntl.h... yes
| Checking for C header file getopt.h... yes
| Checking for C function getopt_long()... yes
| Checking for C function getpagesize()... yes
| Checking for C function get_opt()... no
| Checking for C header file iconv.h... yes
| Checking for C header file inttypes.h... yes
| Checking for C header file locale.h... yes
| Checking for C header file libintl.h... yes
| Checking for C header file limits.h... yes
| Checking for C header file locale.h... yes
| Checking for C function log2()... no
| Checking for C header file memory.h... yes
| Checking for C function memset()... yes
| Checking for C function mmap()... yes
| Checking for C function munmap()... yes
| Checking for C function setlocale()... yes
| Checking for C header file sys/mman.h... yes
| Checking for C header file sys/param.h... yes
| Checking for C header file sys/stat.h... yes
| Checking for C header file sys/types.h... yes
| Checking for C header file unistd.h... yes
| Checking for C header file wchar.h... yes
| sh: line 0: cd: Dictionary: No such file or directory
| make: *** No targets specified and no makefile found. Stop.
| scons: done reading SConscript files.
| scons: Building targets ...
| Creating 'doc/SLM-inst.mk'
| Creating 'doc/README'
| Install file: "doc/SLM-train.mk" as "Dictionary/SLM-train.mk"
| Install file: "/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/dict.utf8" as "Dictionary/dict.utf8"
| scons: Configure: creating config.h
| g++ -o src/slm/tslmendian/writer.o -c -isystem/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/recipe-sysroot-native/usr/include -O2 -pipe -pipe -DHAVE_CONFIG_H -DSUNPINYIN_DATA_DIR='"/usr/local/share/sunpinyin"' -I. -Isrc -Isrc/lexicon -Isrc/ime-core -Isrc/slm -Isrc/slm/slmpack -Isrc/slm/tools -Isrc/slm/slminfo -Isrc/slm/tslmendian -Isrc/slm/getwordfreq -Isrc/slm/thread -Isrc/slm/ids2ngram -Isrc/slm/slmbuild -Isrc/slm/slmprune -Isrc/slm/mmseg -Isrc/slm/tslminfo -Isrc/slm/slmseg -Isrc/pinyin -I/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/recipe-sysroot-native/usr/include src/slm/tslmendian/writer.cpp
| cd python && ./pinyin_info_gen.py > ../src/pinyin/pinyin_info.h
| File "./pinyin_info_gen.py", line 41
| print 'static const char *%s[] = { %s };' % (name, ', '.join ('"%s"' % s for s in var))
| ^
| SyntaxError: invalid syntax
| Install file: "/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/lm_sc.3gm.arpa" as "Dictionary/lm_sc.3gm.arpa"
| g++ -o src/slm/sim_dict.o -c -isystem/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/recipe-sysroot-native/usr/include -O2 -pipe -pipe -DHAVE_CONFIG_H -DSUNPINYIN_DATA_DIR='"/usr/local/share/sunpinyin"' -I. -Isrc -Isrc/lexicon -Isrc/ime-core -Isrc/slm -Isrc/slm/slmpack -Isrc/slm/tools -Isrc/slm/slminfo -Isrc/slm/tslmendian -Isrc/slm/getwordfreq -Isrc/slm/thread -Isrc/slm/ids2ngram -Isrc/slm/slmbuild -Isrc/slm/slmprune -Isrc/slm/mmseg -Isrc/slm/tslminfo -Isrc/slm/slmseg -Isrc/pinyin -I/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/recipe-sysroot-native/usr/include src/slm/sim_dict.cpp
| g++ -o src/slm/sim_sen.o -c -isystem/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/recipe-sysroot-native/usr/include -O2 -pipe -pipe -DHAVE_CONFIG_H -DSUNPINYIN_DATA_DIR='"/usr/local/share/sunpinyin"' -I. -Isrc -Isrc/lexicon -Isrc/ime-core -Isrc/slm -Isrc/slm/slmpack -Isrc/slm/tools -Isrc/slm/slminfo -Isrc/slm/tslmendian -Isrc/slm/getwordfreq -Isrc/slm/thread -Isrc/slm/ids2ngram -Isrc/slm/slmbuild -Isrc/slm/slmprune -Isrc/slm/mmseg -Isrc/slm/tslminfo -Isrc/slm/slmseg -Isrc/pinyin -I/home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/recipe-sysroot-native/usr/include src/slm/sim_sen.cpp
| scons: *** [src/pinyin/pinyin_info.h] Error 1
| scons: building terminated because of errors.
| ERROR: scons build execution failed.
| WARNING: /home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/temp/run.do_compile.9642:1 exit 1 from 'exit 1'
| ERROR: Function failed: do_compile (log file is located at /home/user143/webos_rpi4/BUILD/work/x86_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+e3c122ed3b-r1/temp/log.do_compile.9642)
ERROR: Task (virtual:native:/home/user143/webos_rpi4/meta-webosose/meta-webos/recipes-upstreamable/sunpinyin/sunpinyin.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4762 tasks of which 2505 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Build completion summary:
NOTE: do_populate_sysroot: 100.0% sstate reuse(348 setscene, 0 scratch)
NOTE: do_package: 100.0% sstate reuse(299 setscene, 0 scratch)
NOTE: do_packagedata: 100.0% sstate reuse(266 setscene, 0 scratch)
NOTE: do_package_write_ipk: 100.0% sstate reuse(27 setscene, 0 scratch)

Summary: 1 task failed:
virtual:native:/home/user143/webos_rpi4/meta-webosose/meta-webos/recipes-upstreamable/sunpinyin/sunpinyin.bb:do_compile
Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
user143group143:~/webos_rpi4$

Build machine has python3 as default and it's version is 3.6.9.

user143group143:~/webos_rpi4$ python
Python 3.6.9 (default, Nov 7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

KeyboardInterrupt

[1]+ Stopped python
user143group143:~/webos_rpi4$ python2
Python 2.7.17 (default, Nov 7 2019, 10:07:09)
[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.

KeyboardInterrupt

[3]+ Stopped python2

Hi @re0201, welcome to the forum.

Could you set Python 2.7 as default and build the whole process again?
If it won't work, use lower mcf value (2~3) and try it again.

Please let me know the result.

Thanks.

Hello @NERGI,
Build succeeded after swapping python2 as default.
Thanks for your advice.

1 Like

It's caused by toxic behavior of meta-updater layer:

I've already reported it to that layer:

and here is simple work around for webOS OSE:

1 Like