Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Nov 2016 18:36:39 -0800
From:      Mark Millard <markmi@dsl-only.net>
To:        Justin Hibbits <jhibbits@freebsd.org>, svn-src-head@freebsd.org, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860]
Message-ID:  <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net>
In-Reply-To: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net>
References:  <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
[Quick top post I'm afraid.]

I think that I figured out why there is a problem even earlier
--that just did not stop the compiles.

lib/libutil/kinfo_getallproc.c is built here as part of buildworld
(stage 4.2 "building libraries" instead of buildkernel. It does not
have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of
them).

So if it includes machine/pmap.h that binds to
sys/powerpc/include/pmap.h which has the structure. . .

. . .
#if defined(AIM)
. . . (definitions here)
#elif defined(BOOKE)
. . . (definitions here)
#endif
. . .

it gets no definition now.

With the older:

. . .
#if defined(AIM)
. . . (definitions here)
#else
. . . (definitions here)
#endif
. . .

It got a definition, just not necessarily the right one.


=3D=3D=3D
Mark Millard
markmi at dsl-only.net

On 2016-Nov-19, at 6:19 PM, Mark Millard <markmi at dsl-only.net> wrote:

> Author: jhibbits
> Date: Fri Nov 18 22:59:33 2016
> New Revision: 308817
> URL: https://svnweb.freebsd.org/changeset/base/308817
>=20
> Log:
>  Fix buildworld
>=20
>  Change the pv_tracked flag to an int, just in case userspace decides =
to include
>  this file and defines BOOKE.
>=20
>  Guard this block from unintentional inclusion with ifdef BOOKE.
>=20
>  Reported by:	emaste
. . .

(Later quotes are not from the list or from E-mail but from files.)

I'm not targeting BOOKE but GENERIC64 (via include, with AIM but not
ps3). I'm at head -r308860 yet for TARGET_ARCH=3Dpowerpc64 I get the
following that did not happen with my older -r308247 builds:

> --- kinfo_getallproc.o ---
. . .
> In file included from /usr/src/sys/sys/user.h:53:0,
>                 from q:34:
> /usr/src/sys/vm/vm_map.h:190:2: error: unknown type name 'pmap_t'
>  pmap_t pmap;   /* (c) Physical map */
>  ^
> /usr/src/sys/vm/vm_map.h:250:14: error: field 'vm_pmap' has incomplete =
type
>  struct pmap vm_pmap; /* private physical map */
>              ^
> --- kinfo_getfile.o ---
> In file included from /usr/src/sys/sys/user.h:53:0,
>                 from /usr/src/lib/libutil/kinfo_getfile.c:5:
> /usr/src/sys/vm/vm_map.h:190:2: error: unknown type name 'pmap_t'
>  pmap_t pmap;   /* (c) Physical map */
>  ^
> /usr/src/sys/vm/vm_map.h:250:14: error: field 'vm_pmap' has incomplete =
type
>  struct pmap vm_pmap; /* private physical map */


It is almost like a machine/pmap.h include is missing now so that the
types are not defined. But I've not yet found where the relevant
difference(s) are from -r308247.

Showing a compile command (with -v) with its failure. . .

