retrofw / retrofw.github.io

RetroFW Firmware releases
457 stars 52 forks source link

Found a solution to compile toolchain in newer linux distributions #65

Open Miguel-hrvs opened 1 year ago

Miguel-hrvs commented 1 year ago

(If you are using ubuntu install this package with apt: python-is-python3)

You have to apply these patches:

for c-stack.c: https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/m4/1.4.18-5ubuntu1/m4_1.4.18-5ubuntu1.debian.tar.xz Extract the package and use the number 4 of the patches folder. Go to your buildroot folder and then go to: output/build/host-m4-1.4.18/lib (copy the patch file in this directory), then apply the patch: patch -ruN < 04-fix-sigstksz.patch

for libfakeroot.c: apply from 1 to 5: https://bugs.archlinux.org/task/69572 (go to the bottom of the page). go again to the buildroot directory and then, go to: output/build/host-fakeroot-1.20.2 copy the five patches in this directory and apply them: patch -ruN < 0001-libfakeroot.c-define-_STAT_VER-if-not-already-define.patch

then, patch -ruN < 0002-libfakeroot.c-add-wrappers-for-new-glibc-2.33-symbol.patch

then, patch -ruN < 0003-libfakeroot.c-fix-compile-error-with-DEBUG-enabled.patch

then, patch -ruN < 0004-configure.ac-fix-__xmknod-at-pointer-argument.patch

then, patch -ruN < 0005-libfakeroot.c-fix-fts_read-and-fts_children.patch

Then, go again to the buildroot directory and try compiling again with make.

If you use windows I recommend to use wsl instead of virtualbox.