@jamesh Ok that does make sense! But, then would it not be possible to have backwards compatibility with 18.04? That is why I was trying to keep it. But so far it looks like it might not be possible as the qt5.15.12 build I am using for 18.04 wants libraries that are not supported anymore.
When trying to unload qt51512 for 18.04 on the container:
dpkg: dependency problems prevent configuration of qt51512:
qt51512 depends on libstdc++6 (>= 9); however:
Version of libstdc++6:amd64 on system is 8.4.0-1ubuntu1~18.04.
When trying to get a newer libstdc++6 with apt upgrade that 8.4 is there highest, therefore cannot move forward.
When trying to unload qt51512 for 18.04 on the local 20.04:
It was complaining about needing dependencies but when trying to download them:
E: Package 'libdouble-conversion1' has no installation candidate
E: Package 'libevent-2.1-6' has no installation candidate
E: Package 'libhunspell-1.6-0' has no installation candidate
E: Package 'libicu60' has no installation candidate
E: Package 'libmysqlclient20' has no installation candidate
So those libraries dont go/exist for 20.04, therefore cannot move forward.
And then alternatively when trying to use the 20.04 qt51512 with the 18.04 container, the glibc errors ensue. So I would be forced to use base20 or higher right and lose backwards compatibility with 18.04?
Also part of the reason I was keeping base18 was because we are using a custom plugin qmakeppa where we defined a python file with the standard class stuff with added things. How do I redo that for 20.04 and snapcraft7? I deliberately have snapcraft6.1 because of that as well.
The plugin snap/plugins/qmakeppa.py (referenced in the wickr part of the yaml file given above):
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2016 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""The qmake plugin is useful for building qmake-based parts.
These are projects that are built using .pro files.
This plugin uses the common plugin keywords as well as those for "sources".
For more information check the 'plugins' topic for the former and the
'sources' topic for the latter.
Additionally, this plugin uses the following plugin-specific keywords:
- options:
(list of strings)
additional options to pass to the qmake invocation.
- qt-version:
(string; default: qt5)
Version of Qt to use with qmake. Valid options are: qt5
- project-files:
(list of strings)
list of .pro files to pass to the qmake invocation.
"""
import os
import snapcraft
from snapcraft import common
class QmakePlugin(snapcraft.BasePlugin):
@classmethod
def schema(cls):
schema = super().schema()
schema["properties"]["options"] = {
"type": "array",
"minitems": 1,
"uniqueItems": True,
"items": {"type": "string"},
"default": [],
}
schema["properties"]["qt-version"] = {
"type": "string",
"enum": ["qt5"],
"default": "qt5",
}
schema["properties"]["project-files"] = {
"type": "array",
"minitems": 1,
"uniqueItems": True,
"items": {"type": "string"},
"default": [],
}
schema.pop("required")
return schema
@classmethod
def get_pull_properties(cls):
# Inform Snapcraft of the properties associated with pulling. If these
# change in the YAML Snapcraft will consider the pull step dirty.
return ["qt-version"]
@classmethod
def get_build_properties(cls):
# Inform Snapcraft of the properties associated with building. If these
# change in the YAML Snapcraft will consider the build step dirty.
return ["options", "project-files"]
def __init__(self, name, options, project):
super().__init__(name, options, project)
self.build_packages.append("make")
def build(self):
super().build()
env = self._build_environment()
sources = []
if self.options.project_files:
sourcedir = self.sourcedir
source_subdir = getattr(self.options, "source_subdir", None)
if source_subdir:
sourcedir = os.path.join(sourcedir, source_subdir)
sources = [
os.path.join(sourcedir, project_file)
for project_file in self.options.project_files
]
self.run(
["/opt/qt51512/bin/qmake"] + self._extra_config() + self.options.options + sources, env=env
)
self.run(["make", "-j{}".format(self.parallel_build_count)], env=env)
self.run(["make", "install", "INSTALL_ROOT=" + self.installdir], env=env)
self.run(["cp", "/opt/qt51512/resources/icudtl.dat", self.installdir + "/usr/bin"], env=env)
self.run(["cp", "/opt/qt51512/resources/qtwebengine_devtools_resources.pak", self.installdir + "/usr/bin"], env=env)
self.run(["cp", "/opt/qt51512/resources/qtwebengine_resources_100p.pak", self.installdir + "/usr/bin"], env=env)
self.run(["cp", "/opt/qt51512/resources/qtwebengine_resources_200p.pak", self.installdir + "/usr/bin"], env=env)
self.run(["cp", "/opt/qt51512/resources/qtwebengine_resources.pak", self.installdir + "/usr/bin"], env=env)
self.run(["cp", "/opt/qt51512/libexec/QtWebEngineProcess", self.installdir + "/usr/bin"], env=env)
def _extra_config(self):
extra_config = []
for root in [self.installdir, self.project.stage_dir]:
paths = common.get_library_paths(root, self.project.arch_triplet)
for path in paths:
extra_config.append('LIBS+="-L{}"'.format(path))
paths = common.get_include_paths(root, self.project.arch_triplet)
for path in paths:
extra_config.append('INCLUDEPATH+="{}"'.format(path))
return extra_config
def _build_environment(self):
env = os.environ.copy()
env["QT_SELECT"] = self.options.qt_version
return env