hello.  Following up on this post, I've just confirmed the source tree 
I'm working from is
still good by building from it using a NetBSD-9.99.77 build host.
Up to now, it has been my experience  generally I could build any version of 
NetBSD on any
other version of NetBSD as a build host.  Is it still a project goal this 
should be the case?

I'm thinking there should be a simple fix for these errors, but I'm getting 
lost in the tangle
of steps between the publishing of tools/compat/configure.ac and the generation 
of the
config.status file in the object tree, which doesn't have the right bits set.

-thanks
-Brian


        Hello.  I realize in writing this I'm discussing two unsupported 
branches of NetBSD, but
I'd like to understand how to tackle  this problem in the general case.
the issue seems to be that the tools/compat library under sources for 
NetBSD-9.99.77 won't
build under NetBSD version 10.99.12.  Specifically, the issue has to do with 
the fact some
macros defined in sys/endian.h under 10.99.12 are not recognized by the 
tool/compat code under
9.99.77 causing the compiler to complain there are multiple definitions for the 
same macros.
In looking at tools/compat/configure.ac, version 1.98 (9.99.77) versus 1.108 
(10.99.12), I
don't see any differences obviously related to the endian macros.  The error 
snippet below
shows the problem.  If anyone has any ideas on how to go about making this 
issue go away, that
would be helpful.  The src-9.99.77 tree was building fine up to the point where 
I upgraded the
build host to 10.99.12.

-thanks
-Brian

Command used to build the sources.

./build.sh -D /var/tmp/netbsd-9977-64 -O /usr/local/netbsd/obj-9977-64 -j 4 
release

Errors:

cc -O   -DCTF_OLD_VERSIONS -I/usr/local/netbsd/src-9977/tools/libctf/../compat  
-I/usr/local/netbsd/src-9977/tools/libctf/../../external/cddl/osnet/sys  
-I/usr/local/netbsd/src-9977/tools/libctf/../../external/cddl/osnet/include  
-I/usr/local/netbsd/src-9977/tools/libctf/../../external/cddl/osnet/dist/head  
-I/usr/local/netbsd/src-9977/tools/libctf/../../external/cddl/osnet/dist/common/ctf
  
-I/usr/local/netbsd/src-9977/tools/libctf/../../external/cddl/osnet/dist/lib/libctf/common
  
-I/usr/local/netbsd/src-9977/tools/libctf/../../external/cddl/osnet/dist/uts/common
  
-I/usr/local/netbsd/src-9977/tools/libctf/../../external/bsd/elftoolchain/dist/libelf
 -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64  
-I/usr/local/netbsd/obj-9977-64/tooldir.NetBSD-10.99.12-amd64/include/compat 
-I/usr/local/netbsd/src-9977/tools/compat  -DHAVE_NBTOOL_CONFIG_H=1 
-D_FILE_OFFSET_BITS=64 
-I/usr/local/netbsd/obj-9977-64/tooldir.NetBSD-10.99.12-amd64/include 
-I/usr/local/netbsd/obj-9977-64/tooldir.NetBS!
 D-10.99.12-amd64/include/nbinclude --- ctf_decl.lo ---
-c -o ctf_decl.lo.o    
/usr/local/netbsd/src-9977/tools/libctf/../../external/cddl/osnet/dist/common/ctf/ctf_decl.c
--- ctf_hash.lo ---
-c -o ctf_hash.lo.o    
/usr/local/netbsd/src-9977/tools/libctf/../../external/cddl/osnet/dist/common/ctf/ctf_hash.c
--- ctf_create.lo ---
In file included from 
/usr/local/netbsd/obj-9977-64/tooldir.NetBSD-10.99.12-amd64/include/compat/nbtool_config.h:921,
                 from 
/usr/local/netbsd/src-9977/tools/libctf/../../external/cddl/osnet/dist/common/ctf/ctf_create.c:23:
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1143:22: error: 
redefinition of 'be16enc'
 1143 | __GEN_ENDIAN_ENC(16, be)
      |                      ^~
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1137:1: note: 
in definition of macro '__GEN_ENDIAN_ENC'
 1137 | endian ## bits ## enc(void *dst, uint ## bits ## _t u) \
      | ^~~~~~
In file included from /usr/include/amd64/endian.h:3,
                 from 
/usr/local/netbsd/src-9977/tools/libctf/../../external/cddl/osnet/sys/machine/endian.h:32,
                 from /usr/include/sys/types.h:98,
                 from 
/usr/local/netbsd/src-9977/tools/libctf/../../external/cddl/osnet/sys/sys/types.h:81,
                 from 
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:100:
/usr/include/sys/endian.h:207:1: note: previous definition of 'be16enc' with 
type 'void(void *, uint16_t)' {aka 'void(void *, short unsigned int)'}
  207 | __GEN_ENDIAN_ENC(16, be)
      | ^~~~~~~~~~~~~~~~
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1146:22: error: 
redefinition of 'be32enc'
 1146 | __GEN_ENDIAN_ENC(32, be)
      |                      ^~
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1137:1: note: 
in definition of macro '__GEN_ENDIAN_ENC'
 1137 | endian ## bits ## enc(void *dst, uint ## bits ## _t u) \
      | ^~~~~~
/usr/include/sys/endian.h:208:1: note: previous definition of 'be32enc' with 
type 'void(void *, uint32_t)' {aka 'void(void *, unsigned int)'}
  208 | __GEN_ENDIAN_ENC(32, be)
      | ^~~~~~~~~~~~~~~~
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1149:22: error: 
redefinition of 'be64enc'
 1149 | __GEN_ENDIAN_ENC(64, be)
      |                      ^~
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1137:1: note: 
in definition of macro '__GEN_ENDIAN_ENC'
 1137 | endian ## bits ## enc(void *dst, uint ## bits ## _t u) \
      | ^~~~~~
/usr/include/sys/endian.h:209:1: note: previous definition of 'be64enc' with 
type 'void(void *, uint64_t)' {aka 'void(void *, long unsigned int)'}
  209 | __GEN_ENDIAN_ENC(64, be)
      | ^~~~~~~~~~~~~~~~
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1152:22: error: 
redefinition of 'le16enc'
 1152 | __GEN_ENDIAN_ENC(16, le)
      |                      ^~
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1137:1: note: 
in definition of macro '__GEN_ENDIAN_ENC'
 1137 | endian ## bits ## enc(void *dst, uint ## bits ## _t u) \
      | ^~~~~~
/usr/include/sys/endian.h:210:1: note: previous definition of 'le16enc' with 
type 'void(void *, uint16_t)' {aka 'void(void *, short unsigned int)'}
  210 | __GEN_ENDIAN_ENC(16, le)
      | ^~~~~~~~~~~~~~~~
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1155:22: error: 
redefinition of 'le32enc'
 1155 | __GEN_ENDIAN_ENC(32, le)
      |                      ^~
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1137:1: note: 
in definition of macro '__GEN_ENDIAN_ENC'
 1137 | endian ## bits ## enc(void *dst, uint ## bits ## _t u) \
      | ^~~~~~
/usr/include/sys/endian.h:211:1: note: previous definition of 'le32enc' with 
type 'void(void *, uint32_t)' {aka 'void(void *, unsigned int)'}
  211 | __GEN_ENDIAN_ENC(32, le)
      | ^~~~~~~~~~~~~~~~
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1158:22: error: 
redefinition of 'le64enc'
 1158 | __GEN_ENDIAN_ENC(64, le)
      |                      ^~
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1137:1: note: 
in definition of macro '__GEN_ENDIAN_ENC'
 1137 | endian ## bits ## enc(void *dst, uint ## bits ## _t u) \
      | ^~~~~~
/usr/include/sys/endian.h:212:1: note: previous definition of 'le64enc' with 
type 'void(void *, uint64_t)' {aka 'void(void *, long unsigned int)'}
  212 | __GEN_ENDIAN_ENC(64, le)
      | ^~~~~~~~~~~~~~~~
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1171:22: error: 
redefinition of 'be16dec'
 1171 | __GEN_ENDIAN_DEC(16, be)
      |                      ^~
/usr/local/netbsd/src-9977/tools/libctf/../compat/compat_defs.h:1164:1: note: 
in definition of macro '__GEN_ENDIAN_DEC'
 1164 | endian ## bits ## dec(const void *buf) \
      | ^~~~~~
/usr/include/sys/endian.h:224:1: note: previous definition of 'be16dec' with 
type 'uint16_t(const void *)' {aka 'short unsigned int(const void *)'}

Reply via email to