> --- kinfo_getallproc.o ---
> Using built-in specs.
> COLLECT_GCC=3D/usr/local/bin/powerpc64-portbld-freebsd12.0-gcc
> Target: powerpc64-portbld-freebsd12.0
> Configured with: =
/usr/obj/portswork/usr/ports/devel/powerpc64-gcc/work/gcc-5.3.0/configure =
--target=3Dpowerpc64-portbld-freebsd12.0 --disable-nls =
--enable-languages=3Dc,c++ --without-headers --with-gmp=3D/usr/local =
--with-pkgversion=3D'FreeBSD Ports Collection for powerpc64' =
--with-system-zlib --with-as=3D/usr/local/bin/powerpc64-freebsd-as =
--with-ld=3D/usr/local/bin/powerpc64-freebsd-ld --prefix=3D/usr/local =
--localstatedir=3D/var --mandir=3D/usr/local/man =
--infodir=3D/usr/local/info/ --build=3Dx86_64-portbld-freebsd12.0
> Thread model: posix
> gcc version 5.3.0 (FreeBSD Ports Collection for powerpc64)=20
> COLLECT_GCC_OPTIONS=3D'-isystem' =
'/usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/inclu=
de' =
'-L/usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/lib=
' '-B' =
'/usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/lib' =
'-B' '/usr/local/powerpc64-freebsd/bin/' '-O2' '-pipe' '-D' 'LIBC_SCCS' =
'-D' 'INET6' '-I' '/usr/src/lib/libutil' '-I' =
'/usr/src/lib/libutil/../libc/gen/' '-std=3Dgnu99' =
'-fstack-protector-strong' '-Wsystem-headers' '-Wall' '-Wno-format-y2k' =
'-Wextra' '-Wstrict-prototypes' '-Wmissing-prototypes' '-Wpointer-arith' =
'-Wreturn-type' '-Wcast-qual' '-Wwrite-strings' '-Wswitch' '-Wshadow' =
'-Wunused-parameter' '-Wcast-align' '-Wchar-subscripts' '-Winline' =
'-Wnested-externs' '-Wredundant-decls' '-Wold-style-definition' =
'-Wno-pointer-sign' '-Wno-error=3Daddress' '-Wno-error=3Darray-bounds' =
'-Wno-error=3Dattributes' '-Wno-error=3Dbool-compare' =
'-Wno-error=3Dcast-align' '-Wno-error=3Dclobbered' =
'-Wno-error=3Denum-compare' '-Wno-error=3Dextra' '-Wno-error=3Dinline' =
'-Wno-error=3Dlogical-not-parentheses' '-Wno-error=3Dstrict-aliasing' =
'-Wno-error=3Duninitialized' '-Wno-error=3Dunused-but-set-variable' =
'-Wno-error=3Dunused-function' '-Wno-error=3Dunused-value' =
'-Wno-error=3Dstrict-overflow' '-v' '-c' '-o' 'kinfo_getallproc.o'
> /usr/local/libexec/gcc/powerpc64-portbld-freebsd12.0/5.3.0/cc1 -quiet =
-v -I /usr/src/lib/libutil -I /usr/src/lib/libutil/../libc/gen/ =
-isysroot =
/usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp -D =
LIBC_SCCS -D INET6 -isystem =
/usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/includ=
e /usr/src/lib/libutil/kinfo_getallproc.c -quiet -dumpbase =
kinfo_getallproc.c -auxbase-strip kinfo_getallproc.o -O2 =
-Wsystem-headers -Wall -Wno-format-y2k -Wextra -Wstrict-prototypes =
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual =
-Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align =
-Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls =
-Wold-style-definition -Wno-pointer-sign -Wno-error=3Daddress =
-Wno-error=3Darray-bounds -Wno-error=3Dattributes =
-Wno-error=3Dbool-compare -Wno-error=3Dcast-align -Wno-error=3Dclobbered =
-Wno-error=3Denum-compare -Wno-error=3Dextra -Wno-error=3Dinline =
-Wno-error=3Dlogical-not-parentheses -Wno-error=3Dstrict-aliasing =
-Wno-error=3Duninitialized -Wno-error=3Dunused-but-set-variable =
-Wno-error=3Dunused-function -Wno-error=3Dunused-value =
-Wno-error=3Dstrict-overflow -std=3Dgnu99 -version =
-fstack-protector-strong -o - |
> /usr/local/bin/powerpc64-freebsd-as -v -I /usr/src/lib/libutil -I =
/usr/src/lib/libutil/../libc/gen/ --traditional-format -a64 -mppc64 =
-many -o kinfo_getallproc.o
> GNU C99 (FreeBSD Ports Collection for powerpc64) version 5.3.0 =
(powerpc64-portbld-freebsd12.0)
>        compiled by GNU C version 4.2.1 Compatible FreeBSD Clang 3.8.0 =
(tags/RELEASE_380/final 262564), GMP version 5.1.3, MPFR version 3.1.5, =
MPC version 1.0.3
> GGC heuristics: --param ggc-min-expand=3D100 --param =
ggc-min-heapsize=3D131072
> ignoring nonexistent directory =
"/usr/local/lib/gcc/powerpc64-portbld-freebsd12.0/5.3.0/../../../../powerp=
c64-portbld-freebsd12.0/sys-include"
> ignoring nonexistent directory =
"/usr/local/lib/gcc/powerpc64-portbld-freebsd12.0/5.3.0/../../../../powerp=
c64-portbld-freebsd12.0/include"
> #include "..." search starts here:
> #include <...> search starts here:
> /usr/src/lib/libutil
> /usr/src/lib/libutil/../libc/gen/
> =
/usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/includ=
e
> /usr/local/lib/gcc/powerpc64-portbld-freebsd12.0/5.3.0/include
> /usr/local/lib/gcc/powerpc64-portbld-freebsd12.0/5.3.0/include-fixed
> End of search list.
> GNU C99 (FreeBSD Ports Collection for powerpc64) version 5.3.0 =
(powerpc64-portbld-freebsd12.0)
>        compiled by GNU C version 4.2.1 Compatible FreeBSD Clang 3.8.0 =
(tags/RELEASE_380/final 262564), GMP version 5.1.3, MPFR version 3.1.5, =
MPC version 1.0.3
> GGC heuristics: --param ggc-min-expand=3D100 --param =
ggc-min-heapsize=3D131072
> GNU assembler version 2.25.1 (powerpc64-freebsd) using BFD version =
(GNU Binutils) 2.25.1
> Compiler executable checksum: f075193fe6b42ec6fb8ba336147ebe8e
> In file included from /usr/src/sys/sys/user.h:53:0,
>                 from /usr/src/lib/libutil/kinfo_getallproc.c:34:
> /usr/src/sys/vm/vm_map.h:190:2: error: unknown type name 'pmap_t'
>  pmap_t pmap;   /* (c) Physical map */
>  ^
> /usr/src/sys/vm/vm_map.h:250:14: error: field 'vm_pmap' has incomplete =
type
>  struct pmap vm_pmap; /* private physical map */
>              ^


