Flatpak build-options seem to be ignored
I have a project using the i386 Compat and toolchain Extension, which is built successfully with flatpak-builder. However, Builder seems to ignore the build-options I have set to use the i386 CC and CXX, so the build fails. To reproduce:
- Clone https://github.com/YaLTeR/OpenAG.git.
- Press Build.
- CMake says it's using
/usr/bin/cc
and/usr/bin/c++
, while it should use/usr/lib/sdk/toolchain-i386/bin/i686-unknown-linux-gnu-gcc
and/usr/lib/sdk/toolchain-i386/bin/i686-unknown-linux-gnu-g++
. - It will fail with this common not-using-32-bit-compilers error:
/usr/include/c++/9.2.0/bits/random.h:103:26: error: expected unqualified-id before ‘__int128’ 103 | { typedef unsigned __int128 type; };
Manually doing flatpak-builder --force-clean build-dir build-aux/flatpak/pro.openag.OpenAG.json
completes successfully.
Flatpak manifest:
{
"app-id": "pro.openag.OpenAG",
"runtime": "org.freedesktop.Platform",
"runtime-version": "19.08",
"command": "",
"sdk": "org.freedesktop.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Compat.i386",
"org.freedesktop.Sdk.Extension.toolchain-i386"
],
"modules": [
{
"name": "client",
"buildsystem": "cmake-ninja",
"builddir": true,
"no-make-install": true,
"post-install": [
"cp client.so /app/"
],
"build-options": {
"append-path": "/usr/lib/sdk/toolchain-i386/bin",
"env": {
"CC": "i686-unknown-linux-gnu-gcc",
"CXX": "i686-unknown-linux-gnu-g++"
}
},
"sources": [
{
"type": "archive",
"url": "https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz",
"sha256": "bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e",
"dest": "external/discord-rpc/thirdparty/rapidjson"
},
{
"type": "dir",
"path": "../../"
}
]
}
]
}
org.gnome.Builder 3.36.0 stable from FlatHub, clean Fedora 31 VM.