status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
292 stars 78 forks source link

Setup Linux CI for Qt5.15.8+KDAB using minimum glibc version compatibility #9350

Closed alexjba closed 3 months ago

alexjba commented 1 year ago

Description

Prebuilt binaries of Qt5.15.8 are compiled using glibc 2.28 and migrating to this version will breaking compatibility with older linux versions.

The purpose of this task is to setup the Linux CI to use latest Qt5.15.8 + KDAB fixes and keep the glibc dependency to a lower version (Ideally 2.23 or lower). Also, we will have this issue when moving to Qt6 and solving this will also help long term with newer qt versions.

There are multiple options that could be considered:

  1. Finding an out of the box setup - precompiled Qt binaries compatible with older linux versions
  2. Compiling Qt5.15.8 with KDAB patches + Status and link with glibc 2.23 (probably the easiest way to do it is on a linux distribution that uses this version)
  3. Try this hack https://github.com/wheybags/glibc_version_header and enable Nix environment on CI
  4. https://github.com/phusion/holy-build-box

On the CI side there are two approaches that were considered when migrating to Qt5.15: Docker and Nix. Nix is preferred, but it has the same limitation - will break compatibility with older linux dostros. We're using Docker for now.

See: #9222, #9232

alexjba commented 8 months ago

... @stefandunca, can you please help to understand, how much do we need / use it? @anastasiyaig, can you please continue smoke testing? ...

As discussed privately, we need this for Wallet Connect. There is a workaround using a WebView, but it would require more work to re-implement. Also, the outdated web browser feature for dapp integration, which is now disabled, requires it.

Not sure it would help. It probably depends on what is the root cause of this crash. WebView still depends on WebEngine on linux. https://doc.qt.io/qt-5/qtwebview-index.html

I guess the first step would be to pinpoint the root cause.

anastasiyaig commented 8 months ago

@yakimant i tested this build with my autotests and all looks good. The only thing i noticed, is when i run application in test mode (adding env var STATUS_RUNTIME_TEST_MODE = True) - then my tests cant attach to the nix build. All good in this mode for old build, no errors

Nix build with test mode enabled: https://ci.status.im/job/status-desktop/job/e2e/job/manual/1466/allure/#categories/c4e6cb3e88347080bb258e8e1856aa48/74c37dd22099f53/ imeoutError: Unable to establish TCP connection with localhost:62966.

Normal nightly with test mode enabled: https://ci.status.im/job/status-desktop/job/e2e/job/manual/1467/allure/

Wonder what that could be , because my big hope was to upgrade to 5.15.8 and run my tests with this env var

anastasiyaig commented 7 months ago

I also found this today (just normal run of my tests, no test mode enabled):

aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.33' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.34' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.35' not found (required by /lib/x86_64-linux-gnu/libgcc_s.so.1)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.34' not found (required by /lib/x86_64-linux-gnu/libgcc_s.so.1)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.33' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.34' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.35' not found (required by /lib/x86_64-linux-gnu/libgcc_s.so.1)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.34' not found (required by /lib/x86_64-linux-gnu/libgcc_s.so.1)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.33' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.34' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.35' not found (required by /lib/x86_64-linux-gnu/libgcc_s.so.1)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.34' not found (required by /lib/x86_64-linux-gnu/libgcc_s.so.1)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.33' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.32' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
aut/StatusIm-Desktop-240216-121542-6be832-x86_64.AppImage: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.34' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)

as result, squish cant connect and all tests failed

06:57:16:772 Debug: Using server configuration file '/home/jenkins/workspace/status-desktop/e2e/manual@3/squish.ini'
06:57:16:772 Info: Starting server of Squish version 7.2.1.
06:57:16:773 Debug: Read configuration file '/opt/squish-runner-7.2.1/etc/squishserverrc'
06:57:16:773 Info: Listening on 127.0.0.1:5886
06:57:16:773 Info: Listening on ws://127.0.0.1:45517?tGIe2BW4n3oLux1OFV0W
06:57:16:773 Info: Announcing server presence via SSDP 
06:57:17:776 Warning: Channel Connection closed during handshake:43026 rejected: 127.0.0.1
06:57:17:776 Warning: Channel Connection closed during handshake:43040 rejected: 127.0.0.1
07:21:17:280 Debug: Shutting down server

