Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak build is rebuilding files #231

Open
keesverruijt opened this issue Apr 16, 2023 · 4 comments
Open

Flatpak build is rebuilding files #231

keesverruijt opened this issue Apr 16, 2023 · 4 comments

Comments

@keesverruijt
Copy link
Contributor

The flatpak build seems to run commands twice.

For instance, it is running the NMEA0183 library link twice. This is most obvious when the cmake build system is changed to cmake-ninja in flatpak/org.opencpn.OpenCPN.Plugin.radar.yaml:

[50/57] Linking CXX static library libs/nmea0183/libNMEA0183.a
[54/57] Linking CXX static library opencpn-libs/wxJSON/libWXJSON.a
[12/21] Linking CXX static library libs/nmea0183/libNMEA0183.a
[17/21] Linking CXX static library opencpn-libs/wxJSON/libWXJSON.a
keesverruijt added a commit that referenced this issue Apr 16, 2023
The issue is that when a different target is set some of the CMake and Makefiles
in the build directory are changed under its feet.

Changing this makes the build reliable and 40% faster.
@leamas
Copy link
Contributor

leamas commented Apr 17, 2023

Yes, I can reproduce this also on plain shipdriver builds. Digging

@leamas
Copy link
Contributor

leamas commented Apr 17, 2023

This is indeed the core problem. A really nice catch!

However, just using BUILD_TYPE=flatpak in the manifest does not work in the general case. I'm on it, but probably need a night's sleep to figure out what to do. Perhaps even two...

@keesverruijt
Copy link
Contributor Author

Maybe change the flatpak instructions (yaml) to build type ‘simple’ then just call ‘make’ instead of cmake?

@keesverruijt
Copy link
Contributor Author

keesverruijt commented Apr 17, 2023

Hmm come to think of it, I think the best approach is probably to get rid of the outer cmake layer, which in the end runs just a single generated script.

Instead, have circle-build-flatpak.sh generate a build-flatpak/build.sh script directly and feed that to flatpak builder using the ‘simple’ buildsystem. The mechanism to generate it could resemble the one used for cloudsmith sync so use an .in file where variables are substituted etc.

The cmake files can then remove most references to flatpak; it just becomes a tarball build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants