-
Notifications
You must be signed in to change notification settings - Fork 83
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
Error on building agbcc ([Makefile:81: expr.o] Error 1) #69
Comments
Try the following patch: diff --git a/gcc/expr.h b/gcc/expr.h
index 466b4b1..e7f8f79 100755
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -356,7 +356,7 @@ typedef struct optab
#define GEN_FCN(CODE) (*insn_gen_function[(int) (CODE)])
#endif
-extern rtx (*const insn_gen_function[]) (rtx, ...);
+extern rtx (*const insn_gen_function[]) ();
extern optab add_optab;
extern optab sub_optab; |
This resolve this issue. Thank you so much! But there is another problem: The build stop here |
Fix the same thing in |
I did, but the error still the same (even with a fresh git clone and modifying these files) |
Re-clone the repository and try this patch: https://cdn.discordapp.com/attachments/528962845648355353/1239686241608405032/0001-Fix-building-with-GCC-14-and-Clang-16.patch?ex=6643d348&is=664281c8&hm=9aad9e12c32045ddebad4eac7a7e71603ece43e89683cf48fcc1eb0e1dd22d2e& The underlying issue is that GCC 14 broke a bunch of things but nobody has this version of the compiler yet, so if this still doesn't work, I encourage you to either downgrade GCC or try a different distribution until some of us have had time to get this new version and fix it. |
Ok I will try, thank you very much. But Why gcc 14 broke all? |
I don't know why, exactly, but the gcc 14 update enables some -Werror flags by default, refusing to compile older code. |
@mid-kid I just got into trying out pokemon decomp and ran into this exact issue, to find that you had posted a patch 3 minutes ago! After applying this patch and fixing a couple of seemingly separate problems in the agbcc configure scripts I've successfully built a working sapphire ROM. Thanks! (gcc version 14.1.1 20240507). |
What separate problems? |
Sorry, I was about to write an issue but realised that the configure script problems were introduced by the patch itself, they weren't separate. 1: In
This is a separate case statement to the check for 2: By commenting out the body of the if statement here:
The if statement fails to parse. Commenting out the whole if statement works. My changes fixed the above patch on my machine: index c350e76..9e64093 100755
--- a/gcc_arm/configure
+++ b/gcc_arm/configure
@@ -2892,9 +2892,7 @@ for machine in $build $host $target; do
*-*-linux-gnu*)
xm_defines="HAVE_ATEXIT POSIX BSTRING"
;;
- esac
- case $machine in
# Support site-specific machine types.
arm*-*-elf)
tm_file=arm/unknown-elf.h
@@ -3454,9 +3452,9 @@ if test -f ../binutils/Makefile; then
fi
# If we have ld in the build tree, make a link to it.
-if test -f ../ld/Makefile; then
+#if test -f ../ld/Makefile; then
# rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
-fi
+#fi
# Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 |
@mid-kid Could you provide another source for that patch? The link seems to have timed out. |
agbcc compiled on macos shows the following error at the end:
|
can confirm that @superluserdo's fix works, patch file attached |
Did you find a fix for your error?
|
@miamilabs did you apply the patch i linked above? |
I did apply both patches so this was the reason why it still did not work. Thank you for the effort and sharing |
Yes, only one final patch is needed. |
Hello, I'm on Arch Linux (EndeavourOS distro). I installed with pacman all dependencies listed in the INSTALL.md but when i try to build agbcc it fail with:
make: *** [Makefile:81: expr.o] Error 1
make: exit from directory «/home/***/pokemon-emerald/agbcc/gcc»
Here full log file: https://pastebin.com/iWbB2jU0
The issue is similar to this
The text was updated successfully, but these errors were encountered: