Subject: Re: build of alpha (cross from amd64) fails in
To: None <current-users@netbsd.org, port-alpha@netbsd.org>
From: Rhialto <rhialto@falu.nl>
List: current-users
Date: 09/24/2005 03:17:27
On Sat 24 Sep 2005 at 02:58:04 +0200, Rhialto wrote:
> But the following seems to be a real problem. A missing header include
> perhaps? <sys/socket.h> defines MSG_OOB but it does not seem to be
> included.

Adding #include <sys/socket.h> to sys/compat/osf1/osf1_cvt.c seems to
fix the problem.

The build then fails a few files further down. AF_LINK is again defined
in <sys/socket.h> but bsd_msghdr is not so clear. Nevertheless adding 
#include <sys/socket.h> here also makes it complete the directory.

Here is my proposed patch first, then the failure before applying it.

Index: osf1_cvt.c
===================================================================
RCS file: /cvsroot/src/sys/compat/osf1/osf1_cvt.c,v
retrieving revision 1.18
diff -u -r1.18 osf1_cvt.c
--- osf1_cvt.c	26 Feb 2005 23:10:21 -0000	1.18
+++ osf1_cvt.c	24 Sep 2005 01:14:41 -0000
@@ -82,6 +82,7 @@
 #include <sys/resource.h>
 #include <sys/resourcevar.h>
 #include <sys/wait.h>
+#include <sys/socket.h>
 #include <uvm/uvm.h>				/* XXX see mmap emulation */
 
 #include <nfs/rpcv2.h>
Index: osf1_socket.c
===================================================================
RCS file: /cvsroot/src/sys/compat/osf1/osf1_socket.c,v
retrieving revision 1.11
diff -u -r1.11 osf1_socket.c
--- osf1_socket.c	1 Jun 2005 15:34:15 -0000	1.11
+++ osf1_socket.c	24 Sep 2005 01:14:41 -0000
@@ -69,6 +69,7 @@
 #include <sys/sa.h>
 #include <sys/syscallargs.h>
 #include <sys/socketvar.h>
+#include <sys/socket.h>
 #include <sys/exec.h>
 
 #include <compat/osf1/osf1.h>




dependall ===> sys/lkm/compat/osf1
     create  osf1/osf1_cvt.d
     create  osf1/.depend
    compile  osf1/osf1_cvt.o
    compile  osf1/osf1_errno.o
    compile  osf1/osf1_signo.o
    compile  osf1/osf1_descrip.o
    compile  osf1/osf1_exec.o
    compile  osf1/osf1_file.o
    compile  osf1/osf1_generic.o
    compile  osf1/osf1_ioctl.o
    compile  osf1/osf1_misc.o
    compile  osf1/osf1_mmap.o
    compile  osf1/osf1_mount.o
    compile  osf1/osf1_prot.o
    compile  osf1/osf1_resource.o
    compile  osf1/osf1_signal.o
    compile  osf1/osf1_socket.o
/vol1/rhialto/cvs/src/sys/compat/osf1/osf1_socket.c: In function `osf1_sys_sendmsg_xopen':
/vol1/rhialto/cvs/src/sys/compat/osf1/osf1_socket.c:101: error: storage size of `bsd_msghdr' isn't known
/vol1/rhialto/cvs/src/sys/compat/osf1/osf1_socket.c:124: error: invalid application of `sizeof' to an incomplete type
/vol1/rhialto/cvs/src/sys/compat/osf1/osf1_socket.c:101: warning: unused variable `bsd_msghdr'
/vol1/rhialto/cvs/src/sys/compat/osf1/osf1_socket.c: In function `osf1_sys_socket':
/vol1/rhialto/cvs/src/sys/compat/osf1/osf1_socket.c:203: error: `AF_LINK' undeclared (first use in this function)
/vol1/rhialto/cvs/src/sys/compat/osf1/osf1_socket.c:203: error: (Each undeclared identifier is reported only once
/vol1/rhialto/cvs/src/sys/compat/osf1/osf1_socket.c:203: error: for each function it appears in.)
/vol1/rhialto/cvs/src/sys/compat/osf1/osf1_socket.c: In function `osf1_sys_socketpair':
/vol1/rhialto/cvs/src/sys/compat/osf1/osf1_socket.c:224: error: `AF_LINK' undeclared (first use in this function)

