From 1341c8b4016b3bba2b9b0470917c5300f3106e9a Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 4 Mar 2019 13:53:26 +0100 Subject: [PATCH 1/5] Do not strip libraries in release_mode. Meson use gcc's `-s` option to create the archive. This option should make gcc meemic `ar` tool but in some version of gcc, it seems there is a bug and the `-s` option is not taken into account. See https://github.com/mesonbuild/meson/issues/4138 So, do not try to strip libraries. We will strip the final binaries anyway. --- kiwixbuild/dependencies/kiwix_lib.py | 1 + kiwixbuild/dependencies/libzim.py | 1 + 2 files changed, 2 insertions(+) diff --git a/kiwixbuild/dependencies/kiwix_lib.py b/kiwixbuild/dependencies/kiwix_lib.py index 6332394..ea3f8ef 100644 --- a/kiwixbuild/dependencies/kiwix_lib.py +++ b/kiwixbuild/dependencies/kiwix_lib.py @@ -13,6 +13,7 @@ class Kiwixlib(Dependency): class Builder(MesonBuilder): dependencies = ["pugixml", "libzim", "zlib", "lzma", "libcurl", "icu4c", "mustache"] + strip_option = '' @property def configure_option(self): diff --git a/kiwixbuild/dependencies/libzim.py b/kiwixbuild/dependencies/libzim.py index fdcff3a..ed0ea24 100644 --- a/kiwixbuild/dependencies/libzim.py +++ b/kiwixbuild/dependencies/libzim.py @@ -14,6 +14,7 @@ class Libzim(Dependency): class Builder(MesonBuilder): test_option = "-t 8" dependencies = ['zlib', 'lzma', 'xapian-core', 'icu4c'] + strip_option = '' @property def configure_option(self): From e04dd76ee05cc2c0817adcc2f4feda82773f8714 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 4 Mar 2019 14:09:50 +0100 Subject: [PATCH 2/5] Use specific release base deps archive when build release. Base deps are not compiled the same between a release and debug build. --- travis/compile_all.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/travis/compile_all.py b/travis/compile_all.py index 4ff6ff8..920cb9d 100755 --- a/travis/compile_all.py +++ b/travis/compile_all.py @@ -278,10 +278,11 @@ def download_base_archive(base_name): if PLATFORM != 'flatpak': # The first thing we need to do is to (potentially) download already compiled base dependencies. - base_dep_archive_name = "base_deps_{os}_{platform}_{version}.tar.xz".format( + base_dep_archive_name = "base_deps_{os}_{platform}_{version}_{release}.tar.xz".format( os=TRAVIS_OS_NAME, platform=PLATFORM, - version=base_deps_meta_version) + version=base_deps_meta_version, + release='release' if make_release else 'debug') print_message("Getting archive {}", base_dep_archive_name) try: @@ -292,10 +293,11 @@ if PLATFORM != 'flatpak': print_message("Cannot get archive. Build dependencies") if PLATFORM == 'android': for arch in ('arm', 'arm64', 'x86', 'x86_64'): - archive_name = "base_deps_{os}_android_{arch}_{version}.tar.xz".format( + archive_name = "base_deps_{os}_android_{arch}_{version}_{release}.tar.xz".format( os=TRAVIS_OS_NAME, arch=arch, - version=base_deps_meta_version) + version=base_deps_meta_version, + release='release' if make_release else 'debug') print_message("Getting archive {}", archive_name) try: local_filename = download_base_archive(archive_name) From b130b8506603f5ae83041f138835a015318a05d2 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 4 Mar 2019 14:12:29 +0100 Subject: [PATCH 3/5] Add tmp.kiwix.org to known hosts. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 56288e2..f6f924f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,6 +72,7 @@ env: addons: ssh_known_hosts: - download.kiwix.org + - tmp.kiwix.org - download.openzim.org apt: packages: &common From b4d0e627c55a2b4942bc2034d335aa3074a98c9a Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 5 Mar 2019 15:40:22 +0100 Subject: [PATCH 4/5] Add armhf toolschain in base_deps_archive. --- travis/compile_all.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/travis/compile_all.py b/travis/compile_all.py index 920cb9d..1c06ce5 100755 --- a/travis/compile_all.py +++ b/travis/compile_all.py @@ -231,6 +231,8 @@ def make_deps_archive(target, full=False): files_to_archive += HOME.glob('BUILD_*/pugixml-{}'.format( base_deps_versions['pugixml'])) toolchains_subdirs = HOME.glob('**/TOOLCHAINS/*/*') + if PLATFORM.startswith('armhf'): + files_to_archive += [SOURCE_DIR/'raspberrypi-tools'] for subdir in toolchains_subdirs: if not subdir.match('tools'): files_to_archive.append(subdir) From 2970a2d4458b5cd248ff5473a9696101aa3d6237 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Wed, 6 Mar 2019 08:59:14 +0100 Subject: [PATCH 5/5] Update to new version of lzma and get it from kiwix.org server. It seems that the downloading of the archive stored on sourceforge fails sometime. Use the archive stored in our server (download.kiwix.org) instead. And also move to the last version of lzma. --- kiwixbuild/dependencies/lzma.py | 6 +++--- kiwixbuild/versions.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kiwixbuild/dependencies/lzma.py b/kiwixbuild/dependencies/lzma.py index 285086e..3d29bdf 100644 --- a/kiwixbuild/dependencies/lzma.py +++ b/kiwixbuild/dependencies/lzma.py @@ -9,9 +9,9 @@ class lzma(Dependency): name = 'lzma' class Source(ReleaseDownload): - archive = Remotefile('xz-5.2.3.tar.bz2', - 'fd9ca16de1052aac899ad3495ad20dfa906c27b4a5070102a2ec35ca3a4740c1', - 'https://tukaani.org/xz/xz-5.2.3.tar.bz2') + archive = Remotefile('xz-5.2.4.tar.gz', + 'b512f3b726d3b37b6dc4c8570e137b9311e7552e8ccbab4d39d47ce5f4177145' + ) class Builder(MakeBuilder): @property diff --git a/kiwixbuild/versions.py b/kiwixbuild/versions.py index 77e67b9..2f03282 100644 --- a/kiwixbuild/versions.py +++ b/kiwixbuild/versions.py @@ -35,12 +35,12 @@ release_versions = { # This is the "version" of the whole base_deps_versions dict. # Change this when you change base_deps_versions. -base_deps_meta_version = '17' +base_deps_meta_version = '18' base_deps_versions = { 'zlib' : '1.2.8', - 'lzma' : '5.2.3', + 'lzma' : '5.2.4', 'uuid' : '1.43.4', 'xapian-core' : '1.4.10', 'mustache' : '3.2',