Logs are available here https://ci.status.im/job/status-desktop/job/e2e/job/manual/1564/

@yakimant do you have any isight what that could be? The host selected was Linux 03, maybe it is not yet properly set up?

yakimant commented 6 months ago

Possible solutions:

What's interesting libc from Nix Store /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6 is searched, not the /lib/... one. Maybe we need to cleanup the /nix/store/... paths from libs.

yakimant commented 5 months ago

We have a progress on qtwebengine/wallet issue after Athens offsite.

The build loads post-login screen: https://ci.status.im/job/status-desktop/job/systems/job/linux/job/x86_64/job/package_nix/38/

@anastasiyaig, can you please have a look? We also nee to sync on the issues you mentioned above.

Meanwhile I will rebase PR from master.

yakimant commented 5 months ago

Doesn't run on 22.04 in my case, just stucks on loading after entering password.

Logs arent different from 20.04 run, but just for the reference, these are the last lines:

Critical: AppMain: Unknown section type (qrc:/app/mainui/AppMain.qml:1169, expression for currentIndex)
Warning: qrc:/app/mainui/AppMain.qml:1139:21: Unable to assign [undefined] to int (qrc:/app/mainui/AppMain.qml:1139, )
Warning: qrc:/app/AppLayouts/Onboarding/OnboardingLayout.qml:151:9: Unable to assign [undefined] to QObject* (qrc:/app/AppLayouts/Onboarding/OnboardingLayout.qml:151, )
Warning: qrc:/main.qml:173:9: Unable to assign [undefined] to QObject* (qrc:/main.qml:173, )
WRN 2024-05-10 12:22:43.493+02:00 Error decoding signal                      topics="signals-manager" tid=12035 file=signals_manager.nim:49 err="Unknown signal received: mediaserver.started"
ERR 2024-05-10 12:22:43.996+02:00 getChatContentModule: unexisting chat key  topics="chat-section-module" tid=12035 file=module.nim:543 chatId= methodName=getChatContentModule
ERR 2024-05-10 12:22:44.061+02:00 getChatContentModule: unexisting chat key  topics="chat-section-module" tid=12035 file=module.nim:543 chatId= methodName=getChatContentModule
ERR 2024-05-10 12:22:44.075+02:00 getChatContentModule: unexisting chat key  topics="chat-section-module" tid=12035 file=module.nim:543 chatId= methodName=getChatContentModule
ERR 2024-05-10 12:22:44.333+02:00 getChatContentModule: unexisting chat key  topics="chat-section-module" tid=12035 file=module.nim:543 chatId= methodName=getChatContentModule
ERR 2024-05-10 12:22:44.336+02:00 getChatContentModule: unexisting chat key  topics="chat-section-module" tid=12035 file=module.nim:543 chatId= methodName=getChatContentModule
ERR 2024-05-10 12:22:44.879+02:00 getChatContentModule: unexisting chat key  topics="chat-section-module" tid=12035 file=module.nim:543 chatId= methodName=getChatContentModule
yakimant commented 5 months ago

Update on current issues:

So I see no blockers. @anastasiyaig, can you confirm, when you are back. Especially the Ubuntu 22.

anastasiyaig commented 5 months ago

sure @yakimant , thanks for your time and effort, i will follow up on that when I am back

yakimant commented 5 months ago

@alexjba, @caybro, if you are interested, here is the build: https://ci.status.im/job/status-desktop/job/systems/job/linux/job/x86_64/job/package_nix/41/

If we don't find blockers - I will polish the code and merge.

The next steps (if everything goes well) would be:

yakimant commented 4 months ago

According to @anastasiyaig, smoke tests are passing. So I will do some cleanup in PR and merge, build will run in parallel.

anastasiyaig commented 4 months ago

yup right we can do more tests afterwards

yakimant commented 3 months ago

Leftovers from https://github.com/status-im/status-desktop/pull/9232:

Next:

This list will be updated

yakimant commented 3 months ago

The latest opensourse version is 5.15.14:

Comercial is 5.15.17:

They delay source code by 1 year, so it will appear like that: