Linux installer: Check for libEGL as the QtGui module in Qt 6 links against it and many Linux servers dont have it installed

This commit is contained in:
Kovid Goyal 2022-07-14 23:57:15 +05:30
parent 4cc4dab234
commit d413327e81
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 24 additions and 0 deletions

View File

@ -742,6 +742,16 @@ def check_umask():
raise SystemExit('The system umask is unsuitable, aborting') raise SystemExit('The system umask is unsuitable, aborting')
def check_for_libEGL():
import ctypes
try:
ctypes.CDLL('libEGL.so.1')
return
except Exception:
pass
raise SystemExit('You are missing the system library libEGL.so.1. Try installing packages such as libegl1 and libopengl1')
def check_glibc_version(min_required=(2, 31), release_date='2020-02-01'): def check_glibc_version(min_required=(2, 31), release_date='2020-02-01'):
# See https://sourceware.org/glibc/wiki/Glibc%20Timeline # See https://sourceware.org/glibc/wiki/Glibc%20Timeline
import ctypes import ctypes
@ -776,6 +786,8 @@ def main(install_dir=None, isolated=False, bin_dir=None, share_dir=None, ignore_
if q >= key: if q >= key:
check_glibc_version(**glibc_versions[key]) check_glibc_version(**glibc_versions[key])
break break
if q[0] >= 6:
check_for_libEGL()
run_installer(install_dir, isolated, bin_dir, share_dir, version) run_installer(install_dir, isolated, bin_dir, share_dir, version)

View File

@ -791,6 +791,16 @@ def check_umask():
raise SystemExit('The system umask is unsuitable, aborting') raise SystemExit('The system umask is unsuitable, aborting')
def check_for_libEGL():
import ctypes
try:
ctypes.CDLL('libEGL.so.1')
return
except Exception:
pass
raise SystemExit('You are missing the system library libEGL.so.1. Try installing packages such as libegl1 and libopengl1')
def check_glibc_version(min_required=(2, 31), release_date='2020-02-01'): def check_glibc_version(min_required=(2, 31), release_date='2020-02-01'):
# See https://sourceware.org/glibc/wiki/Glibc%20Timeline # See https://sourceware.org/glibc/wiki/Glibc%20Timeline
import ctypes import ctypes
@ -825,6 +835,8 @@ def main(install_dir=None, isolated=False, bin_dir=None, share_dir=None, ignore_
if q >= key: if q >= key:
check_glibc_version(**glibc_versions[key]) check_glibc_version(**glibc_versions[key])
break break
if q[0] >= 6:
check_for_libEGL()
run_installer(install_dir, isolated, bin_dir, share_dir, version) run_installer(install_dir, isolated, bin_dir, share_dir, version)