This is a powerpc64-xtoolchain-gcc based cross build:
(I build with libc++ capable materials, not with gcc 4.2.1 .)

> # uname -apKU
> FreeBSD FreeBSDx64 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r308860M: Sat =
Nov 19 14:00:24 PST 2016     =
markmi@FreeBSDx64:/usr/obj/amd64_clang/amd64_amd64/usr/src/sys/GENERIC-NOD=
BG  amd64 amd64 1200014 1200014

> # svnlite info /usr/src/ | grep "Re[lpv]"
> Relative URL: ^/head
> Repository Root: svn://svn.freebsd.org/base
> Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
> Revision: 308860
> Last Changed Rev: 308860


> # more /usr/src/sys/powerpc/conf/GENERIC64vtsc-NODBG=20
> #
> # GENERIC -- Custom configuration for the powerpc/powerpc64
> #
>=20
> include "GENERIC64"
>=20
> ident   GENERIC64vtsc-NODGB
>=20
> makeoptions     DEBUG=3D-g                # Build kernel with gdb(1) =
debug symbols
>=20
> nooptions       PS3                     # Sony Playstation 3           =
    HACK!!! to allow sc
>=20
> options         KDB                     # Enable kernel debugger =
support
>=20
> # For minimum debugger support (stable branch) use:
> options         KDB_TRACE               # Print a stack trace for a =
panic
> options         DDB                     # Enable the kernel debugger
> options         GDB                     # HACK!!! ...
>=20
> # Extra stuff:
> #options        VERBOSE_SYSINIT         # Enable verbose sysinit =
messages
> #options        BOOTVERBOSE=3D1
> #options        BOOTHOWTO=3DRB_VERBOSE
> #options        KTR
> #options        KTR_MASK=3DKTR_TRAP
> ##options       KTR_CPUMASK=3D0xF
> #options        KTR_VERBOSE
>=20
> # HACK!!! to allow sc for 2560x1440 display on Radeon X1950 that vt =
historically mishandled during booting
> device          sc
> #device                 kbdmux          # HACK: already listed by vt
> options         SC_OFWFB        # OFW frame buffer
> options         SC_DFLT_FONT    # compile font in
> makeoptions     SC_DFLT_FONT=3Dcp437
>=20
>=20
> # Disable any extra checking for. . .
> nooptions       DEADLKRES               # Enable the deadlock resolver
> nooptions       INVARIANTS              # Enable calls of extra sanity =
checking
> nooptions       INVARIANT_SUPPORT       # Extra sanity checks of =
internal structures, required by INVARIANTS
> nooptions       WITNESS                 # Enable checks to detect =
deadlocks and cycles
> nooptions       WITNESS_SKIPSPIN        # Don't run witness on =
spinlocks for speed
> nooptions       DIAGNOSTIC
> nooptions       MALLOC_DEBUG_MAXZONES   # Separate malloc(9) zones

Its SRC_ENV_CONF binding is to. . .

