Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 May 2016 12:18:30 -0700
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Alan Somers <asomers@freebsd.org>, Dimitry Andric <dim@freebsd.org>
Cc:        "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r300770 - in head: . contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src contrib/libc++/src/include contrib/libc++/src/support lib/l...
Message-ID:  <403f6f39-85e2-aa5f-0ca1-beba256a88e8@FreeBSD.org>
In-Reply-To: <CAOtMX2hG6hqVy3kDUcBEifJnWWgTjARdn9cyy8eSFf9gMt%2BXxQ@mail.gmail.com>
References:  <201605261852.u4QIqn5w073953@repo.freebsd.org> <CAOtMX2jRZ0ZyW5Hw1ESp6EpADa_qvX5QFPHjkgUAFjdHB1OBKA@mail.gmail.com> <D36A3E43-3FFC-4B6A-8BC2-6B7A981FBDCB@FreeBSD.org> <CAOtMX2iaNfs6XY8D9QdY9=FY95mi6TKp=_QCe4eETW7YpYhYHA@mail.gmail.com> <CCBCA662-E090-488E-BFB4-55B5153CFAE1@FreeBSD.org> <CAOtMX2hs5ZJT14fSXsFYsi%2Bo=hJ04_Q-dgnP5nJ9Ub543Dv5sg@mail.gmail.com> <F931C2E9-BEC3-415C-A840-541EFD378D0C@FreeBSD.org> <CAOtMX2hG6hqVy3kDUcBEifJnWWgTjARdn9cyy8eSFf9gMt%2BXxQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--3mVMCCb9lbu01cVpiBg451OC68vi0BwQO
Content-Type: multipart/mixed; boundary="JnWKjxf0kxTUfLnLM8LpBFOge8weDAE4H"
From: Bryan Drewery <bdrewery@FreeBSD.org>
To: Alan Somers <asomers@freebsd.org>, Dimitry Andric <dim@freebsd.org>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>,
 "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,
 "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Message-ID: <403f6f39-85e2-aa5f-0ca1-beba256a88e8@FreeBSD.org>
Subject: Re: svn commit: r300770 - in head: . contrib/libc++/include
 contrib/libc++/include/experimental contrib/libc++/include/ext
 contrib/libc++/src contrib/libc++/src/include contrib/libc++/src/support
 lib/l...
References: <201605261852.u4QIqn5w073953@repo.freebsd.org>
 <CAOtMX2jRZ0ZyW5Hw1ESp6EpADa_qvX5QFPHjkgUAFjdHB1OBKA@mail.gmail.com>
 <D36A3E43-3FFC-4B6A-8BC2-6B7A981FBDCB@FreeBSD.org>
 <CAOtMX2iaNfs6XY8D9QdY9=FY95mi6TKp=_QCe4eETW7YpYhYHA@mail.gmail.com>
 <CCBCA662-E090-488E-BFB4-55B5153CFAE1@FreeBSD.org>
 <CAOtMX2hs5ZJT14fSXsFYsi+o=hJ04_Q-dgnP5nJ9Ub543Dv5sg@mail.gmail.com>
 <F931C2E9-BEC3-415C-A840-541EFD378D0C@FreeBSD.org>
 <CAOtMX2hG6hqVy3kDUcBEifJnWWgTjARdn9cyy8eSFf9gMt+XxQ@mail.gmail.com>
In-Reply-To: <CAOtMX2hG6hqVy3kDUcBEifJnWWgTjARdn9cyy8eSFf9gMt+XxQ@mail.gmail.com>

--JnWKjxf0kxTUfLnLM8LpBFOge8weDAE4H
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 5/27/2016 12:09 PM, Alan Somers wrote:
> On Fri, May 27, 2016 at 10:19 AM, Dimitry Andric <dim@freebsd.org> wrot=
e:
>> On 27 May 2016, at 18:01, Alan Somers <asomers@freebsd.org> wrote:
>>>
>>> On Fri, May 27, 2016 at 9:42 AM, Dimitry Andric <dim@freebsd.org> wro=
te:
>> ...
>>>> My guess is that either ${MAKEOBJDIRPREFIX}/usr/include/c++/v1 needs=
 to
>>>> be added to the C++ include path, or some other path in the list is
>>>> missing, at least for C++ compilation.
>>>>
>>>> -Dimitry
>>>
>>> Here it is.  It looks right to me;
>>> $MAKEOBJDIRPREFIX/home/asomers/freebsd/head/lib32/usr/include/c++/v1
>>> is in the path, and stddef.h exists in that directory.
>>>
>>> $ c++ -v -m32 -DCOMPAT_32BIT -march=3Di686 -mmmx -msse -msse2
>>> -L/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/lib32
>>> --sysroot=3D/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32
>>> -B/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/lib32
>>> -isystem /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr=
/include
>>>  -O2 -pipe -MD -MF.depend.consumer.o -MTconsumer.o
>>> -fstack-protector-strong -Wsystem-headers -Werror -Wall
>>> -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith
>>> -Wno-uninitialized -Wno-empty-body -Wno-string-plus-int
>>> -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-valu=
e
>>> -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion
>>> -Wno-unused-local-typedef -Qunused-arguments  -Wno-c++11-extensions
>>> -c /home/asomers/freebsd/head/lib/libdevdctl/consumer.cc -o consumer.=
o
>>> FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on=

