QtWebengine build error with opus and silk codecs
-
@SGaist
I have tried all these combinations-mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=vfp
-mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=vfpv3-d16
-mtune=cortex-a9 -march=armv7-a -mhard-float -mfloat-abi=softfp -mfpu=vfpv3-d16
and i got the same error
libxxxx.a(yyyyy.o) uses VFP register arguments, libQt5WebEngineCore.so.5.9.1 does not
I tried the tegra2 mkspecs, but again another error.
ERROR at //build/config/android/internal_rules.gni:11:1: Assertion failed. assert(is_android) ^----- See //build/config/android/rules.gni:8:1: whence it was imported. import("//build/config/android/internal_rules.gni") ^------------------------------------------------- See //third_party/android_tools/BUILD.gn:5:1: whence it was imported. import("//build/config/android/rules.gni") ^---------------------------------------- See //third_party/openmax_dl/dl/BUILD.gn:199:16: which caused the file to be included. deps = [ "//third_party/android_tools:cpu_features" ] ^----------------------------------------- Project ERROR: GN run error! Makefile:80: recipe for target 'sub-gn_run-pro-make_first' failed make[3]: *** [sub-gn_run-pro-make_first] Error 3 make[3]: Leaving directory '/opt/qt/qt5.9.1arm_source/qt-everywhere-opensource-src-5.9.2/qtwebengine/src/core' Makefile:77: recipe for target 'sub-core-make_first' failed make[2]: *** [sub-core-make_first] Error 2 make[2]: Leaving directory '/opt/qt/qt5.9.1arm_source/qt-everywhere-opensource-src-5.9.2/qtwebengine/src' Makefile:46: recipe for target 'sub-src-make_first' failed make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory '/opt/qt/qt5.9.1arm_source/qt-everywhere-opensource-src-5.9.2/qtwebengine' Makefile:834: recipe for target 'module-qtwebengine-make_first' failed make: *** [module-qtwebengine-make_first] Error 2
-
Might be a silly question but did you nuke properly the build folder between tries ?
-
Ok, so when you said you tried the Tegra2 mkspec, did you just use it or did you copy from it into yours like I suggested ?
-
@SGaist This is how i used it.
include(../common/linux_device_pre.conf) QMAKE_INCDIR_POST += $$[QT_SYSROOT]/usr/include QMAKE_LIBDIR_POST += $$[QT_SYSROOT]/usr/lib QMAKE_RPATHLINKDIR_POST += $$[QT_SYSROOT]/usr/lib QMAKE_CFLAGS += -mtune=cortex-a9 -march=armv7-a -mhard-float -mfloat-abi=softfp -mfpu=vfpv3-d16 QMAKE_CXXFLAGS += -mtune=cortex-a9 -march=armv7-a -mhard-float -mfloat-abi=softfp -mfpu=vfpv3-d16 include(../common/linux_arm_device_post.conf) load(qt_config)
This is my qmake.conf.
-
From a quick look, somewhere around:
src/3rdparty/chromium/breakpad/src/build/common.gypi src/3rdparty/chromium/build/config/compiler/BUILD.gn src/3rdparty/chromium/build/common.gypi src/3rdparty/chromium/native_client/build/standalone_flags.gypi src/3rdparty/chromium/native_client/build/untrusted.gypi ./src/core/config/linux.pri: MFLOAT = $$extractCFlag("-mfloat-abi=.*")
-
Thanks @SGaist. This file had some information. I am not sure with the syntax to make changes in this file.
./src/core/config/linux.pri: MFLOAT = $$extractCFlag("-mfloat-abi=.*")
Whatever values I am giving to
QMAKE_CFLAGS_RELEASE
andQMAKE_CXXXFLAGS_RELEASE
is not what GN build is taking.Maybe if I figure out how to make changes in the file you have mentioned, I might be able to solve this issue.
-
In the file
qtwebengine/src/3rdparty/chromium/third_party/opus/BUILD.gn: use_opus_rtcd = current_cpu == "arm" && (is_win || is_android || is_linux)
qtwebengine/src/3rdparty/chromium/third_party/opus/BUILD.gn: if (use_opus_rtcd) { sources += [ "$target_gen_dir/celt_pitch_xcorr_arm_gnu.S", "src/celt/arm/arm_celt_map.c", "src/celt/arm/armcpu.c", "src/celt/arm/armcpu.h", "src/celt/arm/celt_neon_intr.c", "src/celt/arm/fft_arm.h", "src/celt/arm/mdct_arm.h", "src/celt/arm/pitch_arm.h", "src/silk/arm/NSQ_neon.c", "src/silk/arm/NSQ_neon.h", "src/silk/arm/arm_silk_map.c", ]
As far as I understood if the CPU is based on ARM and the OS is linux
use_opus_rtcd
becomes TRUE. If it becomes true,qtwebengine/src/3rdparty/chromium/third_party/opus/src/celt/arm/armcpu.c
decides whether it have the NEON capabilities. I am trying to see that changing armcpu.c to not to use NEON might work or not. -
The chromium snapshot is outdated. There is already a fix for that!