tech-toolchain archive

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

Re: building -8 tools under -10 fails (redefinition of be32enc)



In article <aCNnvh+oQLodzNrs%trav.math.uni-bonn.de@localhost>,
Edgar Fuß  <ef%math.uni-bonn.de@localhost> wrote:
>Trying to build -8 under -10 fails during the tools build:
>
>#   compile  libctf/ctf_create.lo
>cc -O  -DCTF_OLD_VERSIONS -I/usr/src-8/tools/libctf/../compat 
>-I/usr/src-8/tools/libctf/../../external/cddl/osnet/sys 
>-I/usr/src-8/tools/libctf/../../external/cddl/osnet/include 
>-I/usr/src-8/tools/libctf/../../external/cddl/osnet/dist/head 
>-I/usr/src-8/tools/libctf/../../external/cddl/osnet/dist/common/ctf 
>-I/usr/src-8/tools/libctf/../../external/cddl/osnet/dist/lib/libctf/common
>-I/usr/src-8/tools/libctf/../../external/cddl/osnet/dist/uts/common 
>-I/usr/src-8/tools/libctf/../../external/bsd/elftoolchain/dist/libelf
>-DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 
>-I/var/work/obj-8/tooldir.NetBSD-10.1-amd64/include/compat
>-I/usr/src-8/tools/compat  -DHAVE_NBTOOL_CONFIG_H=1
>-D_FILE_OFFSET_BITS=64
>-I/var/work/obj-8/tooldir.NetBSD-10.1-amd64/include
>-I/var/work/obj-8/tooldir.NetBSD-10.1
> -amd64/include/nbinclude -c -o ctf_create.lo.o   
>/usr/src-8/tools/libctf/../../external/cddl/osnet/dist/common/ctf/ctf_create.c
>In file included from
>/var/work/obj-8/tooldir.NetBSD-10.1-amd64/include/compat/nbtool_config.h:871,
>                 from
>/usr/src-8/tools/libctf/../../external/cddl/osnet/dist/common/ctf/ctf_create.c:23:
>/usr/src-8/tools/libctf/../compat/compat_defs.h:1091:22: error:
>redefinition of 'be16enc'
> 1091 | __GEN_ENDIAN_ENC(16, be)
>      |                      ^~
>/usr/src-8/tools/libctf/../compat/compat_defs.h:1085:1: note: in
>definition of macro '__GEN_ENDIAN_ENC'
> 1085 | endian ## bits ## enc(void *dst, uint ## bits ## _t u) \
>      | ^~~~~~
>In file included from /usr/include/amd64/endian.h:3,
>                 from
>/usr/src-8/tools/libctf/../../external/cddl/osnet/sys/machine/endian.h:32,
>                 from /usr/include/sys/types.h:98,
>                 from
>/usr/src-8/tools/libctf/../../external/cddl/osnet/sys/sys/types.h:77,
>                 from /usr/src-8/tools/libctf/../compat/compat_defs.h:35,
>                 from
>/var/work/obj-8/tooldir.NetBSD-10.1-amd64/include/compat/nbtool_config.h:871,
>                 from
>/usr/src-8/tools/libctf/../../external/cddl/osnet/dist/common/ctf/ctf_create.c:23:
>/usr/include/sys/endian.h:207:1: note: previous definition of 'be16enc'
>was here
>  207 | __GEN_ENDIAN_ENC(16, be)

Add this to /usr/src/sys/sys/endian.h...
Perhaps we should patch that file from HEAD, but 8 is out of support.


christos

@@ -190,6 +192,8 @@ __END_DECLS
  * to/from an octet stream.
  */
 
+#ifdef _NETBSD_SOURCE
+
 #if __GNUC_PREREQ__(2, 95)
 
 #define __GEN_ENDIAN_ENC(bits, endian) \
@@ -335,6 +339,8 @@ le64dec(const void *buf)
 
 #endif /* GCC >= 2.95 */
 
+#endif /* _NETBSD_SOURCE */
+
 #endif /* !_LOCORE */
 #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
 #endif /* !_SYS_ENDIAN_H_ */




Home | Main Index | Thread Index | Old Index