[Bug 272430] Building parts of build-tools appears to be broken

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 08 Jul 2023 23:51:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272430

--- Comment #4 from Kenneth Raplee <kenrap@kennethraplee.com> ---
I haven't and wasn't aware of that approach. Thanks for sharing that.

I'm still stuck though unfortunately:

[Creating objdir /usr/obj/usr/src/amd64.amd64/bin/cat...]
===> tests (cleandir)
rm -f cat_test cat_test.tmp Kyuafile Kyuafile.tmp
rm -rf checkdir
rm -f .depend .depend.*
rm -f cat.o cat.bc cat.ll cat.full.bc cat.full.ll cat cat.bc cat.ll cat.full
cat.debug cat.o cat.bc cat.ll cat.1.gz cat.1.cat.gz
rm -f .depend .depend.* GPATH GRTAGS GSYMS GTAGS
echo cat.full: /usr/lib/libc.a  >> .depend
cc  -O2 -pipe -fno-common   -fPIE -g -gz=zlib -MD  -MF.depend.cat.o -MTcat.o
-std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers
-Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings
-Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts
-Wnested-externs -Wold-style-definition -Wno-pointer-sign -Wdate-time
-Wmissing-variable-declarations -Wthread-safety -Wno-empty-body
-Wno-string-plus-int -Wno-unused-const-variable
-Wno-error=unused-but-set-parameter  -Qunused-arguments    -c
/usr/src/bin/cat/cat.c -o cat.o
cc -O2 -pipe -fno-common -fPIE -g -gz=zlib -std=gnu99 -Wno-format-zero-length
-fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
-Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter
-Wcast-align -Wchar-subscripts -Wnested-externs -Wold-style-definition
-Wno-pointer-sign -Wdate-time -Wmissing-variable-declarations -Wthread-safety
-Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable
-Wno-error=unused-but-set-parameter -Qunused-arguments  -Wl,-zrelro -pie   -o
cat.full cat.o  
objcopy --only-keep-debug cat.full cat.debug
objcopy --strip-debug --add-gnu-debuglink=cat.debug  cat.full cat
gzip -cn /usr/src/bin/cat/cat.1 > cat.1.gz
===> tests (all)
[Creating objdir /usr/obj/usr/src/amd64.amd64/bin/cat/tests...]
echo '#! /usr/libexec/atf-sh' > cat_test.tmp
cat /usr/src/contrib/netbsd-tests/bin/cat/t_cat.sh >>cat_test.tmp
cat: stdout: Bad file descriptor
*** Error code 1

Stop.
make[1]: stopped in /usr/src/bin/cat/tests
*** Error code 1

Stop.
make: stopped in /usr/src/bin/cat
_________________________________

# git log -n 1            
commit 055f920ebe21b8e05235363bc11a83cc649cdc6a (HEAD -> main, origin/main,
origin/HEAD)
Author: Martin Matuska <mm@FreeBSD.org>
Date:   Sun Jul 9 01:04:25 2023 +0200

    cat: fallback on EBADF with copy_file_range(2)

    When stdout is opened with O_APPEND, copy_file_range(2) fails with EBADF.

-- 
You are receiving this mail because:
You are the assignee for the bug.