Created attachment 243996 [details] Patch to fix build binutils has ansidecls.h which gets picked up before the sdcc version which breaks the build. Patch the files which use it to use a relative path. Reported by: Holm Tiffe <holm@freibergnet.de>
(In reply to Daniel O'Connor from comment #0) I got this error when building in poudriere: https://gist.github.com/lwhsu/dbe061a8f9f317086722125915954241 Can you help checking this?
Hi Li-Wen, That is very odd, I don't understand why my patch would have affected it including bfd.h.. There is a bfd.h in the source but I don't see how it would get found by asxxxx.c - all very confusing. I will take a look but it seems like a tricky problem.
Hi Li-Wen, I've tried to reproduce the problem but I can't make it fail for me - unfortunately I don't have a Poudriere setup. I tried moving my bfd.h out of the way but it still builds fine. Also I just can't see how my changes would affect the build in that way. If you build the original port without my current patches does it work?
(In reply to Daniel O'Connor from comment #3) Weird, I updated my ports tree and test again, with and without the patch and now both are fine. I'm sorry for the noise and I'll handle this soon.
Daniel, the MAINTAINER field of this port is darius AT dons.net.au while this ticket is submitted by (and the maintainer-approval flag is set by) doconnor AT gsoft.com.au. From the name I can tell these should belong to the same person, but to be more formal, can you use the account of the actual maintainer, who submitted bug 246714, to verify this? BTW if you want to change email for the account, we can do accounts merging for you.
Comment on attachment 243996 [details] Patch to fix build <changes hats>
Committed and pushed. While here, fixed some minor `portlint -abct` warnings.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f565698366db8cb2e990f24346416c3f9bf2d0de commit f565698366db8cb2e990f24346416c3f9bf2d0de Author: Daniel O'Connor <doconnor@gsoft.com.au> AuthorDate: 2023-08-15 01:40:43 +0000 Commit: Li-Wen Hsu <lwhsu@FreeBSD.org> CommitDate: 2023-08-15 01:40:43 +0000 lang/sdcc: Fix build if binutils is installed binutils has ansidecls.h which gets picked up before the sdcc version which breaks the build. Patch the files which use it to use a relative path. PR: 273037 lang/sdcc/Makefile | 2 +- .../files/patch-support_sdbinutils_libiberty_objalloc.c (new) | 11 +++++++++++ .../files/patch-support_sdbinutils_libiberty_spaces.c (new) | 11 +++++++++++ .../files/patch-support_sdbinutils_libiberty_xatexit.c (new) | 11 +++++++++++ .../files/patch-support_sdbinutils_libiberty_xmalloc.c (new) | 11 +++++++++++ .../files/patch-support_sdbinutils_libiberty_xmemdup.c (new) | 11 +++++++++++ 6 files changed, 56 insertions(+), 1 deletion(-)
Thanks Li-Wen