Current-Users archive

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

Re: Build failure for port-alpha



> With sources from 2013-01-07 at 03:48:25 UTC, I see the following
> failures for 'build.sh release'
>
> #   compile  ipsend/ipsend.o
...
> In file included from
> /build/netbsd-local/dest/alpha/usr/include/machine/param.h:50:0,
>                  from
>                  /build/netbsd-local/dest/alpha/usr/include/sys/param.h:165,
>                  from
>                  
> /build/netbsd-local/src/external/bsd/ipf/dist/ipsend/ipsend.c:12:
> /build/netbsd-local/dest/alpha/usr/include/machine/cpu.h:86:26: fatal
> error: sys/cpu_data.h: No such file or directory

Yes, I'm seeing the same.  sys/cpu_data.h is not being installed
in the target include dir, but that change dates back to 10 Oct 2004.

However, alpha's cpu.h includes <sys/cpu_data.h> under _KMEMUSER,
and it looks like "struct cpu_data ci_data" needs to be part of
what's visible of "struct cpu_info" under _KMEMUSER (I tried to
move the #ifndef but that lead to more problems).

What I did to my local source tree was to mend those _KMEMUSER
programs to point into the source tree's sys/ directory for
include files.  This feels like the wrong fix to me...

Index: external/bsd/ipf/bin/ipsend/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/ipf/bin/ipsend/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- external/bsd/ipf/bin/ipsend/Makefile        2 Jan 2013 15:50:34 -0000       
1.3
+++ external/bsd/ipf/bin/ipsend/Makefile        7 Jan 2013 14:39:57 -0000
@@ -17,6 +17,9 @@
 # There is some very dubious code to locate the values of
 # tcb.rcv_adv, tcb.snd_nxt and tcb.rcv_nxt for a socket.
 CPPFLAGS+=     -D_KMEMUSER
+# Alpha needs sys/cpu_data.h
+S=             ${NETBSDSRCDIR}/sys
+CPPFLAGS+=     -I ${S}
 
 CLEANFILES+=   iplang_y.c iplang_y.h
 
Index: usr.sbin/pstat/Makefile
===================================================================
RCS file: /cvsroot/src/usr.sbin/pstat/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- usr.sbin/pstat/Makefile     2 Jan 2013 10:43:11 -0000       1.16
+++ usr.sbin/pstat/Makefile     7 Jan 2013 14:39:57 -0000
@@ -16,6 +16,7 @@
 CPPFLAGS+=-I${NETBSDSRCDIR}/sbin/swapctl
 
 CPPFLAGS+=-D_KMEMUSER
+CPPFLAGS+=-I${NETBSDSRCDIR}/sys/
 
 .PATH: ${NETBSDSRCDIR}/sbin/swapctl
 
This allows the build to complete, but is probably not right.

Hmm, my change revision 1.75 of alpha/include/cpu.h dating
december 26 2010 may have something to do with this; I wrote:

Since struct cpu_data isn't the first member in struct cpu_info, instead
expose the initial portion of struct cpu_info if _KMEMUSER is defined.

The "not the first member" probably comes from (alpha/include/cpu.h):

struct cpu_info {
        /*
         * Private members accessed in assembly with 8 bit offsets.
         */
        struct lwp *ci_fpcurlwp;        /* current owner of the FPU */
        paddr_t ci_curpcb;              /* PA of current HW PCB */

and a rough estimate with the naked eye says that struct cpu_data
is more than 256 bytes long on alpha.

I'm not sure how to properly solve this.

Regards,

- Havard


Home | Main Index | Thread Index | Old Index