# Build failed for Rpi4

**URL:** <https://forum.webosose.org/t/build-failed-for-rpi4/1157>\
**Category:** Platform Development\
**Created:** [July 24, 2020, 2:11am UTC](https://forum.webosose.org/t/build-failed-for-rpi4/1157 "2020-07-24T02:11:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![attime73](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@attime73](https://forum.webosose.org/u/attime73)\
**Post date:** [July 24, 2020, 2:11am UTC](https://forum.webosose.org/t/build-failed-for-rpi4/1157/1 "2020-07-24T02:11:48Z")

</div>

Dear Forum members,

## I got an error for building Rpi4 image. The error was occurred at do\_compile stage for sunpinyin package.

| src/slm/thread/slmthread.cpp:60:12: error: ‘std::log2’ has not been declared  
| using std::log2;  
| ^  
| src/slm/thread/slmthread.cpp:62:12: error: ‘std::exp2’ has not been declared

| using std::exp2; |
| --- |

Please let me know the solution of that.  
Detailed error log is as follows.  
Thank you.

OS : Ubuntu 16.04 LTS (64bit)

## error log

lge@lge-Ubuntu-PC:~/work/webos/build-webos$ bitbake webos-image  
WARNING: Host distribution "ubuntu-16.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.  
Parsing recipes: 100% |##########################################| Time: 0:01:19  
Parsing of 2614 .bb files complete (0 cached, 2614 parsed). 3639 targets, 455 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-16.04"  
TARGET\_SYS = "arm-webos-linux-gnueabi"  
MACHINE = "raspberrypi4"  
DISTRO = "webos"  
DISTRO\_VERSION = "2.6.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 = "253b139a54ee4ca74711dea6a895fe94a3d936a4"  
WEBOS\_DISTRO\_TOPDIR\_DESCRIBE = "v2.6.0"  
DATETIME = "20200722104950"  
meta-security = "thud:31dc4e7532fa7a82060e0b50e5eb8d0414aa7e93"  
meta-webos-smack  
meta-webos-virtualization  
meta-webos-updater  
meta-webos-raspberrypi = "master:90462598770e17c4da6b405a4e93354c5534c815"  
meta-raspberrypi = "thud:4e5be97d75668804694412f9b86e9291edb38b9d"  
meta-webos  
meta-webos-backports-3.1  
meta-webos-backports-3.0  
meta-webos-backports-2.7 = "master:90462598770e17c4da6b405a4e93354c5534c815"  
meta-qt5 = "warrior:7d0b17aa229edc9e138edfe0e8477fbbe9013ba6"  
meta-virtualization = "thud:7685c7d415e0002c448007960837ae8898cd57a5"  
meta-updater = "thud:24a560c4285d5d5cf1ce771abe79ce718855d9f3"  
meta-filesystems  
meta-python  
meta-networking  
meta-multimedia  
meta-oe = "thud:446bd615fd7cb9bc7a159fe5c2019ed08d1a7a93"  
meta = "thud:e68991ceb5933f7d03b96697e8a0ba0829feb320"

NOTE: Fetching uninative binary shim from [http://downloads.yoctoproject.org/releases/uninative/2.7/x86\_64-nativesdk-libc.tar.xz;sha256sum=9498d8bba047499999a7310ac2576d0796461184965351a56f6d32c888a1f216](http://downloads.yoctoproject.org/releases/uninative/2.7/x86_64-nativesdk-libc.tar.xz;sha256sum=9498d8bba047499999a7310ac2576d0796461184965351a56f6d32c888a1f216)  
Initialising tasks: 100% |#######################################| Time: 0:00:04  
Sstate summary: Wanted 2759 Found 0 Missed 2759 Current 0 (0% match, 0% complete)  
NOTE: Executing SetScene Tasks  
NOTE: Executing RunQueue Tasks  
WARNING: gmp-native-6.1.2-r0 do\_fetch: Failed to fetch URL [https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2](https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2), attempting MIRRORS if available  
WARNING: icu-native-62.1-r0 do\_fetch: Checksum mismatch for local file /home/lge/work/webos/build-webos/downloads/icu4c-62\_1-src.tgz  
Cleaning and trying again.  
WARNING: icu-native-62.1-r0 do\_fetch: Renaming /home/lge/work/webos/build-webos/downloads/icu4c-62\_1-src.tgz to /home/lge/work/webos/build-webos/downloads/icu4c-62\_1-src.tgz\_bad-checksum\_dc4ae6ad55869e1c723c5b161b6d450b  
WARNING: icu-native-62.1-r0 do\_fetch: Checksum failure encountered with download of [http://download.icu-project.org/files/icu4c/62.1/icu4c-62\_1-src.tgz](http://download.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz) - will attempt other sources if available  
WARNING: iso-codes-4.1-r0 do\_fetch: Failed to fetch URL git://salsa.debian.org/iso-codes-team/iso-codes.git;protocol=http, attempting MIRRORS if available  
WARNING: libxml++-2.40.1-r0 do\_fetch: Failed to fetch URL [http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.40/libxml++-2.40.1.tar.xz](http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.40/libxml++-2.40.1.tar.xz), attempting MIRRORS if available  
WARNING: babeltrace-1.5.6-r0 do\_fetch: Failed to fetch URL git://git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-1.5, attempting MIRRORS if available  
WARNING: ppp-2.4.7-r0 do\_fetch: Failed to fetch URL [https://download.samba.org/pub/ppp/ppp-2.4.7.tar.gz](https://download.samba.org/pub/ppp/ppp-2.4.7.tar.gz), attempting MIRRORS if available  
WARNING: mpg123-1.25.10-r0 do\_fetch: Failed to fetch URL [https://www.mpg123.de/download/mpg123-1.25.10.tar.bz2](https://www.mpg123.de/download/mpg123-1.25.10.tar.bz2), attempting MIRRORS if available  
WARNING: ntp-4.2.8p13-r0 do\_fetch: Checksum mismatch for local file /home/lge/work/webos/build-webos/downloads/ntp-4.2.8p13.tar.gz  
Cleaning and trying again.  
WARNING: ntp-4.2.8p13-r0 do\_fetch: Renaming /home/lge/work/webos/build-webos/downloads/ntp-4.2.8p13.tar.gz to /home/lge/work/webos/build-webos/downloads/ntp-4.2.8p13.tar.gz\_bad-checksum\_19bb20214e0a88629e17a5b6c605d45d  
WARNING: ntp-4.2.8p13-r0 do\_fetch: Checksum failure encountered with download of [http://www.eecis.udel.edu/~ntp/ntp\_spool/ntp4/ntp-4.2/ntp-4.2.8p13.tar.gz](http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p13.tar.gz) - will attempt other sources if available  
ERROR: sunpinyin-native-2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3 do\_compile: scons build execution failed.  
ERROR: sunpinyin-native-2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3 do\_compile: Function failed: do\_compile (log file is located at /home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/temp/log.do\_compile.13328)  
ERROR: Logfile of failure stored in: /home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/temp/log.do\_compile.13328  
Log data follows:  
| DEBUG: Executing shell function do\_compile  
| scons: Reading SConscript files ...  
| Warning: you've set CC in the environmental variable!  
| Warning: you've set CXX in the environmental variable!  
| Warning: you've set CFLAGS in the environmental variable!  
| Warning: you've set CXXFLAGS in the environmental variable!  
| Warning: you've set LDFLAGS in the environmental variable!  
| Warning: you've set MAKE in the environmental variable!  
| 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: 1: cd: can't cd to Dictionary  
| 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-inst.mk" as "Dictionary/SLM-inst.mk"  
| Install file: "doc/README" as "Dictionary/README"  
| Install file: "Dictionary/SLM-inst.mk" as "Dictionary/Makefile"  
| Install file: "doc/SLM-train.mk" as "Dictionary/SLM-train.mk"  
| Install file: "/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/dict.utf8" as "Dictionary/dict.utf8"  
| scons: Configure: creating config.h  
| g++ -o src/portability.o -c -isystem/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/usr/include -O2 -pipe -pipe -DHAVE\_CONFIG\_H -DSUNPINYIN\_DATA\_DIR='"/usr/local/share/sunpinyin"' -I. -Isrc -Isrc/ime-core -Isrc/slm -Isrc/slm/slmseg -Isrc/slm/thread -Isrc/slm/tools -Isrc/slm/slmpack -Isrc/slm/getwordfreq -Isrc/slm/tslminfo -Isrc/slm/slmbuild -Isrc/slm/mmseg -Isrc/slm/slmprune -Isrc/slm/slminfo -Isrc/slm/tslmendian -Isrc/slm/ids2ngram -Isrc/lexicon -Isrc/pinyin -I/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/usr/include src/portability.cpp  
| g++ -o src/slm/slm.o -c -isystem/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/usr/include -O2 -pipe -pipe -DHAVE\_CONFIG\_H -DSUNPINYIN\_DATA\_DIR='"/usr/local/share/sunpinyin"' -I. -Isrc -Isrc/ime-core -Isrc/slm -Isrc/slm/slmseg -Isrc/slm/thread -Isrc/slm/tools -Isrc/slm/slmpack -Isrc/slm/getwordfreq -Isrc/slm/tslminfo -Isrc/slm/slmbuild -Isrc/slm/mmseg -Isrc/slm/slmprune -Isrc/slm/slminfo -Isrc/slm/tslmendian -Isrc/slm/ids2ngram -Isrc/lexicon -Isrc/pinyin -I/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/usr/include src/slm/slm.cpp

.  
.  
.

| g++ -o src/slm/thread/slmthread.o -c -isystem/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/usr/include -O2 -pipe -pipe -DHAVE\_CONFIG\_H -DSUNPINYIN\_DATA\_DIR='"/usr/local/share/sunpinyin"' -I. -Isrc -Isrc/ime-core -Isrc/slm -Isrc/slm/slmseg -Isrc/slm/thread -Isrc/slm/tools -Isrc/slm/slmpack -Isrc/slm/getwordfreq -Isrc/slm/tslminfo -Isrc/slm/slmbuild -Isrc/slm/mmseg -Isrc/slm/slmprune -Isrc/slm/slminfo -Isrc/slm/tslmendian -Isrc/slm/ids2ngram -Isrc/lexicon -Isrc/pinyin -I/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/usr/include src/slm/thread/slmthread.cpp  
| g++ -o src/slmseg -L/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/usr/lib -L/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/lib -Wl,-rpath-link,/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/lib -Wl,-rpath,/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/lge/work/webos/build-webos/BUILD/sysroots-uninative/x86\_64-linux/lib/ld-linux-x86-64.so.2 src/portability.o src/slm/sim\_dict.o src/slm/sim\_sen.o src/slm/slm.o src/slm/slmseg/slmseg.o -L/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/usr/lib -lsqlite3  
| src/slm/thread/slmthread.cpp:60:12: error: ‘std::log2’ has not been declared  
| using std::log2;  
| ^  
| src/slm/thread/slmthread.cpp:62:12: error: ‘std::exp2’ has not been declared  
| using std::exp2;  
| ^  
| Install file: "src/slmseg" as "Dictionary/slmseg"  
| Creating 'src/sunpinyin-dictgen.mk'  
| Copy("src/sunpinyin-dictgen", "src/sunpinyin-dictgen.mk")  
| Chmod("src/sunpinyin-dictgen", 0755)  
| Install file: "src/sunpinyin-dictgen" as "Dictionary/sunpinyin-dictgen"  
| g++ -o src/slm/tslmendian/slm\_file.o -c -isystem/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/usr/include -O2 -pipe -pipe -DHAVE\_CONFIG\_H -DSUNPINYIN\_DATA\_DIR='"/usr/local/share/sunpinyin"' -I. -Isrc -Isrc/ime-core -Isrc/slm -Isrc/slm/slmseg -Isrc/slm/thread -Isrc/slm/tools -Isrc/slm/slmpack -Isrc/slm/getwordfreq -Isrc/slm/tslminfo -Isrc/slm/slmbuild -Isrc/slm/mmseg -Isrc/slm/slmprune -Isrc/slm/slminfo -Isrc/slm/tslmendian -Isrc/slm/ids2ngram -Isrc/lexicon -Isrc/pinyin -I/home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/recipe-sysroot-native/usr/include src/slm/tslmendian/slm\_file.cpp  
| scons: \*\*\* [src/slm/thread/slmthread.o] Error 1  
| scons: building terminated because of errors.  
| ERROR: scons build execution failed.  
| WARNING: exit code 1 from a shell command.  
| ERROR: Function failed: do\_compile (log file is located at /home/lge/work/webos/build-webos/BUILD/work/x86\_64-linux/sunpinyin-native/2.99+3.0.0-rc1+gitAUTOINC+f39c195db0-r3/temp/log.do\_compile.13328)  
ERROR: Task (virtual:native:/home/lge/work/webos/build-webos/meta-webosose/meta-webos/recipes-upstreamable/sunpinyin/sunpinyin.bb:do\_compile) failed with exit code '1'  
NOTE: Tasks Summary: Attempted 4827 tasks of which 0 didn't need to be rerun and 1 failed.  
NOTE: Writing buildhistory  
NOTE: Build completion summary:  
NOTE: do\_populate\_sysroot: 0.0% sstate reuse(0 setscene, 353 scratch)  
NOTE: do\_package: 0.0% sstate reuse(0 setscene, 300 scratch)  
NOTE: do\_packagedata: 0.0% sstate reuse(0 setscene, 268 scratch)  
NOTE: do\_package\_write\_ipk: 0.0% sstate reuse(0 setscene, 27 scratch)

## Summary: 1 task failed: virtual:native:/home/lge/work/webos/build-webos/meta-webosose/meta-webos/recipes-upstreamable/sunpinyin/sunpinyin.bb:do\_compile Summary: There were 13 WARNING messages shown. Summary: There were 2 ERROR messages shown, returning a non-zero exit code. lge@lge-Ubuntu-PC:~/work/webos/build-webos$

---

<div class="post-metadata">

**Author:** ![dpmin](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@dpmin](https://forum.webosose.org/u/dpmin)\
**Post date:** [August 2, 2020, 8:52am UTC](https://forum.webosose.org/t/build-failed-for-rpi4/1157/2 "2020-08-02T08:52:19Z")

</div>

Hi,  
Please try to build with ubuntu-18.04
