NetBSD-Bugs archive

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

Re: toolchain/42470: tools doesn't build on FreeBSD 7.2

Am 18.12.2009 14:20, schrieb
Number:         42470
Category:       toolchain
Synopsis:       tools doesn't build on FreeBSD 7.2
Confidential:   no
Severity:       serious
Priority:       medium
Responsible:    toolchain-manager
State:          open
Class:          sw-bug
Submitter-Id:   net
Arrival-Date:   Fri Dec 18 13:20:00 +0000 2009
Originator:     Aleksej Saushev
FreeBSD 7.2-RELEASE-p4 i386
" tools" breaks at:

#      link  binstall/xinstall
cc -O -I/var/home/asau/wrk/netbsd/src/../obj/tools/compat 
-I/var/home/asau/wrk/netbsd/src/tools/binstall/../compat -DHAVE_NBTOOL_CONFIG_H=1  
-D_FILE_OFFSET_BITS=64  -I/var/home/asau/wrk/netbsd/src/tools/binstall/../compat/sys 
 -I/var/home/asau/wrk/netbsd/src/usr.sbin/mtree   -o xinstall xinstall.lo getid.lo 
-L/var/home/asau/wrk/netbsd/src/../obj/tools/compat -lnbcompat -lz
xinstall.lo(.text+0xf3b): In function `do_symlink':
: warning: warning: mktemp() possibly used unsafely; consider using mkstemp()
 In function `SHA512_Final':
: undefined reference to `be64enc'

The problem is that be64enc is defined in sys/endian.h, but it is:
"static __inline void be64enc(void *pp, uint64_t u)"

common/lib/libc/hash/sha2/sha2.c contains following:

#    include<sys/endian.h>
#  else

but nbtool_config.h doesn't define HAVE_SYS_ENDIAN_H,
it defines HAVE_MACHINE_ENDIAN_H instead.
In fact, tools/compat/ doesn't have HAVE_SYS_ENDIAN_H,
hence no traces of it in the output.

tools/compat/ contains test:

AC_CHECK_DECLS([be16enc, le16enc, be16dec, le16dec, be32enc, le32enc, be32dec, 
le32dec, be64enc, le64enc, be64dec, le64dec],,, [#include<sys/endian.h>])

but it doesn't check sys/endian.h presense.

./ -m i386 tools
sha2.c references be64enc still, I don't know how this is to be handled.
For me this change suffices (after running autoconf in tools/compat):

Index: tools/compat/
RCS file: /home/asau/ext/wrk/netbsd/../../netbsd/src/tools/compat/,v
retrieving revision 1.70
diff -u -r1.70
--- tools/compat/   16 Jun 2009 22:35:34 -0000      1.70
+++ tools/compat/   18 Dec 2009 13:09:21 -0000
@@ -80,7 +80,7 @@
  AC_CHECK_HEADERS(sys/mtio.h sys/sysmacros.h sys/syslimits.h \
         getopt.h features.h malloc.h sys/poll.h stddef.h)
-AC_CHECK_HEADERS(sys/bswap.h machine/bswap.h sys/cdefs.h machine/endian.h \
+AC_CHECK_HEADERS(sys/bswap.h machine/bswap.h sys/cdefs.h machine/endian.h 
sys/endian.h \
         sys/featuretest.h err.h inttypes.h libgen.h paths.h stdint.h util.h \
         resolv.h arpa/nameser.h,,
         [test -f include/$ac_header || touch include/$ac_header])
Index: tools/compat/
RCS file: 
retrieving revision 1.23
diff -u -r1.23
--- tools/compat/     16 Jun 2009 22:35:34 -0000      1.23
+++ tools/compat/     18 Dec 2009 12:58:11 -0000
@@ -336,6 +336,9 @@
  /* Define if you have the<machine/endian.h>  header file. */

+/* Define if you have the<sys/endian.h>  header file. */
  /* Define if you have the<malloc.h>  header file. */
  #undef HAVE_MALLOC_H

You have to regenerate "configure" and "" from "" with autoconfig. cd ${SRCDIR}/tools/compat && ${TOOLDIR}/bin/nbmake-${MACHINE} regen.

    You can look at 42440 from 11.12.2009 .

Home | Main Index | Thread Index | Old Index