From owner-freebsd-stable@freebsd.org Wed Apr 26 14:14:12 2017 Return-Path: Delivered-To: freebsd-stable@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 EB22CD51401 for ; Wed, 26 Apr 2017 14:14:12 +0000 (UTC) (envelope-from papowell@astart.com) Received: from astart2.astart.com (wsip-72-214-30-30.sd.sd.cox.net [72.214.30.30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9027D6B for ; Wed, 26 Apr 2017 14:14:12 +0000 (UTC) (envelope-from papowell@astart.com) Received: from laptop_103.private (localhost [127.0.0.1]) by astart2.astart.com (8.14.9/8.14.9) with ESMTP id v3QEE5m2023851; Wed, 26 Apr 2017 07:14:05 -0700 (PDT) (envelope-from papowell@astart.com) Reply-To: papowell@astart.com To: freebsd-stable@freebsd.org From: Patrick Powell Subject: GCC + FreeBSD 11.0 Stable - stat.h does not have vm_ooffset_t definition Organization: Astart Technologies Cc: "papowell@astart.com" Message-ID: <8316fd8e-056d-32a1-1e59-414269476190@astart.com> Date: Wed, 26 Apr 2017 07:14:05 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2017 14:14:13 -0000 First: a big thank-you to the support/fixit people for all of their work! I was doing some testing using FreeBSD 11.0-STABLE and some of my configure scripts died. However, they were working fine on FreeBSD 11.0 RELEASE. I found the problem, but I do not know how to resolve this. When you install the GCC compiler from the PKG repository it appears to create a modified set of include files from the system (default?) include files (/usr/include). However, when the modified /usr/include/sys/types.h file is created, the typedef for vm_ooffset_t is modified, and there is no reference to __vm_ooffset_t that the compiler can resolve. < typedef __int64_t vm_ooffset_t; --- > typedef __vm_ooffset_t vm_ooffset_t; I suspect that this change from __int64_t to __vm_offset_t is the cause of the problem. This editting (?) appears to be done by 'fixincludes' (as noted in the README files in the /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd11.0/5.4.0/include-fixed directory. Details: Configuration: FreeBSD test11snapshot 11.0-STABLE FreeBSD 11.0-STABLE #0 r317153: Thu Apr 20 05:43:02 UTC 2017 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 p#> pkg which /usr/local/bin/gcc /usr/local/bin/gcc was installed by package gcc-5.4.0_1 Test File: conftest.c /* confdefs.h */ #define PACKAGE_NAME "" #define PACKAGE_TARNAME "" #define PACKAGE_VERSION "" #define PACKAGE_STRING "" #define PACKAGE_BUGREPORT "" #define PACKAGE_URL "" #define PACKAGE "FEPT" #define VERSION "7.0.8" #define STDC_HEADERS 1 /* end confdefs.h. */ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif #include Compile: #> gcc -c -g -02 conftest.c In file included from conftest.c:46:0: /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd11.0/5.4.0/include-fixed/sys/types.h:266:9: error: unknown type name '__vm_ooffset_t' typedef __vm_ooffset_t vm_ooffset_t; ^ /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd11.0/5.4.0/include-fixed/sys/types.h:268:9: error: unknown type name '__vm_pindex_t' typedef __vm_pindex_t vm_pindex_t; ^ root@test11snapshot:/usr/include # diff sys/types.h /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd11.0/5.4.0/include-fixed/sys/types.h |more 0a1,9 > /* DO NOT EDIT THIS FILE. > > It has been auto-edited by fixincludes from: > > "/usr/include/sys/types.h" > > This had to be done to correct non-standard usages in the > original, manufacturer supplied header file. */ > 35c44 < * $FreeBSD: stable/11/sys/sys/types.h 313574 2017-02-11 02:00:56Z kib $ --- > * $FreeBSD: releng/11.0/sys/sys/types.h 299571 2016-05-12 21:18:17Z cem $ 199c208,212 < typedef __size_t size_t; --- > #if !defined(_GCC_SIZE_T) > #define _GCC_SIZE_T > typedef __SIZE_TYPE__ size_t; > #endif > 253c266 < typedef __int64_t vm_ooffset_t; --- > typedef __vm_ooffset_t vm_ooffset_t; 255c268 < typedef __uint64_t vm_pindex_t; --- > typedef __vm_pindex_t vm_pindex_t; root@test11snapshot:/usr/include # -- Patrick Powell Astart Technologies papowell@astart.com 1530 Jamacha Rd, Suite X Network and System San Diego, CA 92019 Consulting Cell 858-518-7581 FAX 858-751-2435 Web: papowell at astart dot com