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

Impossible to compile on Alpine Linux(musl libc) #622

Closed
illiliti opened this issue May 16, 2020 · 4 comments
Closed

Impossible to compile on Alpine Linux(musl libc) #622

illiliti opened this issue May 16, 2020 · 4 comments
Labels
Projects
Milestone

Comments

@illiliti
Copy link

-DMEMORY_ALLOCATOR=standard should be specified by default for musl libc because it doesn't support custom memory allocators

Non-portable functions should be removed or replaced with alternatives(e.g libexecinfo)

  • src/xrCore/FS_internal.h src/xrCore/LocatorAPI.cpp
    • sys_errlist glibcism
  • src/xrCore/xrDebug.cpp
    • execinfo.h glibcism
  • src/xrCore/_math.cpp
    • fpu_control.h glibcism

Cmake generates invalid <build directory>/src/xrGame/cotire/xrGame_C_prefix.c with missing includes

#include <string.h>
#include <stddef.h>
#include <stdlib.h>

Cmake should search include path for directfb in /usr/include/directfb too, not just /usr/include

@illiliti illiliti added the Bug The issue in the run-time. label May 16, 2020
@illiliti
Copy link
Author

Cmake generates invalid <build directory>/src/xrGame/cotire/xrGame_C_prefix.c with missing includes

#include <string.h>
#include <stddef.h>
#include <stdlib.h>

Cmake should search include path for directfb in /usr/include/directfb too, not just /usr/include

i solved these issues by removing directfb and fortify-headers packages

i also found missing include #include <signal.h> in src/xrCore/xrDebug.cpp

@Xottab-DUTY Xottab-DUTY added Build issue The issue in the build-time. and removed Bug The issue in the run-time. labels Oct 3, 2020
@Xottab-DUTY Xottab-DUTY added this to To do in Linux port via automation Jun 22, 2022
@Xottab-DUTY Xottab-DUTY added this to the Linux port milestone Jun 22, 2022
Linux port automation moved this from To do to Done Jul 9, 2022
@Xottab-DUTY
Copy link
Member

@illiliti, can you test if the game is playable with musl libc?

@Xottab-DUTY
Copy link
Member

Also, just a small comment:

Cmake should search include path for directfb in /usr/include/directfb too, not just /usr/include

It's SDL2 that tries to include directfb header... I fixed compilation errors by just removing some SDL2 headers from compilation.

I'm not sure if this is our issue and, maybe, it should be submitted to SDL2 repository.

@illiliti
Copy link
Author

Thanks for working on this!

can you test if the game is playable with musl libc?

Good question! I don't use alpine anymore(but i still use musl!) since I moved on to a more minimal system a long time ago. Building some xray-16 dependencies might be quite challenging there... I'll try to look into it, but can't promise anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Linux port
  
Done
Development

No branches or pull requests

2 participants