Version 5.2.7 include this commit
https://git.tukaani.org/?p=xz.git;a=commit;h=31d80c6b261b24220776dfaeb8a04f80f80e0a24
With this change, compiling libzim mixed (libzim dynamic and dependencies,
so lzma, statically) fails at libzim linking with a
`src/libzim.so.8.0.1: version node not found for symbol lzma_get_progress@XZ_5.2.2`
error message.
This can be "workaround" by passing `--disable-symbol-versions` to
configure script but then, it is the compilation of kiwix-desktop in
native_dyn which falling with
```
/usr/bin/ld: /usr/lib64/libsystemd.so.0: undefined reference to `lzma_code@XZ_5.0'
/usr/bin/ld: /usr/lib64/libsystemd.so.0: undefined reference to `lzma_end@XZ_5.0'
/usr/bin/ld: /usr/lib64/libsystemd.so.0: undefined reference to `lzma_stream_decoder@XZ_5.0'
/usr/bin/ld: /usr/lib64/libxml2.so.2: undefined reference to `lzma_auto_decoder@XZ_5.0'
/usr/bin/ld: /usr/lib64/libxml2.so.2: undefined reference to `lzma_properties_decode@XZ_5.0'
```
Probably because some native dependencies (Qt ?) use versionned symbols.
This have to be fixed somehow but until then, let's go back to 5.2.6
`icu4c_wasm.patch` is build by :
- Copying config.sub from liblzma source as new version of config.sub there
knows about wasm architecture.
- Copying `mh-linux` on `mh-unknown` as specified in (origin) `mh-unknown`.
This is because icu4c configure doesn't detect `emscripten` platform and
"fallback" to `mh-unknown`.
Aria2 is a special case. We actually don't really need to compile it.
kiwix-desktop through libkiwix use the aria2c binary but we always
use (package) the system binary or a prebuild release.
And we don't cross compile kiwix-desktop to windows, so we don't need
aria2c neither.
The sub-directory `android-kiwix-lib-publisher` has not been renamed.
We plan to move this code in another repository anyway.
It is better for now to use the existing name instead of change the
directory.
Wrong copy/paste.
This is not important as we reference dependencies by their name
attribute, not by the class name.
But it is better to have a correct name.
The source step (install source) always exists.
The `plaformInfo.name` step may not exists
(On mixed target, we build all deps static and the last project dyn)
So the `native_dyn` doesn't exists for `zim-testing-suite`.
Instead of explicitly add the target associated to the toolchain
if we use `build_nodeps` option let add an attribute base ourself on it
to know if we need to add it or not.
This way, we may have other dependency we must not skip.
We were assuming that meson project correspond to our projects and so we
were always building them, even if they were already compiled.
(This way, a simple `kiwix-build` is enough to recompile the WIP code of
our project).
However, on the CI, we do not archive the source code/build directory in
the base deps archive. So when we try to compile, the compile step of
meson projects fails because the source are not here.
We have a small workaround for pugixml but as zstd is also meson, it is
time to do something correct.
By default, all projects now try to skip if a build is already present.
Our projects are marked as `force_build` and so, they do not try to skip.
This will build all Make, CMake, QMake dependency being build with -O3.
So all our dependencies will be build with -O3.
Our project (meson) are already build in release when needed.
kiwix-desktop should be build optimized in case of release but we need
to handle it correctly. At least not build in O3 per default as it may
break debug.
We simply do a `git merge --ff-only` instead of a `git reset`. This way:
- No change on the local repository
=> update to `remote/master`
- If you switch branch and local branch is behind `remote/master`
=> fast forward to `remote/master`
- If you switch branch and branches diverge
=> No update of the directory
- On branch master (or a branch behind `origin/master`) with compatible
change in the working tree.
=> update of the directory
- On branch master (or a branch behind `origin/master`) but incompatible
change in the working tree.
=> No update.
This way, sources are keep up-to-date as far as possible.
If we modify the dependency's configure_env, we may change
the dictionary with value of the first platform. Then, when
we use it for the second platform, the previous values are used.
Do not modify the dep_conf_env dictionary and then we are good.
- We should not try to set the cross compilation flags when we use
gradle.
- Fix anyway the setting of tho cross compilation flags for android sdk
platform (the default implementation use the `static` attributes that
doesn't exist for android)
Instead of having the run_command function setting the
env from the buildEnv, this is the dependency that create the
env and then pass it to the run_command function.
This way, each dependency will be able to set a specific env.
First, we don't need to clone all the git repository, we only need a
sub-directory.
Secondly, as we the base_deps archives only archive the sub-directory,
subsequent run of kiwix-build in the ci will try to do a git update on
a non git repository.
By making ourselves a tar archive, we simplify the process.
The archive on download.kiwix.org has been made with :
`tar czf raspberrypy-tools.tar.gz raspberrypi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64`
`raspberrypi-tools` being a clone of `https://github.com/raspberrypi/tools`
commit sha is 5caa7046982f0539cf5380f94da04b31129ed521
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.
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.
- Dependency are installed "striped".
- Our project are build "debugoptimized" by default and "release" when
building release instead of "debug"
We need to update the `base_deps_meta_version` as we are changing how
dependencies are compiled.
kiwix-desktop needs the aria2 binary to download content.
kiwix-desktop will use aria2 throw lib-kiwix so it is somehow a kiwix-lib
dependency, but it is used only by kiwix-desktop.
And we know to install it only on platforms where we are supporting
kiwix-destkop.
This commit add a first version code to build a flatpak of kiwix-desktop.
It is mainly based on the PR #254 of @birros (hence he is the author of this commit)
However there is some differences :
- I (@mgautier) create a new builder to run the flatpak build instead of using a new
dependency.
- Use the flatpak platform to install org.kde.Platform and org.kde.Sdk
This code version doesn't correctly work but I wanted to commit the birros' code
without too many modification (even if there is a lot).
On ubuntu, the libcurl package is compiled with libkrb (kerberos).
However, no libkrb5.a is provided and so, we cannot link statically.
As we are not using kerberos, we can (and must) compile ourselves libcurl.
qmake seems to generate wrong "dist" rules for "make".
It try to copy the translation files as if it was in current directory
instead of looking the source dir.
dist archive is usefull with autotools where we want to run autogen before.
Or with meson when meson run tests before making the archive.
With qmake, it seems useless, let's simply archive what is git.
SVN checkout can be pretty long to do (especially if icu serveur is pretty
slow).
By downloading an archive on our own server, we avoid a spending too many
time downloading.
The archive is a simple targz of the SVN checkout.
- Disable icuio and layoutex.
- Hardcode UTF8 as charset (we always use utf8 and hardcoding him improve
performances)
- Do not include default utf headers
- Do not use `using namespace icu`
See http://source.icu-project.org/repos/icu/trunk/icu4c/readme.html#RecBuild
for more information about options.
Increment base dependencies version as we are compiling icu differently.
Enable `--no-daemon` : Using the daemon make gradle keep "configuration"
(like plugin path). If gradle installation path change, it will break
kiwix-android build.
Enable `--build-cache` : This is not the case by default :/
This should greatly improve compilation speed.
By building kiwix-android on the `android` platform, we can now build
`kiwix-lib` on all `android_<arch>` platforms, and so have all
architectures in the same apk.
Fix#108
This is the big change !!!!
Instead of handling target as primary object and prepare/build targets,
we are handling build steps.
A build step may be a source (preparation) or a build (of the source).
Actualy, a step is a tuple (context, Builder or Source).
The context define the context of the step. It can be :
- 'source', for a Source step
- 'neutral' or the name of a platform for Build step.
Target becomes a "Class only" class.