Skip to content

premake: add glibc detect and add dl back#2823

Closed
purerosefallen wants to merge 3 commits into
masterfrom
patch-glibc-dl
Closed

premake: add glibc detect and add dl back#2823
purerosefallen wants to merge 3 commits into
masterfrom
patch-glibc-dl

Conversation

@purerosefallen

Copy link
Copy Markdown
Collaborator

#2815

broke on glibc < 2.34, so we have to detect glibc version

@mercury233

Copy link
Copy Markdown
Collaborator

I prefer the easy way since newer glibc provide empty libpthread.a and so on.

@purerosefallen

Copy link
Copy Markdown
Collaborator Author

I prefer the easy way since newer glibc provide empty libpthread.a and so on.

always make ldd ygopro clean

Comment thread premake5.lua Outdated
Comment thread premake5.lua Outdated
Comment thread premake5.lua
end

GLIBC_VERSION=0
if os.ishost("linux") then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

istarget?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

istarget may not work, because there may not be getconf GNU_LIBC_VERSION on non-Linux OSes. WIndows / Mac generating Linux would still not call this method.

if Linux generating other OSes, this function still works.

Comment thread premake5.lua
if os.ishost("linux") then
GLIBC_VERSION = getGlibcVersion()
if GLIBC_VERSION>0 then
print("Detected glibc version: " .. string.format("%d.%d.%d", GLIBC_VERSION >> 16, (GLIBC_VERSION >> 8) & 0xFF, GLIBC_VERSION & 0xFF))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.34.0 is not actual version, it should be 2.34. btw I don't think it is necessary to print this.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not interested in detailed format, and this is for debugging only, just as the Rosetta thing.

@mercury233

mercury233 commented Jun 8, 2025

Copy link
Copy Markdown
Collaborator

I prefer the easy way since newer glibc provide empty libpthread.a and so on.

always make ldd ygopro clean

You can do that when you distribute YGOPro. I think it is better to keep the code clean.

@mercury233 mercury233 deleted the patch-glibc-dl branch May 31, 2026 00:07
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.

2 participants