Update ARM GNU toolchain to version 12.3-rel1 #64

Merged
TheBrokenRail merged 4 commits from taylorthemushroom/minecraft-pi-reborn:master into master 2023-10-20 01:13:06 +00:00
Contributor

This should fix issues with mod development pertaining to the outdated version of libc on the old toolchain. I also had to rewrite the AppPlatform::readAssetFile function to mitigate a null dereference error thrown by the new toolchain.

Tested operational on Debian Unstable (sid) as of September 24, 2023.

This should fix issues with mod development pertaining to the outdated version of libc on the old toolchain. I also had to rewrite the AppPlatform::readAssetFile function to mitigate a null dereference error thrown by the new toolchain. Tested operational on Debian Unstable (sid) as of September 24, 2023.
taylorthemushroom added 4 commits 2023-09-25 03:22:58 +00:00
5432664f77 Rewrite asset file loading for new toolchain
Old implementation throws null dereference errors on new toolchain. New implementation has not been fully stress-tested but should be mostly operational.
2da7947640 Oops
Forgot to update a few lines of code in the previous commit. Sorry!

Did they finally fix https://bugs.linaro.org/show_bug.cgi?id=5825?

Also, where was the null de-reference coming from in the old code?

Finally, what issues are being caused by an old glibc?

Did they finally fix https://bugs.linaro.org/show_bug.cgi?id=5825? Also, where was the null de-reference coming from in the old code? Finally, what issues are being caused by an old glibc?
Author
Contributor
  1. https://bugs.linaro.org/show_bug.cgi?id=5825 I was unable to reproduce the bug in this bug report using the latest toolchain version and the provided test cases. Looks like they might have fixed this bug after all, if my admittedly ancient i7-3700K has anything to say about it. :P

  2. The new toolchain was erroring on line 20 std::string str((std::istreambuf_iterator<char>(stream)), std::istreambuf_iterator<char>()); in the old code, although the compiler output was admittedly a little hard to parse considering all the fluff it output regarding inlined functions and errors allegedly coming from the streambuf header itself. I was able to find the offending line through the weeds, though I am not a good enough C++ programmer to be able to find the problem with that line on first glance, hence the rewrite.

  3. I already documented this on the Discord server earlier, but on my development computer running the latest Debian unstable, MCPI Reborn up to the (as of now) current version will crash with the following error message when loading a compiled mod:
    /tmp/.minecraft-pi-patched/Ks58eP: /home/tstephensen/src/minecraft-pi-reborn/out/client-amd64/usr/lib/minecraft-pi-reborn-client/sysroot/lib/libc.so.6: version 'GLIBC_2.34' not found (required by /home/tstephensen/.minecraft-pi/mods/libchat-commands.so)
    This error is because the mod is being compiled using a newer version of libc (2.37) than the version found in the sysroot (2.33). I am able to reproduce this error on the latest master branch version, but this is fixed in the modified commit.

1. [https://bugs.linaro.org/show_bug.cgi?id=5825](https://bugs.linaro.org/show_bug.cgi?id=5825) I was unable to reproduce the bug in this bug report using the latest toolchain version and the provided test cases. Looks like they might have fixed this bug after all, if my admittedly ancient i7-3700K has anything to say about it. :P 2. The new toolchain was erroring on line 20 `std::string str((std::istreambuf_iterator<char>(stream)), std::istreambuf_iterator<char>());` in the old code, although the compiler output was admittedly a little hard to parse considering all the fluff it output regarding inlined functions and errors allegedly coming from the `streambuf` header itself. I was able to find the offending line through the weeds, though I am not a good enough C++ programmer to be able to find the problem with that line on first glance, hence the rewrite. 3. I already documented this on the Discord server earlier, but on my development computer running the latest Debian unstable, MCPI Reborn up to the (as of now) current version will crash with the following error message when loading a compiled mod: `/tmp/.minecraft-pi-patched/Ks58eP: /home/tstephensen/src/minecraft-pi-reborn/out/client-amd64/usr/lib/minecraft-pi-reborn-client/sysroot/lib/libc.so.6: version 'GLIBC_2.34' not found (required by /home/tstephensen/.minecraft-pi/mods/libchat-commands.so)` This error is because the mod is being compiled using a newer version of libc (2.37) than the version found in the sysroot (2.33). I am able to reproduce this error on the latest master branch version, but this is fixed in the modified commit.
TheBrokenRail merged commit fab66319ea into master 2023-10-20 01:13:05 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: minecraft-pi-reborn/minecraft-pi-reborn#64
No description provided.