Open robbie01 opened 2 years ago
This one works for me. It seems to be an issue with LTO on the unarr project. Sadly it is hardcoded and can't be disabled via flag. So I removed the flag with sed.
Still needs some improvements if you plan to release it on flathub (which would be great) ( see https://github.com/flathub/flathub/wiki/App-Requirements ):
runtime: org.kde.Platform
runtime-version: '6.4'
sdk: org.kde.Sdk
command: NanoBoyAdvance
finish-args:
- --share=ipc
- --socket=fallback-x11
- --socket=wayland
- --socket=pulseaudio
- --share=network
- --device=all
- --persist=.
modules:
- shared-modules/glew/glew.json
- name: nba
buildsystem: cmake-ninja
builddir: true
build-options:
cflags: -DGLEW_NO_GLU
cxxflags: -DGLEW_NO_GLU
config-opts:
- -DCMAKE_BUILD_TYPE=None
- -DUSE_QT6=ON
post-install:
- install -Dt /app/bin bin/qt/NanoBoyAdvance
sources:
- type: git
url: https://github.com/nba-emu/NanoBoyAdvance.git
tag: v1.7
commit: 1bcdaa39879c2d3c8db25d42a7439bc3a7555843
x-checker-data:
type: git
tag-pattern: ^v([\d.]+)$
- type: shell
commands:
- sed -i 's|-flto||g' external/unarr/CMakeLists.txt
Maybe opening a PR to add this things would be a good idea
I'm trying to find out if it's feasible to package NanoBoyAdvance as a Flatpak. (I do not intend to distribute it without the maintainer(s', 's) blessing.) It compiles fine, until the final link, when it spits out an error containing all of the unarr symbols that it can't find.
Note well that it has no complaints about finding
external/unarr/libunarr.a
, and annm -g
on that file shows that all of the missing symbols are there. I also built NBA on my host system in the exact same configuration with no issues, and I have tried adjusting various parameters (including usingmaster
and using Qt5) to no avail. The only thing I can think of is that it might be a link-order issue, though the host build succeeding leaves me skeptical.Here is the Flatpak manifest:
To build it, you will need flathub/shared-modules in the same directory, the Flatpaks
org.kde.Sdk//6.3
andorg.kde.Platform//6.3
, andflatpak-builder
.Run the following to reproduce:
Thanks for any time spent looking into this.