NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-amiga/56188: port-amiga does not cross-build (build.sh) on Darwin due to heapsort definition
>Number: 56188
>Category: port-amiga
>Synopsis: port-amiga does not cross-build (build.sh) on Darwin due to heapsort definition
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-amiga-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 18 18:30:00 +0000 2021
>Originator: Chris Pinnock
>Release: Observed on both NetBSD 9.2 sources and latest current
>Organization:
>Environment:
Darwin MacMini-8795 20.4.0 Darwin Kernel Version 20.4.0: Thu Apr 22 21:46:47 PDT 2021; root:xnu-7195.101.2~1/RELEASE_X86_64 x86_64
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin20.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
>Description:
The build of the amiga port fails on Darwin in the standalone section.
This appears to be due to the override in the compat headers of the
function heapsort.
# create amiga-elf2bb/elf2bb.d
/Volumes/TimeMachine/Chris/NetBSD/current/src/../objects/amiga/tooldir.Darwin-20.4.0-x86_64/bin/nbhost-mkdep -f elf2bb.d.tmp -- -I/Volumes/TimeMachine/Chris/NetBSD/current/src/tools/amiga-elf2bb -no-cpp-precomp -I/Volumes/TimeMachine/Chris/NetBSD/current/src/../objects/amiga/tooldir.Darwin-20.4.0-x86_64/include/compat -I/Volumes/TimeMachine/Chris/NetBSD/current/src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -I. /Volumes/TimeMachine/Chris/NetBSD/current/src/tools/amiga-elf2bb/../../sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c && mv -f elf2bb.d.tmp elf2bb.d
# create amiga-elf2bb/.depend
rm -f .depend
/Volumes/TimeMachine/Chris/NetBSD/current/src/../objects/amiga/tooldir.Darwin-20.4.0-x86_64/bin/nbhost-mkdep -s .lo\ .ln\ .d -d -f .depend chksum.d elf2bb.d
# compile amiga-elf2bb/elf2bb.lo
cc -O -I/Volumes/TimeMachine/Chris/NetBSD/current/src/tools/amiga-elf2bb -no-cpp-precomp -I/Volumes/TimeMachine/Chris/NetBSD/current/src/../objects/amiga/tooldir.Darwin-20.4.0-x86_64/include/compat -I/Volumes/TimeMachine/Chris/NetBSD/current/src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -I. -c -o elf2bb.lo.o /Volumes/TimeMachine/Chris/NetBSD/current/src/tools/amiga-elf2bb/../../sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c
/Volumes/TimeMachine/Chris/NetBSD/current/src/tools/amiga-elf2bb/../../sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:373:3: error: implicit declaration of function '__nbcompat_heapsort' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
heapsort(relbuf, r32sz, 4, intcmp);
^
/Volumes/TimeMachine/Chris/NetBSD/current/src/tools/compat/compat_defs.h:465:18: note: expanded from macro 'heapsort'
#define heapsort __nbcompat_heapsort
^
/Volumes/TimeMachine/Chris/NetBSD/current/src/tools/amiga-elf2bb/../../sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:424:50: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
printf("using %d bytes, %d bytes remaining.\n", delta > 0 ?
~~ ^~~~~~~~~~~
%ld
/Volumes/TimeMachine/Chris/NetBSD/current/src/tools/amiga-elf2bb/../../sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:425:46: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
rpo-buffer-tsz-dsz : buffer+bbsize-rpo, delta > 0 ?
^~~~~~~~~~~
2 warnings and 1 error generated.
*** Failed target: elf2bb.lo
*** Failed commands:
${_MKTARGET_COMPILE}
${HOST_COMPILE.c} -o ${.TARGET}.o ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
${MV} ${.TARGET}.o ${.TARGET}
*** [elf2bb.lo] Error code 1
>How-To-Repeat:
./build -m amiga -U build
on a Darwin machine with either NetBSD 9.2 or current sources
>Fix:
Removing the #define in tools/compat/compat_defs.h on line 465 (current)
redefining heapsort to the nbcompat one allows the build to complete but is unlikely to be the correct answer.
Home |
Main Index |
Thread Index |
Old Index