> # more ~/src.configs/src.conf.powerpc64-xtoolchain.amd64-host=20
> TO_TYPE=3Dpowerpc64
> TOOLS_TO_TYPE=3D${TO_TYPE}
> VERSION_CONTEXT=3D12.0
> #
> KERNCONF=3DGENERIC64vtsc-NODBG
> TARGET=3Dpowerpc
> .if ${.MAKE.LEVEL} =3D=3D 0
> TARGET_ARCH=3D${TO_TYPE}
> .export TARGET_ARCH
> .endif
> #
> WITHOUT_CROSS_COMPILER=3D
> WITHOUT_SYSTEM_COMPILER=3D
> #
> WITH_LIBCPLUSPLUS=3D
> WITHOUT_BINUTILS_BOOTSTRAP=3D
> WITHOUT_CLANG_BOOTSTRAP=3D
> WITH_CLANG=3D
> WITH_CLANG_IS_CC=3D
> WITH_CLANG_FULL=3D
> WITH_CLANG_EXTRAS=3D
> WITH_LLDB=3D
> #
> WITH_BOOT=3D
> # powerpc64 LIB32 builds via gcc 4.9 or later variants that I've tried
> # but the LIB32 does not work [crtbeginS code problem(s)]
> WITHOUT_LIB32=3D
> #
> WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=3D
> WITHOUT_GCC_BOOTSTRAP=3D
> WITHOUT_GCC=3D
> WITHOUT_GCC_IS_CC=3D
> WITHOUT_GNUCXX=3D
> #
> NO_WERROR=3D
> #WERROR=3D
> MALLOC_PRODUCTION=3D
> #
> WITH_DEBUG_FILES=3D
> #
> #
> # For TO (so-called "cross") stages . . .
> # So-called-cross via ${TO_TYPE}-xtoolchain-gcc/${TO_TYPE}-gcc. . .
> # TOOLS_TO_TYPE based on ${TO_TYPE}-xtoolchain-gcc related binutils. . =
.
> #
> CROSS_TOOLCHAIN=3D${TO_TYPE}-gcc
> X_COMPILER_TYPE=3Dgcc
> CROSS_BINUTILS_PREFIX=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/
> .if ${.MAKE.LEVEL} =3D=3D 0
> =
XCC=3D/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-gc=
c
> =
XCXX=3D/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-g=
++
> =
XCPP=3D/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-c=
pp
> .export XCC
> .export XCXX
> .export XCPP
> XAS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/as
> XAR=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ar
> XLD=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ld
> XNM=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/nm
> XOBJCOPY=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objcopy
> XOBJDUMP=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objdump
> XRANLIB=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ranlib
> XSIZE=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/size
> #NO-SUCH: XSTRINGS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/strings
> XSTRINGS=3D/usr/local/bin/${TOOLS_TO_TYPE}-freebsd-strings
> .export XAS
> .export XAR
> .export XLD
> .export XNM
> .export XOBJCOPY
> .export XOBJDUMP
> .export XRANLIB
> .export XSIZE
> .export XSTRINGS
> .endif
> #
> #
> # =46rom based on clang (via system). . .
> #
> .if ${.MAKE.LEVEL} =3D=3D 0
> CC=3D/usr/bin/clang
> CXX=3D/usr/bin/clang++
> CPP=3D/usr/bin/clang-cpp
> .export CC
> .export CXX
> .export CPP
> .endif

> # svnlite status /usr/src/
> M       =
/usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
> M       /usr/src/lib/csu/powerpc64/Makefile
> ?       /usr/src/sys/amd64/conf/GENERIC-DBG
> ?       /usr/src/sys/amd64/conf/GENERIC-NODBG
> ?       /usr/src/sys/arm/conf/BPIM3-DBG
> ?       /usr/src/sys/arm/conf/BPIM3-NODBG
> ?       /usr/src/sys/arm/conf/RPI2-DBG
> ?       /usr/src/sys/arm/conf/RPI2-NODBG
> ?       /usr/src/sys/arm64/conf/GENERIC-DBG
> ?       /usr/src/sys/arm64/conf/GENERIC-NODBG
> M       /usr/src/sys/boot/ofw/Makefile.inc
> M       /usr/src/sys/boot/powerpc/Makefile.inc
> M       /usr/src/sys/boot/powerpc/kboot/Makefile
> M       /usr/src/sys/boot/uboot/Makefile.inc
> M       /usr/src/sys/conf/Makefile.powerpc
> M       /usr/src/sys/conf/kern.mk
> M       /usr/src/sys/conf/kmod.mk
> M       /usr/src/sys/ddb/db_main.c
> M       /usr/src/sys/ddb/db_script.c
> ?       /usr/src/sys/powerpc/conf/GENERIC64vtsc-DBG
> ?       /usr/src/sys/powerpc/conf/GENERIC64vtsc-NODBG
> ?       /usr/src/sys/powerpc/conf/GENERICvtsc-DBG
> ?       /usr/src/sys/powerpc/conf/GENERICvtsc-NODBG
> M       /usr/src/sys/powerpc/ofw/ofw_machdep.c
> M       /usr/src/sys/powerpc/powerpc/exec_machdep.c


=3D=3D=3D
Mark Millard
markmi at dsl-only.net





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53258F35-C86E-4DE0-BDF0-5C139E68356D>