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

Add (mostly static) Linux build #48

Merged
merged 43 commits into from
Nov 13, 2023
Merged

Add (mostly static) Linux build #48

merged 43 commits into from
Nov 13, 2023

Conversation

fwcd
Copy link
Owner

@fwcd fwcd commented Nov 9, 2023

This adds an experimental x86_64 Linux build, which should lay the foundation for #36 too. Cross-compilation will likely become a bit more involved on Linux compared to macOS since the system doesn't ship all of the target libraries natively. It currently uses a patched integration branch of Mixxx to fix some linking issues that arise due to most dependencies being linked statically (which is unlike the standard Debian build environment that Mixxx usually provides).

Upstreaming progress:

To do:

  • Experimentally update CI and scripts for building on/for Linux
  • Figure out why we still get errors while linking Mixxx (see the linked PRs above)

Since statically linking Mixxx on Linux does not seem to be a well-supported scenario by upstream, an alternative would be to build with the standard Debian environment and then bundling the shared libraries (e.g. copying most of the libraries listed by ldd into an AppImage or similar).

@fwcd fwcd added the enhancement New feature or request label Nov 9, 2023
@github-actions github-actions bot added branch update An update of an upstream branch (mixxx, vcpkg) ci-cd CI/CD-related labels Nov 9, 2023
@fwcd
Copy link
Owner Author

fwcd commented Nov 13, 2023

We'll disable set battery indicator by setting -DBATTERY=OFF to avoid the GLib dependency, which is tricky to get right in a static linking scenario:

/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux/lib/libgobject-2.0.a(gboxed.c.o): in function `g_bookmark_file_get_type_once':
gboxed.c:(.text+0x105a): undefined reference to `g_bookmark_file_copy'
collect2: error: ld returned 1 exit status

We would probably have to tell CMake to link glib with gobject similar to the other PRs linked above, the FindGLIB module is structured a bit differently, however, so it may not be trivial. Since this feature is rather minor, it might not be worth the hassle for this non-standard build.

@fwcd fwcd changed the title Add Linux build Add (mostly static) Linux build Nov 13, 2023
@fwcd fwcd marked this pull request as ready for review November 13, 2023 03:17
@fwcd
Copy link
Owner Author

fwcd commented Nov 13, 2023

It works:

image

@fwcd fwcd merged commit 3d2843e into main Nov 13, 2023
5 checks passed
@fwcd fwcd deleted the linux branch November 13, 2023 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch update An update of an upstream branch (mixxx, vcpkg) ci-cd CI/CD-related enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build cache (ccache) path currently doesn't work properly in CI
1 participant