Build failed for Rpi4

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
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, 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 - 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, 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, 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, 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 - 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$

Hi,
Please try to build with ubuntu-18.04