So I've build qt5-5.15.2 but I'm not sure if it works. I've tried installing python3-pyqt5 from pip but got the error:
Code: Select all
symbol _ZdlPvm version Qt_5 not defined in file libQt5Core.so.5 with link time reference
when trying to run maestral[gui].
I've also tried using fatdog64's native build system (i.e. pkg-build.sh...see instructions) to compile python3-pyqt5.
Source
SRC_URL=https://files.pythonhosted.org/ ... VER.tar.gz
https://pypi.org/project/PyQt5/#modal-close
In this case it fails here:
Code: Select all
export QMAKESPEC=linux-g++-64
python3 configure.py --confirm-license --qsci-api
**these lines are from the recipe file.
with the error:
Code: Select all
Querying qmake about your Qt installation...
Determining the details of your Qt installation...
/opt/qt5/bin/qmake -o cfgtest_QtCore.mk cfgtest_QtCore.pro
Could not find qmake spec 'linux-g++-64'.
This error is rather strange to me because I think these specs exist:
Code: Select all
# pwd
/opt/qt-5.15.2/mkspecs/linux-g++-64
# ls
qmake.conf qplatformdefs.h
qmake.conf has the following:
Code: Select all
# cat qmake.conf
#
# qmake configuration for linux-g++
#
# Written for GNU/Linux platforms that have both lib and lib64 directories,
# like the AMD Opteron.
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
QMAKE_CFLAGS = -m64
QMAKE_LFLAGS = -m64
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
QMAKE_LIBDIR_X11 = /usr/X11R6/lib64
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64
load(qt_config)
qplatformdefs.h has the following:
Code: Select all
...
#include "../linux-g++/qplatformdefs.h
Anyway, I looked a bit at where the configure.py failed. It is trying to compile "cfgtest_QtCore.cpp
Code: Select all
#include <QCoreApplication>
#include <QFile>
#include <QLibraryInfo>
#include <QTextStream>
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
QFile outf(argv[1]);
if (!outf.open(QIODevice::WriteOnly|QIODevice::Truncate|QIODevice::Text))
return 1;
QTextStream out(&outf);
// This is not a feature and needs to be handled separately.
#if defined(QT_SHARED) || defined(QT_DLL)
out << "shared\n";
#else
out << "static\n";
#endif
// Determine which features should be disabled.
#if defined(QT_NO_PROCESS)
out << "PyQt_Process\n";
#endif
#if QT_VERSION < 0x050200
// This is the test used in qglobal.h in Qt prior to v5.2. In v5.2 and later
// qreal is double unless QT_COORD_TYPE is defined.
#if defined(QT_NO_FPU) || defined(Q_PROCESSOR_ARM) || defined(Q_OS_WINCE)
out << "PyQt_qreal_double\n";
#endif
#else
if (sizeof (qreal) != sizeof (double))
out << "PyQt_qreal_double\n";
#endif
#if !defined(Q_COMPILER_CONSTEXPR) || !defined(Q_COMPILER_UNIFORM_INIT)
out << "PyQt_CONSTEXPR\n";
#endif
return 0;
}
on line 709 of configure.py we have:
Code: Select all
# Compile and run the QtCore test program.
test = compile_test_program(self, verbose, 'QtCore', debug=debug)
if test is None:
error("Failed to determine the detail of your Qt installation. Try again using the --verbose flag to see more detail about the problem.")
Here is the program which compiles the test program (line 2406 of configure.py):
Code: Select all
def compile_test_program(target_config, verbose, mname, source=None, debug=None):
""" Compile the source of a Qt program and return the name of the
executable or None if it couldn't be created. target_config is the target
configuration. verbose is set if the output is to be displayed. mname is
the name of the PyQt module being tested. source is the C++ source of the
program. If it is None then the source is expected to be found in the
config-tests directory. debug is set if debug, rather than release, mode
is to be used. If it is None then the mode is taken from the target
configuration.
"""
metadata = MODULE_METADATA[mname]
# The derived file names.
name = 'cfgtest_' + mname
name_pro = name + '.pro'
name_makefile = name + '.mk'
name_source = name + '.cpp'
# Create the source file if necessary.
if source is None:
name_source = source_path('config-tests', name_source)
else:
f = open_for_writing(name_source)
f.write(source)
f.close()
# Create the .pro file.
pro_lines = []
pro_add_qt_dependencies(target_config, metadata, pro_lines, debug)
pro_lines.append('TARGET = %s' % name)
pro_lines.append('SOURCES = %s' % qmake_quote(name_source))
f = open_for_writing(name_pro)
f.write('\n'.join(pro_lines))
f.close()
if not run_qmake(target_config, verbose, name_pro, name_makefile, fatal=False):
return None
return run_make(target_config, verbose, name, name_makefile)
on line 2078 we have:
Code: Select all
def run_qmake(target_config, verbose, pro_name, makefile_name='', fatal=True, recursive=False):
""" Run qmake against a .pro file. target_config is the target
configuration. verbose is set if the output is to be displayed. pro_name
is the name of the .pro file. makefile_name is the name of the makefile
to generate (and defaults to Makefile). fatal is set if a qmake failure is
considered a fatal error, otherwise False is returned if qmake fails.
recursive is set to use the -recursive flag.
"""
# qmake doesn't behave consistently if it is not run from the directory
# containing the .pro file - so make sure it is.
pro_dir, pro_file = os.path.split(pro_name)
if pro_dir != '':
cwd = os.getcwd()
os.chdir(pro_dir)
else:
cwd = None
mf = makefile_name if makefile_name != '' else 'Makefile'
remove_file(mf)
args = [quote(target_config.qmake)]
if target_config.qmake_spec != target_config.qmake_spec_default:
args.append('-spec')
args.append(target_config.qmake_spec)
if makefile_name != '':
args.append('-o')
args.append(makefile_name)
if recursive:
args.append('-recursive')
args.append(pro_file)
run_command(' '.join(args), verbose)
if not os.access(mf, os.F_OK):
if fatal:
error(
"%s failed to create a makefile from %s." %
(target_config.qmake, pro_name))
return False
# Restore the current directory.
if cwd is not None:
os.chdir(cwd)
return True
So anyway, all this python code is meant to run the following shell command:
Code: Select all
/opt/qt5/bin/qmake -o cfgtest_QtCore.mk cfgtest_QtCore.pro
but none of these files are actually in the config-tests directory, and so if you try running this command directly in this directory you get the error:
Code: Select all
Cannot find file: cfgtest_QtCore.pro.
So we see that cfgtest_QtCore.mk is supposed to be generated from cfgtest_QtCore.cpp before the qmake command is called but I'm not sure where/when it is generated.