NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amiga/56188: port-amiga does not cross-build (build.sh) on Darwin due to heapsort definition



The following reply was made to PR port-amiga/56188; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: port-amiga/56188: port-amiga does not cross-build (build.sh) on
 Darwin due to heapsort definition
Date: Tue, 18 May 2021 20:32:27 +0000

 On Tue, May 18, 2021 at 06:30:01PM +0000, cjep%netbsd.org@localhost wrote:
  > 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. 
  > [...]
  > 
  > 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
  >                  ^
 
 The most likely cause of this is some unexpected misordering in the
 includes that causes the header with the heapsort declaration in it to
 be included before compat_defs.h, so that the rename doesn't get
 applied to it.
 
 Not entirely clear from here why this should be or where it's
 happening, but it should be easier to find out given the failed build.
 
 
  > /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
 
 This should be %td (for ptrdiff_t), I'll fix that.
 
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index