From owner-freebsd-toolchain@freebsd.org Sun Apr 10 01:50:41 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20170B088FC for ; Sun, 10 Apr 2016 01:50:41 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-156.reflexion.net [208.70.211.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9D22160C for ; Sun, 10 Apr 2016 01:50:40 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 32433 invoked from network); 10 Apr 2016 01:50:58 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 10 Apr 2016 01:50:58 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v7.90.2) with SMTP; Sat, 09 Apr 2016 21:50:38 -0400 (EDT) Received: (qmail 17328 invoked from network); 10 Apr 2016 01:50:38 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 10 Apr 2016 01:50:38 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 7DDFB1C4079; Sat, 9 Apr 2016 18:50:27 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: 11.0-CURRENT buildworld lib32/libsoft failures: ioctl.c and sys/dev/ciss/cissio.h and __amd64__ vs. __amd64 example; LIBCOMPATWMAKEFLAGS and CP="${XCPP}" Date: Sat, 9 Apr 2016 18:50:32 -0700 Message-Id: <36DB1DE3-B69D-4D65-9BB3-D6619DE4EC38@dsl-only.net> Cc: freebsd-arm , FreeBSD PowerPC ML , Bryan Drewery , Warner Losh , emaste@freebsd.org To: FreeBSD Toolchain , FreeBSD Current Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2016 01:50:41 -0000 I'm currently getting errors for CCIS_PASSTHRU32 and others in ioctl.c = not being defined while an amd64 context updates itself from -r297514 to = -r297769 via buildworld. The problem is during lib32's build activity. A = grep of the log shows: > ioctl.c:472:18: error: use of undeclared identifier 'CCISS_PASSTHRU32' > ioctl.c:1186:18: error: use of undeclared identifier = 'IPMICTL_RECEIVE_MSG_32' > ioctl.c:1190:18: error: use of undeclared identifier = 'IPMICTL_RECEIVE_MSG_TRUNC_32' > ioctl.c:1196:18: error: use of undeclared identifier = 'IPMICTL_SEND_COMMAND_32' > ioctl.c:1394:18: error: use of undeclared identifier = 'MPTIO_RAID_ACTION32' > ioctl.c:1398:18: error: use of undeclared identifier = 'MPTIO_READ_CFG_HEADER32' > ioctl.c:1402:18: error: use of undeclared identifier = 'MPTIO_READ_CFG_PAGE32' > ioctl.c:1406:18: error: use of undeclared identifier = 'MPTIO_READ_EXT_CFG_HEADER32' > ioctl.c:1410:18: error: use of undeclared identifier = 'MPTIO_READ_EXT_CFG_PAGE32' > ioctl.c:1414:18: error: use of undeclared identifier = 'MPTIO_WRITE_CFG_PAGE32' sys/dev/ciss/cissio.h is an example of a more general issue here for = lib32 (for amd64 not cross built) and libsoft (for amd64 cross building = for a rpi2 as an example). sys/dev/ciss/cissio.h has code such as: > #ifdef __amd64__ > typedef struct { > LUNAddr_struct LUN_info; /* 8 */ > RequestBlock_struct Request; /* 20 */ > ErrorInfo_struct error_info; /* 48 */ > u_int16_t buf_size; /* 2 */ > u_int32_t buf; /* 4 */ > } __packed IOCTL_Command_struct32; > #endif > . . . > #ifdef __amd64 > #define CCISS_PASSTHRU32 _IOWR ('C', 210, = IOCTL_Command_struct32) > #endif Note the __ suffix vs. not after the "amd64". There can be headers = around that produce such variations of macros. arm has one of those that = makes macros that track characteristics of specific types of arm = variants, for example. The details of what happen for this sort of thing can depend on = Makefile.libcompat's: > LIBCOMPATWMAKEFLAGS+=3D CC=3D"${XCC} ${LIBCOMPATCFLAGS}" \ > CXX=3D"${XCXX} ${LIBCOMPATCFLAGS} = ${LIBCOMPATCXXFLAGS}" \ > DESTDIR=3D${LIBCOMPATTMP} \ > -DNO_CPU_CFLAGS \ > MK_CTF=3Dno \ > -DNO_LINT \ > MK_TESTS=3Dno vs. also having CPP=3D"${XCPP}" listed as can be required for cross = builds (such amd64 building for an rpi2 [libsoft] or powerpc64 [lib32]): > LIBCOMPATWMAKEFLAGS+=3D CC=3D"${XCC} ${LIBCOMPATCFLAGS}" \ > CXX=3D"${XCXX} ${LIBCOMPATCFLAGS} = ${LIBCOMPATCXXFLAGS}" \ > CPP=3D"${XCPP}" \ > DESTDIR=3D${LIBCOMPATTMP} \ > -DNO_CPU_CFLAGS \ > MK_CTF=3Dno \ > -DNO_LINT \ > MK_TESTS=3Dno Because of previously needing it for cross compiles I currently have the = CPP=3D"${XCPP}" in place in my context: an arm header was processed by = the amd64 preprocessor and the header could not detect its context = correctly: > --- all_subdir_lib/libsysdecode --- > In file included from :17: > In file included from = /usr/obj/clang/arm.armv6/usr/src/libsoft/usr/include/dev/nvme/nvme.h:36: > In file included from = /usr/obj/clang/arm.armv6/usr/src/libsoft/usr/include/sys/param.h:135: > In file included from = /usr/obj/clang/arm.armv6/usr/src/libsoft/usr/include/machine/param.h:49: > = /usr/obj/clang/arm.armv6/usr/src/libsoft/usr/include/machine/acle-compat.h= :182:4: error: Unable to determine architecture version. > # error Unable to determine architecture version. > ^ Is this area broken overall? Or is there something that I need to do = differently in order to have amd64 rebuild itself (not a cross build) = but also to also have amd64 do cross builds (such as arm and its = libsoft)? =3D=3D=3D Mark Millard markmi at dsl-only.net