Skip to content

Add missing ldiv, lldiv, imaxdiv, pthread_sigmask shims - #56

Open
AndrewX98 wants to merge 1 commit into
minecraft-linux:masterfrom
AndrewX98:add-missing-symbols
Open

AndrewX98 wants to merge 1 commit into
minecraft-linux:masterfrom
AndrewX98:add-missing-symbols

Conversation

@AndrewX98

Copy link
Copy Markdown
Contributor

libshim was missing pthread_sigmask, ldiv, lldiv, and imaxdiv.

These were the errors:
Error [MinecraftUtils] Failed to load Minecraft: dlopen failed: cannot locate symbol "pthread_sigmask" referenced by "libminecraftpe.so"

Error [MinecraftUtils] Failed to load Minecraft: dlopen failed: cannot locate symbol "ldiv" referenced by "libminecraftpe.so"

lldiv and imaxdiv were added proactively as related functions

Tested Versions: 1.26.32.2

@Pocimin

Pocimin commented Sep 20, 2026

Copy link
Copy Markdown

Verified: this patch fixes pthread_sigmask/ldiv on Minecraft 1.26.33.1 arm64 (macOS). Game loads all libraries with it applied. Please merge.

@amthedev

amthedev commented Oct 6, 2026

Copy link
Copy Markdown

Confirming this patch works on macOS 26.6.2 (Tahoe), Apple M4, with Minecraft 1.26.52.3 (versionCode 972605203, arm64-v8a) — a newer release line than previously reported here.

I applied the patch to libc-shim and rebuilt mcpelauncher-client from the full manifest. Build notes for anyone reproducing on recent macOS/Apple Clang:

  • -DBUILD_UI=OFF (client only)
  • -DCMAKE_POLICY_VERSION_MINIMUM=3.5 (CMake 4.x rejects the old cmake_minimum_required)
  • -DCMAKE_CXX_FLAGS=-std=gnu++20 (the typeof in errno.h's WithErrnoUpdate needs GNU extensions, otherwise Apple Clang errors with "use of undeclared identifier 'typeof'")
  • afterwards install_name_tool -change .../libssl.3.dylib @rpath/libssl.dylib (and libcrypto) so the client uses the bundle's OpenSSL instead of Homebrew's, avoiding a _CRYPTO_calloc symbol clash

With the patch the cannot locate symbol "pthread_sigmask" referenced by libminecraftpe.so failure is gone and every library resolves. Loading then reaches the libPlayFabMultiplayer.so / libmaesdk.so DRM crash (same as #2030 and mcpelauncher-manifest#2007), which the maintained mcpelauncher-updates v26.40.1 module resolves. With both in place, 1.26.52.3 boots to an interactive main menu and in-game text input works normally.

This patch is correct and sufficient for the loader stage on the latest 1.26.x. Please merge. 🙏

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