Created attachment 248291 [details] ctf* patch to fix return value https://reviews.freebsd.org/D43743 - I want to fix ctfmerge's return value. Currently it silently ignores errors. Fixing this might cause ports to break (because they start failing when ctf* fails) so requesting an exp-run.
There seems to be 1 new failure: https://pkg-status.freebsd.org/gohan04/data/mainamd64PR276930-default-foo/2024-02-10_20h12m30s/logs/libcircllhist-g20221215.log
I don't think ctfmerge should fail when there are no CTF sections to merge. I mean, strip doesn't fail either if the file already has no symbol table. It should instead just generate an output file with no CTF section. This is related to bug #277036.
> I don't think ctfmerge should fail when there are no CTF sections to merge. Indeed, I would as well argue that is a bug in ctfmerge. That said, the current ctfmerge behaviour of silently ignoring errors is FreeBSD-specific hack, and there appears to be only one port that invokes ctf* when building without debug.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=95ca89cda1a6c4e0ef0b3f765c6563f1db0d23fa commit 95ca89cda1a6c4e0ef0b3f765c6563f1db0d23fa Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-02-14 14:48:42 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-02-14 20:53:11 +0000 ctfmerge: demote "No ctf sections found" to a warning If there are no CTF sections then ctfmerge just has nothing to do; it should not be an error. Note that ctfmerge has an option to require CTF: -t Make sure that all object files have a CTF section. Before this change, this option explicitly exited without error if none of the object files have CTF sections, with the comment: If we're verifying that C files have CTF, it's safe to assume that in this case, we're building only from assembly inputs. PR: 276930 Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43878 cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
Thanks Antoine for the exp-run. Robert I have committed a fix to demote the "no CTF" case to a warning in ctfmerge, so you should be able to leave the port as-is if you so choose.
Hi Ed, Thank you for the update. Will leave the port unchanged then.
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=49e126a03b6bebb17855fd830b2206c86f5eaa9a commit 49e126a03b6bebb17855fd830b2206c86f5eaa9a Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-02-14 14:48:42 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-03-25 22:27:08 +0000 ctfmerge: demote "No ctf sections found" to a warning If there are no CTF sections then ctfmerge just has nothing to do; it should not be an error. Note that ctfmerge has an option to require CTF: -t Make sure that all object files have a CTF section. Before this change, this option explicitly exited without error if none of the object files have CTF sections, with the comment: If we're verifying that C files have CTF, it's safe to assume that in this case, we're building only from assembly inputs. PR: 276930 Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43878 (cherry picked from commit 95ca89cda1a6c4e0ef0b3f765c6563f1db0d23fa) cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)