Opened 2 years ago
Last modified 23 months ago
#66189 assigned defect
gsed 4.9 fails to build with gcc-4.2 (10.5.8, 10.6.8)
Reported by: | barracuda156 | Owned by: | Schamschula (Marius Schamschula) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | snowleopard, leopard | Cc: | ballapete (Peter "Pete" Dyballa) |
Port: | gsed |
Description
sed/compile.c: In function 'bad_command': sed/compile.c:206: error: #pragma GCC diagnostic not allowed inside functions sed/compile.c:207: error: #pragma GCC diagnostic not allowed inside functions sed/compile.c:209: error: #pragma GCC diagnostic not allowed inside functions make[2]: *** [sed/sed-compile.o] Error 1
Attachments (1)
Change History (11)
comment:1 follow-up: 2 Changed 2 years ago by Schamschula (Marius Schamschula)
comment:2 follow-up: 4 Changed 2 years ago by barracuda156
Replying to Schamschula:
Maybe need to use a different compiler?
Unless those are patched out, we need to blacklist ancient compilers. (I do not want to make a PR for this myself, because a) maybe there is a better solution than blacklist and b) I have too many PRs open which no one helps to merge LOL.)
comment:3 Changed 2 years ago by Schamschula (Marius Schamschula)
I have no way of testing this other than blindly committing possible solutions. My oldest active OS in Big Sur. PRs are welcome.
comment:4 Changed 2 years ago by kencu (Ken)
1 or 2 places, patch out. More than that, blacklist older gccs.
Then test it to make sure it actually runs.
Then PR it with proof it works and you’ll see it committed faster.
comment:5 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Cc: | ballapete added |
---|
comment:6 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
The same error happens on PPC Mac OS X 10.5.8, Leoprad
.
comment:7 follow-up: 9 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Easy workaround is to remove the three #pragma
lines.
comment:8 Changed 2 years ago by barracuda156
Summary: | gsed 4.9 fails to build on 10.6.8 with gcc-4.2 → gsed 4.9 fails to build with gcc-4.2 (10.5.8, 10.6.8) |
---|
Changed 23 months ago by ballapete (Peter "Pete" Dyballa)
Attachment: | gsed_compile.c-modern-pragmas.diff added |
---|
Possible patch for use by old compilers
comment:9 Changed 23 months ago by barracuda156
comment:10 Changed 23 months ago by ballapete (Peter "Pete" Dyballa)
What is a "PR"? Patch Request? Another option is to use a more up-to-date C compiler. It's up to the maintainer to decide which way is easier (for me it's the latter).
Maybe need to use a different compiler?