*** Failed target:  osf1_socket.o
*** Failed command: /vol1/rhialto/tools.amd64/bin/alpha--netbsd-gcc -O2 -ffreestanding -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Werror -mieee -mno-fp-regs -DSYSVSEM -DSYSVMSG -DSYSVSHM -DCOMPAT_OSF1 -nostdinc -nostdinc -I. -I/vol1/rhialto/cvs/src/sys/lkm/compat/osf1 -isystem /vol1/rhialto/cvs/src/sys -isystem /vol1/rhialto/cvs/src/sys/arch -D_KERNEL -D_LKM -c /vol1/rhialto/cvs/src/sys/compat/osf1/osf1_socket.c
*** Error code 1

Stop.
nbmake: stopped in /vol1/rhialto/cvs/src/sys/lkm/compat/osf1

*** Failed target:  dependall
*** Failed command: cd /vol1/rhialto/cvs/src/sys/lkm/compat/osf1; /vol1/rhialto/tools.amd64/bin/nbmake realall
*** Error code 1

Stop.
nbmake: stopped in /vol1/rhialto/cvs/src/sys/lkm/compat/osf1

*** Failed target:  dependall-osf1
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="sys/lkm/compat/"; real="/vol1/rhialto/cvs/src/sys/lkm/compat" ;; *) this="sys/lkm/compat/${dir}/"; real="/vol1/rhialto/cvs/src/sys/lkm/compat/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /vol1/rhialto/tools.amd64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget osf1 dependall
*** Error code 1

Stop.
nbmake: stopped in /vol1/rhialto/cvs/src/sys/lkm/compat

*** Failed target:  dependall-compat
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="sys/lkm/"; real="/vol1/rhialto/cvs/src/sys/lkm" ;; *) this="sys/lkm/${dir}/"; real="/vol1/rhialto/cvs/src/sys/lkm/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /vol1/rhialto/tools.amd64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget compat dependall
*** Error code 1

Stop.
nbmake: stopped in /vol1/rhialto/cvs/src/sys/lkm

*** Failed target:  dependall-lkm
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="sys/"; real="/vol1/rhialto/cvs/src/sys" ;; *) this="sys/${dir}/"; real="/vol1/rhialto/cvs/src/sys/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /vol1/rhialto/tools.amd64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget lkm dependall
*** Error code 1

Stop.
nbmake: stopped in /vol1/rhialto/cvs/src/sys

*** Failed target:  dependall-sys
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/vol1/rhialto/cvs/src" ;; *) this="${dir}/"; real="/vol1/rhialto/cvs/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /vol1/rhialto/tools.amd64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget sys dependall
*** Error code 1

Stop.
nbmake: stopped in /vol1/rhialto/cvs/src

*** Failed target:  do-build
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/vol1/rhialto/cvs/src" ;; *) this="${dir}/"; real="/vol1/rhialto/cvs/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /vol1/rhialto/tools.amd64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . dependall BUILD_tools=no BUILD_lib=no
*** Error code 1

Stop.
nbmake: stopped in /vol1/rhialto/cvs/src

*** Failed target:  build
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/vol1/rhialto/cvs/src" ;; *) this="${dir}/"; real="/vol1/rhialto/cvs/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /vol1/rhialto/tools.amd64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . do-build
*** Error code 1

Stop.
nbmake: stopped in /vol1/rhialto/cvs/src

*** Failed target:  distribution
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/vol1/rhialto/cvs/src" ;; *) this="${dir}/"; real="/vol1/rhialto/cvs/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /vol1/rhialto/tools.amd64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . build NOPOSTINSTALL=1
*** Error code 1

Stop.
nbmake: stopped in /vol1/rhialto/cvs/src

*** Failed target:  release
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/vol1/rhialto/cvs/src" ;; *) this="${dir}/"; real="/vol1/rhialto/cvs/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /vol1/rhialto/tools.amd64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . distribution
*** Error code 1

Stop.
nbmake: stopped in /vol1/rhialto/cvs/src

ERROR: Failed to make release
*** BUILD ABORTED ***

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert      -- You author it, and I'll reader it.
\X/ rhialto/at/xs4all.nl        -- Cetero censeo "authored" delendum esse.