QtWebengine build error with opus and silk codecs
-
Then you should create your own mkspecs that sets the correct flags for your processor.
-
@SGaist I am using my own qmake.conf.
# # qmake configuration for building with arm400-linux-g++ # MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib include(../common/linux.conf) include(../common/gcc-base-unix.conf) include(../common/g++-unix.conf) # modifications to g++.conf QMAKE_INCDIR +=/opt/arm400-linux/target/usr/include QMAKE_LIBDIR +=/opt/arm400-linux/target/usr/lib QMAKE_CC = arm400-linux-gcc QMAKE_CXX = arm400-linux-g++ QMAKE_LINK = arm400-linux-g++ -L/opt/arm400-linux/target/usr/lib -Wl,-rpath -Wl,/opt/arm400-linux/target/usr/lib QMAKE_LINK_SHLIB = arm400-linux-g++ -L/opt/arm400-linux/target/usr/lib -Wl,-rpath -Wl,/opt/arm400-linux/target/usr/lib QMAKE_CFLAGS_RELEASE += -march=armv7-a -mcpu=cortex-a9 QMAKE_CXXFLAGS_RELEASE += -march=armv7-a -mcpu=cortex-a9 # modifications to linux.conf QMAKE_AR = arm400-linux-ar cqs QMAKE_OBJCOPY = arm400-linux-objcopy QMAKE_STRIP = arm400-linux-strip load(qt_config)
I tried
QMAKE_CFLAGS_RELEASE += -march=armv7-a -mcpu=cortex-a9 -mfloat-abi=soft QMAKE_CXXFLAGS_RELEASE += -march=armv7-a -mcpu=cortex-a9 -mfloat-abi=soft
But it came out something like "
arm400-linux-g++: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together
". -
From the looks of it, your system looks like the
linux-tegra2-g++
mkspec, maybe this one will be more suited to copy from. -
@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!