>>> LLVM 3.8.0)
>>> Target: i386-unknown-freebsd11.0
>>> Thread model: posix
>>> InstalledDir: /scratch/tmp/asomers/obj/home/asomers/freebsd/head/tmp/=
usr/bin
>>> "/scratch/tmp/asomers/obj/home/asomers/freebsd/head/tmp/usr/bin/c++"
>>> -cc1 -triple i386-unknown-freebsd11.0 -emit-obj -disable-free
>>> -main-file-name consumer.cc -mrelocation-model static -mthread-model
>>> posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases
>>> -target-cpu i686 -target-feature +mmx -target-feature +sse
>>> -target-feature +sse2 -v -dwarf-column-info -debugger-tuning=3Dgdb
>>> -coverage-file /scratch/tmp/asomers/obj/home/asomers/freebsd/head/wor=
ld32/home/asomers/freebsd/head/lib/libdevdctl/consumer.o
>>> -resource-dir /scratch/tmp/asomers/obj/home/asomers/freebsd/head/tmp/=
usr/bin/../lib/clang/3.8.0
>>> -dependency-file .depend.consumer.o -sys-header-deps -MT consumer.o
>>> -isystem /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr=
/include
>>> -D COMPAT_32BIT -isysroot
>>> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32
>>> -internal-isystem
>>> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/=
c++/v1
>>> -O2 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W
>>> -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized
>>> -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable
>>> -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality=

>>> -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef
>>> -Wno-c++11-extensions -fdeprecated-macro -fdebug-compilation-dir
>>> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/world32/home/asome=
rs/freebsd/head/lib/libdevdctl
>>> -ferror-limit 19 -fmessage-length 80 -stack-protector 2
>>> -fobjc-runtime=3Dgnustep -fcxx-exceptions -fexceptions
>>> -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops
>>> -vectorize-slp -o consumer.o -x c++
>>> /home/asomers/freebsd/head/lib/libdevdctl/consumer.cc
>>> clang -cc1 version 3.8.0 based upon LLVM 3.8.0 default target
>>> x86_64-unknown-freebsd11.0
>>> ignoring duplicate directory
>>> "/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include=
"
>>> #include "..." search starts here:
>>> #include <...> search starts here:
>>> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include
>>> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/=
c++/v1
>>> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/tmp/usr/bin/../lib=
/clang/3.8.0/include
>>> End of search list.
>>
>> The problem appears to be that the .../usr/include/c++/v1 directory
>> should come *before* the .../usr/include directory, otherwise the
>> #include_next<> logic will not work as expected.
>>
>> This is most likely caused by the option:
>>
>>   -isystem /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/us=
r/include
>>
>> because that forces this path to become before any auto-detected syste=
m
>> include directory.  Note that this option is not needed, since the oth=
er
>> option:
>>
>>   --sysroot=3D/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32=

>>
>> is already taking care of adding the right include directories.  It ev=
en
>> warns about the duplicate directory:
>>
>>   ignoring duplicate directory
>>   "/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/includ=
e"
>>
>> So what happens if you delete the -isystem option and its argument?
>>
>> -Dimitry
>>
>=20
> If I take out -isystem, it compiles successfully.
>=20

I'm looking at this more now.  I added that -isystem in, but it should
have only been there for external GCC usage from first glance.

--=20
Regards,
Bryan Drewery


--JnWKjxf0kxTUfLnLM8LpBFOge8weDAE4H--

--3mVMCCb9lbu01cVpiBg451OC68vi0BwQO
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJXSJ2HAAoJEDXXcbtuRpfPYZ4IALU8MnDpyenD8057yCEuxyDx
HJMhQZT/8apRRPBvtb0Ith+0zXIQ0VASlAvm4yf5E+aK1qY80pAoCEOt0dBIxEXC
zzMYf0VXHuwCZcFNmodkl6oc6TnF/CjQJJWb0v/KjmFuot0oC7DTYXlGhAj+2axy
t8sssPyhlhFfKbof6IKRe7cgVtP/cYgJedOVf9m744rMOGRmkTo7+D/z/ZFL/2KQ
4lspY5jWAChzo07AfJKgdFkLDpoT2rbx4LS7WK2y4zHKKJP2QhS0yP8igUIiK+aN
fmzdJESEMgCO0+jjNFpAEj7/WzXeN0HFF/F71AUrizfGJ0guJDu/hOGPtvWP91c=
=EVoU
-----END PGP SIGNATURE-----

--3mVMCCb9lbu01cVpiBg451OC68vi0BwQO--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?403f6f39-85e2-aa5f-0ca1-beba256a88e8>