Closed dmik closed 3 years ago
The first one seems to be easy to fix, the second one is more difficult. Apparently, it's GN who's guilty here (GN is a tool that converts a higher level .gn build file to a lower level .ninja one). Qt's gn_generator.prf
does the right job by supplying GN with proper includes in BUILD.gn
it generates:
include_dirs = [
"D:/Users/dmik/rpmbuild/BUILD/qtwebengine/src/core",
"D:/Users/dmik/rpmbuild/BUILD/qtwebengine/src/core/api",
"/@unixroot/usr/include/qt5/QtQuick/5.15.2",
"/@unixroot/usr/include/qt5/QtQuick/5.15.2/QtQuick",
"/@unixroot/usr/include/qt5/QtGui/5.15.2",
"/@unixroot/usr/include/qt5/QtGui/5.15.2/QtGui",
"/@unixroot/usr/include/qt5",
"/@unixroot/usr/include/qt5/QtQuick",
"/@unixroot/usr/include/qt5/QtGui",
"/@unixroot/usr/include/qt5/QtQmlModels/5.15.2",
"/@unixroot/usr/include/qt5/QtQmlModels/5.15.2/QtQmlModels",
"/@unixroot/usr/include/qt5/QtQml/5.15.2",
"/@unixroot/usr/include/qt5/QtQml/5.15.2/QtQml",
"/@unixroot/usr/include/qt5/QtCore/5.15.2",
"/@unixroot/usr/include/qt5/QtCore/5.15.2/QtCore",
"/@unixroot/usr/include/qt5/QtQmlModels",
"/@unixroot/usr/include/qt5/QtWebChannel",
"/@unixroot/usr/include/qt5/QtQml",
"/@unixroot/usr/include/qt5/QtNetwork",
"/@unixroot/usr/include/qt5/QtCore",
"D:/Users/dmik/rpmbuild/BUILD/qtwebengine/include",
"D:/Users/dmik/rpmbuild/BUILD/qtwebengine/include/QtWebEngineCore",
"D:/Users/dmik/rpmbuild/BUILD/qtwebengine/include/QtWebEngineCore/5.15.2",
"D:/Users/dmik/rpmbuild/BUILD/qtwebengine/include/QtWebEngineCore/5.15.2/QtWebEngineCore",
"D:/Users/dmik/rpmbuild/BUILD/qtwebengine/src/core/release/.moc",
rebase_path("$target_gen_dir/.moc/"),
"/@unixroot/usr/lib/qt5/mkspecs/os2-g++"
]
However, when GN generates QtWebEngineCore.ninja
out of it, it becomes:
include_dirs = -I../../3rdparty/chromium/skia/config -I../../3rdparty/chromium/third_party -I../../3rdparty/chromium/third_party/boringssl/src/include -I../../3rdparty/chromium/third_party/skia/include/core -Igen -I../../3rdparty/chromium -ID$:/Users/dmik/rpmbuild/BUILD/qtwebengine/src/core -ID$:/Users/dmik/rpmbuild/BUILD/qtwebengine/src/core/api -I@unixroot/usr/include/qt5/QtQuick/5.15.2 -I@unixroot/usr/include/qt5/QtQuick/5.15.2/QtQuick -I@unixroot/usr/include/qt5/QtGui/5.15.2 -I@unixroot/usr/include/qt5/QtGui/5.15.2/QtGui -I@unixroot/usr/include/qt5 -I@unixroot/usr/include/qt5/QtQuick -I@unixroot/usr/include/qt5/QtGui -I@unixroot/usr/include/qt5/QtQmlModels/5.15.2 -I@unixroot/usr/include/qt5/QtQmlModels/5.15.2/QtQmlModels -I@unixroot/usr/include/qt5/QtQml/5.15.2 -I@unixroot/usr/include/qt5/QtQml/5.15.2/QtQml -I@unixroot/usr/include/qt5/QtCore/5.15.2 -I@unixroot/usr/include/qt5/QtCore/5.15.2/QtCore -I@unixroot/usr/include/qt5/QtQmlModels -I@unixroot/usr/include/qt5/QtWebChannel -I@unixroot/usr/include/qt5/QtQml -I@unixroot/usr/include/qt5/QtNetwork -I@unixroot/usr/include/qt5/QtCore -ID$:/Users/dmik/rpmbuild/BUILD/qtwebengine/include -ID$:/Users/dmik/rpmbuild/BUILD/qtwebengine/include/QtWebEngineCore -ID$:/Users/dmik/rpmbuild/BUILD/qtwebengine/include/QtWebEngineCore/5.15.2 -ID$:/Users/dmik/rpmbuild/BUILD/qtwebengine/include/QtWebEngineCore/5.15.2/QtWebEngineCore -I.moc -Igen/.moc -I@unixroot/usr/lib/qt5/mkspecs/os2-g++ -Igen -Igen -Igen -Igen -I../../3rdparty/chromium/third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../3rdparty/chromium/third_party/libyuv/include -Igen -I../../3rdparty/chromium/third_party/jsoncpp/source/include -I../../3rdparty/chromium/third_party/jsoncpp/generated -Igen -Igen -Igen -Igen -Igen -Igen -Igen -Igen/third_party/dawn/src/include -I../../3rdparty/chromium/third_party/dawn/src/include -I../../3rdparty/chromium/third_party/khronos -I../../3rdparty/chromium/gpu -Igen -I../../3rdparty/chromium/third_party/boringssl/src/include -I../../3rdparty/chromium/third_party/ced/src -I../../3rdparty/chromium/third_party/protobuf/src -Igen/protoc_out -I../../3rdparty/chromium/third_party/protobuf/src -I../../3rdparty/chromium/third_party/webrtc_overrides -I../../3rdparty/chromium/third_party/webrtc -Igen/third_party/webrtc -I../../3rdparty/chromium/third_party/abseil-cpp -I../../3rdparty/chromium/third_party/skia -I../../3rdparty/chromium/third_party/libgifcodec -I../../3rdparty/chromium/third_party/libwebm/source -I../../3rdparty/chromium/third_party/leveldatabase -I../../3rdparty/chromium/third_party/leveldatabase/src -I../../3rdparty/chromium/third_party/leveldatabase/src/include -I../../3rdparty/chromium/v8/include -Igen/v8/include -I../../3rdparty/chromium/third_party/mesa_headers
All built (including QtWebEngine) but another problem. An attempt to start simplebrowser.exe from the RPM install results into this:
[1279:1:0917/153442.274000:ERROR:extension_system_qt.cpp(121)] Failed to parse extension manifest.
Killed by SIGSEGV
pid=0x04ff ppid=0x04fe tid=0x0001 slot=0x00b8 pri=0x0200 mc=0x0001 ps=0x0010
D:\USERS\DMIK\RPMBUILD\BUILD\QTWEBENGINE\EXAMPLES\WEBENGINEWIDGETS\SIMPLEBROWSER\SIMPLEBROWSER.EXE
cs:eip=0083fb24:00000000 ss:esp=0083fb74:0083f818 ebp=00000053
ds=0000 es=0000 fs=20095bc4 gs=0000 efl=00000004
eax=0083f8f8 ebx=1ffc9d7c ecx=0083f90c edx=0083f930 edi=00000000 esi=0083ff3c
Creating 04FF_01.TRP
Moved 04ff_01.TRP to C:\var\log\app\6144b592-04ff_01-SIMPLEBROWSER-exceptq.txt
Segmentation fault
And EXCEPTQ:
______________________________________________________________________
Exception C0000005 - Access Violation
______________________________________________________________________
Process: D:\USERS\DMIK\RPMBUILD\BUILD\QTWEBENGINE\EXAMPLES\WEBENGINEWIDGETS\SIMPLEBROWSER\SIMPLEBROWSER.EXE (09/17/2021 03:01:25 1,918,715)
PID: 4FF (1279)
TID: 01 (1)
Priority: 200
Filename: C:\USR\LIB\QT5WEBC.DLL (09/17/2021 15:10:25 92,189,701)
Address: 005B:B9EE9092 (0001:036B9092)
Cause: Attempted to read from 00000000
(not a valid address)
______________________________________________________________________
Failing Instruction
______________________________________________________________________
B9EE9083 SUB ESP, 0x20 (83ec 20)
B9EE9086 MOV ESI, [ESP+0x30] (8b7424 30)
B9EE908A MOV EDX, [ESP+0x34] (8b5424 34)
B9EE908E MOV EAX, [ESP+0x38] (8b4424 38)
B9EE9092 >CMP BYTE [ESI], 0x6 (803e 06)
B9EE9095 JNZ 0xb9ee9130 (0f85 95000000)
B9EE909B MOV [ESP+0x14], EDX (895424 14)
B9EE909F XOR EDI, EDI (31ff)
______________________________________________________________________
Registers
______________________________________________________________________
EAX : 00000003 EBX : 200BBFA0 ECX : 04FF0001 EDX : BA54F184
ESI : 00000000 EDI : 0083FB24
ESP : 0083FA60 EBP : 0083FB54 EIP : B9EE9092 EFLG : 00010206
CS : 005B CSLIM: FFFFFFFF SS : 0053 SSLIM: FFFFFFFF
EAX : not a valid address
EBX : read/write memory allocated by LIBCN0
ECX : not a valid address
EDX : read/exec memory at 0001:03D2E184 in QT5WEBC
ESI : not a valid address
EDI : read/write memory on this thread's stack
______________________________________________________________________
Stack Info for Thread 01
______________________________________________________________________
Size Base ESP Max Top
00800000 00840000 -> 0083FA60 -> 0083A000 -> 00040000
______________________________________________________________________
Call Stack
______________________________________________________________________
EBP Address Module Obj:Offset Nearest Public Symbol
-------- --------- -------- ------------- -----------------------
Trap -> B9EE9092 QT5WEBC 0001:036B9092 __ZNK4base5Value8FindPathENS_16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE + 12 0001:036B9080 (base_jumbo_35.o)
0083FB54 00000000 Invalid address: 00000000
______________________________________________________________________
This is something new, never seen it before. Perhaps, related to /@unxroot
paths.
It was /@unixroot
indeed. Let's hope it's the last problem.
Seems that all issues are gone now; RPM builds work including web browsers.
One problem is that
--build-id=sha1
now gets passed to the linker when linking any .exe file like this:This doesn't happen in development builds. Needs investigation.
Another problem is that files for the QtWebEngineCore DLL including Qt code are built using ninja/gn. And when cooking ninja build files for them, gn somehow messes up with system (RPM-installed) Qt include paths like
/@unixroot/usr/include/qt5/...
so that they become-I@unixroot/usr/include/...
(note the first slash missing). Of course this makes them relative and GCC fails to find Qt includes like this:The reason why it works in developer builds is because no
/@unixroot
is included there - the development tree is used instead. Needs fixing as well.