I’m trying to flatpak a Rust application that uses fltk-rs.
I successfully managed to add the missing libpangoxft-1.0 by rebuilding libpango with the appropriate features.
But now I’m stuck on the missing libsupc++, the fltk build seems to need this library and I have no idea where to get it or how to add it.
I was able to get further along with a simpler test application and I updated the Flatpak manifest.
I disabled temporarily bootstrapping during gcc compilation (build times too long)
I updated gcc configuration flags, so that it could find libraries such as mpc
While building fltk-rs, I now see different linkage errors against libsupc++, CFLAGS don’t work so far. It looks like something needs to be recompiled with -fPIE.
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: /usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib64/libsupc++.a(class_type_info.o): relocation R_X86_64_32S against symbol `_ZTVN10__cxxabiv117__class_type_infoE' can not be used when making a PIE object; recompile with -fPIE
/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
I was able finally able to compile the project with flatpak, the build is still failing in my “test project” though because of missing assets (Desktop file and other stuff, but that’s easy to fix).
...
2025-04-29T14:19:26.3602619Z warning: `/run/build/entrusted/cargo/config` is deprecated in favor of `config.toml`
2025-04-29T14:19:26.3603885Z note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
2025-04-29T14:19:26.4244744Z Compiling shlex v1.3.0
2025-04-29T14:19:26.4245214Z Compiling cmk v0.1.2
2025-04-29T14:19:26.4245617Z Compiling crossbeam-utils v0.8.21
2025-04-29T14:19:26.4246157Z Compiling paste v1.0.15
2025-04-29T14:19:26.5442719Z Compiling cc v1.2.20
2025-04-29T14:19:26.6003160Z Compiling ttf-parser v0.25.1
2025-04-29T14:19:27.1522489Z Compiling crossbeam-channel v0.5.15
2025-04-29T14:19:27.2079672Z Compiling once_cell v1.21.3
2025-04-29T14:19:27.3632922Z Compiling cmake v0.1.54
2025-04-29T14:19:27.6334517Z Compiling bitflags v2.9.0
2025-04-29T14:19:27.8439823Z Compiling fltk-sys v1.5.6
2025-04-29T14:20:18.7790832Z Compiling fltk v1.5.6
2025-04-29T14:20:26.9916989Z Compiling entrusted v0.1.0 (/run/build/entrusted/app)
2025-04-29T14:20:27.6919652Z Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 01s
2025-04-29T14:20:27.6949456Z Running: install -Dm644 -t /app/share/metainfo/com.rimerosolutions.Entrusted.metainfo.xml flatpak/com.rimerosolutions.Entrusted.metainfo.xml
2025-04-29T14:20:27.7575272Z Running: install -Dm644 -t /app/share/applications/com.rimerosolutions.Entrusted.desktop assets/com.rimerosolutions.Entrusted.desktop
2025-04-29T14:20:27.8206515Z install: cannot stat 'assets/com.rimerosolutions.Entrusted.desktop': No such file or directory
2025-04-29T14:20:27.8214427Z Error: module entrusted: Child process exited with code 1
2025-04-29T14:20:27.8466718Z ##[error]Process completed with exit code 1.
2025-04-29T14:20:27.8574655Z Post job cleanup.
2025-04-29T14:20:27.9567106Z [command]/usr/bin/git version
2025-04-29T14:20:27.9604638Z git version 2.49.0
2025-04-29T14:20:27.9649173Z Temporarily overriding HOME='/home/runner/work/_temp/3ed80f47-2cad-4135-a005-d5413a0cb254' before making global git config changes
2025-04-29T14:20:27.9650450Z Adding repository directory to the temporary git global config as a safe directory
2025-04-29T14:20:27.9655748Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/fltk-rs-flatpak/fltk-rs-flatpak
2025-04-29T14:20:27.9693532Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2025-04-29T14:20:27.9727958Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2025-04-29T14:20:27.9955201Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2025-04-29T14:20:27.9977396Z http.https://github.com/.extraheader
2025-04-29T14:20:27.9990214Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2025-04-29T14:20:28.0020808Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
2025-04-29T14:20:28.0357973Z Cleaning up orphan processes
I’ll fix that assets part just to have a fully working basic example, but now I’m confident that I can integrate with my real project that also uses couple of other C/C++ libraries.