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 linux dockerfile for ubuntu 20.04. #1785

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

saurtron
Copy link
Collaborator

Work done

  • Update docker docker-build-v2/amd64-linux/Dockerfile to ubuntu 20.04
    • The 18.04 dockerfile is too old and starts to have compatibility issues with recent linux distros.

Related issues

I have checked, and building with the old dockerfile leads to issues (freeze on engine start), after updating seems to work fine both running with the launcher flatpak, and directly from the host os with ./spring.

After building with the new dockerfile the above issue should be fixed, but since I'm not running zorin specifically would have to double check with op. Zorin 17 is based on 24.04 though, the same I'm testing.

Remarks

  • I guess this needs good testing and have no idea how to check if this can lead to desyncs. windows docker file seems to be at ubuntu 24.04 already though.
  • There is an issue when linking, in that fontconfig doesn't seem to be properly configured either by the distro or the build system and doesn't link libuuid resulting in link errors at the end.
    • The linking problem only affects PreferStatic builds, like the docker one.
    • I modify the cmake FindFontconfig file inside the dockerfile, maybe there is a better way to fix this but this way I avoid having to add hack rules to make it work inside CMakeLists. Other libraries have similar stances so what I'm adding is nothing out of the ordinary.
    • I'm linking libuuid.a (static), but libuuid.so (dynamic) would also work.

@saurtron saurtron changed the title Update dockerfile for ubuntu 20.04. Update linux dockerfile for ubuntu 20.04. Nov 27, 2024
@p2004a
Copy link
Collaborator

p2004a commented Nov 27, 2024

The 18.04 dockerfile is too old and starts to have compatibility issues with recent linux distros.

To be precise, it seems the fontconfig from 18.04 that is too old. Have you considered making fonconfig pinned to newer version in https://github.com/beyond-all-reason/spring-static-libs/ instead?

I guess this needs good testing and have no idea how to check if this can lead to desyncs. windows docker file seems to be at ubuntu 24.04 already though.

It shouldn't affect that, but also windows being on 24.04 doesn't matter: it's cross compiling.


I hate that we are still on 18.04, but there was a push back from other engine devs as it breaks compatibility with some older systems, engine is used across games so it's not only BAR that needs to be looked at but also Zero-K etc.

That's why not using fontconfig from 18.04, but including it ourselves in spring-static-libs might be still prefered option. And who knows when will the version from 20.04 become too old and break...?

@saurtron
Copy link
Collaborator Author

To be precise, it seems the fontconfig from 18.04 that is too old.

Well, I didn't really dig very deep into it, might be other issues too besides fontconfig being too old. I'll do some further tests to confirm if it's just fontconfig.

I hate that we are still on 18.04, but there was a push back from other engine devs as it breaks compatibility with some older systems

Yes, I read that, but maybe that was already some years ago? Maybe it's time to consider updating this to 20.04.

Otherwise yes, as you say we can just pin fontconfig inside spring-static-libs.

@p2004a
Copy link
Collaborator

p2004a commented Nov 27, 2024

For the record last time I've looked at it https://discord.com/channels/549281623154229250/724924957074915358/1276643268079259729 in August this year. It would be good to get data from Zero-K folks to be able to make decision.

@n-morales
Copy link
Contributor

FWIW it's worth considering that there may be glibc compatibilities if using a newer docker version to create distributions. I'm not familiar enough with how BAR makes distributions, but I've run into this issue in a past; i.e. this can cause linker errors if building a distribution with too new a glibc.

18.04 is glibc 2.27 and 20.04 is 2.31 . Would then updating this mean we would require glibc 2.31 and above?

@p2004a
Copy link
Collaborator

p2004a commented Nov 27, 2024

Would then updating this mean we would require glibc 2.31 and above?

Yes, precisely the issue and why engine devs push back. If we update to ubuntu 20.04, we require all engine users to use systems not older then 20.04.

@saurtron saurtron force-pushed the update-linux-dockerfile-to-20-04 branch from c39b874 to 00ee569 Compare November 27, 2024 18:56
@saurtron saurtron changed the title Update linux dockerfile for ubuntu 20.04. Add linux dockerfile for ubuntu 20.04. Nov 27, 2024
@saurtron
Copy link
Collaborator Author

saurtron commented Nov 27, 2024

Since this is quite controversial, I think for now it's better to just add the Dockerfile for ubuntu 20.04 in case someone wants to use it at some point, otherwise we can just discard this, but I think it's good to add it so at least serves as documentation of needed changes between 18.04 and 20.04.

Meanwhile we can explore backporting some libraries, like we could try pinning fontconfig 2.13.1 into the spring-static-libs/, like @p2004a suggested.

Thing is i'm not very sure how that is updated, looks like the main branch has some scripts to generate libraries but then they get distributed inside the branches? Who builds that? What environment is used?

@p2004a
Copy link
Collaborator

p2004a commented Nov 27, 2024

Thing is i'm not very sure how that is updated, looks like the main branch has some scripts to generate libraries but then they get distributed inside the branches? Who builds that? What environment is used?

https://github.com/beyond-all-reason/spring-static-libs/blob/master/.github/workflows/build.yml

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

Successfully merging this pull request may close these issues.

3 participants