<div dir="ltr">(adding back cfe-dev)<div><br></div><div>Looks like your version of libc++ is too old, and you're running into <a href="http://llvm.org/PR19723">llvm.org/PR19723</a> -- upgrading libc++ should solve the problem.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 27 July 2017 at 00:55, zosrothko <span dir="ltr"><<a href="mailto:zosrothko@orange.fr" target="_blank">zosrothko@orange.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<p>Hi Richard</p>
<p>Below the list of directories containing <cstddef> or
<stddef.h> as well as the bugcpp.ii<br>
</p><span class="">
<br>
<div class="m_8299521875336618637moz-cite-prefix">Le 26/07/2017 à 23:13, Richard Smith a
écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On 25 July 2017 at 05:27, zosrothko <span dir="ltr"><<a href="mailto:zosrothko@orange.fr" target="_blank">zosrothko@orange.fr</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Hi Richard</p>
<p>Sorry to bother you again on this issue but that's
quite important for the CI jobs I am running. Here the
includes listed with the -v option. Does this ring
some bells?</p>
<p>TIA<br>
</p>
<p>1/ clang++-3.8 -std=c++11 -v -stdlib=libc++ bug.cpp
// compile errors<br>
</p>
<p><span class="m_8299521875336618637gmail-">clang -cc1 version 3.8.0 based
upon LLVM 3.8.0 default target
x86_64-unknown-linux-gnu<br>
ignoring nonexistent directory "/include"<br>
</span><span class="m_8299521875336618637gmail-"> #include "..." search
starts here:<br>
#include <...> search starts here:<br>
</span> /usr/include/c++/v1<span class="m_8299521875336618637gmail-"><br>
/usr/local/include<br>
/usr/lib/llvm-3.8/bin/../lib/<wbr>clang/3.8.0/include<br>
/usr/include/x86_64-linux-gnu<br>
/usr/include<br>
</span></p>
</div>
</blockquote>
<div><br>
</div>
<div>Which of those directories contains a <cstddef>
or <stddef.h> header? In particular, is there one in
/usr/local/include?</div>
</div>
</div>
</div>
</blockquote></span>
fandre@ubuntu-trusty-64:~/<wbr>clang$ find /usr -type f -name "*ddef*"<br>
/usr/include/c++/5/cstddef<br>
/usr/include/c++/4.8/cstddef<br>
/usr/include/c++/4.9/cstddef<br>
/usr/include/c++/v1/cstddef<br>
/usr/include/linux/stddef.h<br>
/usr/lib/llvm-3.9/lib/clang/3.<wbr>9.1/include/__stddef_max_<wbr>align_t.h<br>
/usr/lib/llvm-3.9/lib/clang/3.<wbr>9.1/include/stddef.h<br>
/usr/lib/llvm-3.8/lib/clang/3.<wbr>8.0/include/__stddef_max_<wbr>align_t.h<br>
/usr/lib/llvm-3.8/lib/clang/3.<wbr>8.0/include/stddef.h<br>
/usr/lib/perl/5.18.2/<a href="http://stddef.ph" target="_blank">stddef.ph</a><br>
/usr/lib/perl/5.18.2/linux/<a href="http://stddef.ph" target="_blank">std<wbr>def.ph</a><br>
/usr/lib/llvm-3.6/lib/clang/3.<wbr>6.0/include/__stddef_max_<wbr>align_t.h<br>
/usr/lib/llvm-3.6/lib/clang/3.<wbr>6.0/include/stddef.h<br>
/usr/lib/llvm-3.5/lib/clang/3.<wbr>5.0/include/stddef.h<br>
/usr/lib/gcc/x86_64-linux-gnu/<wbr>5/include/stddef.h<br>
/usr/lib/gcc/x86_64-linux-gnu/<wbr>4.8/include/stddef.h<br>
/usr/lib/gcc/x86_64-linux-gnu/<wbr>4.9/include/stddef.h<br>
/usr/src/linux-headers-4.4.0-<wbr>31/include/linux/stddef.h<br>
/usr/src/linux-headers-4.4.0-<wbr>31/include/uapi/linux/stddef.h<br>
/usr/src/linux-headers-4.4.0-<wbr>83/include/linux/stddef.h<br>
/usr/src/linux-headers-4.4.0-<wbr>83/include/uapi/linux/stddef.h<br>
fandre@ubuntu-trusty-64:~/<wbr>clang$<div><div class="h5"><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div>Can you provide preprocessed source for the bug.cpp
file:</div>
<div><br>
</div>
<div>clang++-3.8 -std=c++11 -E -frewrite-includes
-stdlib=libc++ bug.cpp -o bug.ii</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p><span class="m_8299521875336618637gmail-"> End of search list.<br>
</span><span class="m_8299521875336618637gmail-"> bug.cpp:56:88: error:
'Header' does not refer to a value</span></p>
<p><br>
</p>
<p>2/ clang++-3.8 -std=c++11 -v bug.cpp // compile OK<br>
</p>
<span class="m_8299521875336618637gmail-">
<p>clang -cc1 version 3.8.0 based upon LLVM 3.8.0
default target x86_64-unknown-linux-gnu<br>
ignoring nonexistent directory "/include"<br>
ignoring duplicate directory
"/usr/bin/../lib/gcc/x86_64-li<wbr>nux-gnu/5.4.1/../../../../incl<wbr>ude/x86_64-linux-gnu/c++/5.4.<wbr>1"<br>
#include "..." search starts here:<br>
#include <...> search starts here:<br>
/usr/bin/../lib/gcc/x86_64-li<wbr>nux-gnu/5.4.1/../../../../incl<wbr>ude/c++/5.4.1<br>
/usr/bin/../lib/gcc/x86_64-li<wbr>nux-gnu/5.4.1/../../../../incl<wbr>ude/x86_64-linux-gnu/c++/5.4.1<br>
/usr/bin/../lib/gcc/x86_64-li<wbr>nux-gnu/5.4.1/../../../../incl<wbr>ude/c++/5.4.1/backward<br>
/usr/local/include<br>
/usr/lib/llvm-3.8/bin/../lib/<wbr>clang/3.8.0/include<br>
/usr/include/x86_64-linux-gnu<br>
/usr/include<br>
End of search list.<br>
</p>
<br>
</span><span class="m_8299521875336618637gmail-">
<div class="m_8299521875336618637gmail-m_-3534322842484344426moz-cite-prefix">Le
23/07/2017 à 18:34, Richard Smith a écrit :<br>
</div>
</span>
<div>
<div class="m_8299521875336618637gmail-h5">
<blockquote type="cite">
<div dir="auto">
<div>
<div class="gmail_extra">
<div class="gmail_quote">On 22 Jul 2017
12:52 pm, "zosrothko via cfe-dev" <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>>
wrote:<br type="attribution">
<blockquote class="m_8299521875336618637gmail-m_-3534322842484344426quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<div class="m_8299521875336618637gmail-m_-3534322842484344426quoted-text">
<p><br>
</p>
<br>
<div class="m_8299521875336618637gmail-m_-3534322842484344426m_-6104735786181288816moz-cite-prefix">Le
22/07/2017 à 15:07, Richard Smith
a écrit :<br>
</div>
<blockquote type="cite">
<div dir="auto">Based on the
errors, I would guess that the
offsetof macro is not defined.
Maybe there's something wrong
with your include path?</div>
</blockquote>
</div>
Thanks for answering, but this code
compiles fine with this command below,
thus I do not understand your point on
the include path? (there is no private
includes in this code)<br>
<br>
clang++-3.8 -std=c++11 bug.cpp</div>
</blockquote>
</div>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Include path problems can show
up with -stdlib=libc++ because it changes the
include path, and because libc++ makes
different use of #include_next than libstdc++.
Please add -v to the failing command and tell
us the include path that is printed.</div>
<div dir="auto">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="m_8299521875336618637gmail-m_-3534322842484344426quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<div class="m_8299521875336618637gmail-m_-3534322842484344426elided-text">
<blockquote type="cite">
<div class="gmail_extra">
<div class="gmail_quote">On 22
Jul 2017 3:54 am, "zosrothko
via cfe-dev" <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>>
wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
Hello CFE list<br>
<br>
Sorry to post again this
post, but I am really
stacked on this problem.<br>
<br>
I have an issue compiling
a small c++ program with
clang++-3.8 on Ubuntu
trusty<br>
<br>
Using the joined c++
program bug.cpp, <br>
<ul>
<li>clang++-3.8
-std=c++11 bug.cpp
compiles fine while</li>
<li>clang++-3.8
-std=c++11
-stdlib=libc++ bug.cpp
produces invalid
compile errors.</li>
</ul>
<br>
What could be the problem
and how can it be solved?<br>
<br>
TIA<br>
<br>
fandre@ubuntu-trusty-64:~/clan<wbr>g$ uname -a<br>
Linux ubuntu-trusty-64
4.4.0-83-generic
#106~14.04.1-Ubuntu SMP
Mon Jun 26 18:10:19 UTC
2017 x86_64 x86_64 x86_64
GNU/Linux<br>
fandre@ubuntu-trusty-64:~/clan<wbr>g$ clang++-3.8 --version<br>
clang version
3.8.0-2ubuntu3~trusty4
(tags/RELEASE_380/final)<br>
Target:
x86_64-unknown-linux-gnu<br>
Thread model: posix<br>
InstalledDir: /usr/bin<br>
<br>
Below is the console log<br>
<br>
fandre@ubuntu-trusty-64:~/clan<wbr>g$ clang++-3.8 -std=c++11 bug.cpp<br>
fandre@ubuntu-trusty-64:~/clan<wbr>g$ clang++-3.8 -std=c++11
-stdlib=libc++ bug.cpp<br>
bug.cpp:56:88: error:
'Header' does not refer to
a value<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, code) ==
0x01)>)> poco_...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note:
declared here<br>
struct Header<br>
^<br>
bug.cpp:56:96: error: use
of undeclared identifier
'code'<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, code) ==
0x01)>)> poco_...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:56:111: error:
type name requires a
specifier or qualifier<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, code) ==
0x01)>)> poco_...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:57:88: error:
'Header' does not refer to
a value<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header,
checksum) ==
0x02)>)> p...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note:
declared here<br>
struct Header<br>
^<br>
bug.cpp:57:96: error: use
of undeclared identifier
'checksum'<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header,
checksum) ==
0x02)>)> p...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:57:115: error:
type name requires a
specifier or qualifier<br>
...poco_static_assert_test<siz<wbr>eof(POCO_STATIC_ASSERTION_FAIL<wbr>URE<(bool)
(offsetof(Header,
checksum) ==
0x02)>)>
poco_stati...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:58:88: error:
'Header' does not refer to
a value<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, id) ==
0x04)>)> poco_st...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note:
declared here<br>
struct Header<br>
^<br>
bug.cpp:58:96: error: use
of undeclared identifier
'id'<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, id) ==
0x04)>)> poco_st...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:58:109: error:
type name requires a
specifier or qualifier<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, id) ==
0x04)>)> poco_st...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:59:88: error:
'Header' does not refer to
a value<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, seq) ==
0x06)>)> poco_s...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note:
declared here<br>
struct Header<br>
^<br>
bug.cpp:59:96: error: use
of undeclared identifier
'seq'<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, seq) ==
0x06)>)> poco_s...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:59:110: error:
type name requires a
specifier or qualifier<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, seq) ==
0x06)>)> poco_s...<br>
<wbr> <wbr> <wbr>
^<br>
12 errors generated.<br>
fandre@ubuntu-trusty-64:~/clan<wbr>g$ cp bug.cpp ../shared<br>
fandre@ubuntu-trusty-64:~/clan<wbr>g$ clang++-3.8 -std=c++11 bug.cpp<br>
fandre@ubuntu-trusty-64:~/clan<wbr>g$ clang++-3.8 -std=c++11
-stdlib=libc++ bug.cpp<br>
bug.cpp:56:88: error:
'Header' does not refer to
a value<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, code) ==
0x01)>)> poco_...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note:
declared here<br>
struct Header<br>
^<br>
bug.cpp:56:96: error: use
of undeclared identifier
'code'<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, code) ==
0x01)>)> poco_...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:56:111: error:
type name requires a
specifier or qualifier<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, code) ==
0x01)>)> poco_...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:57:88: error:
'Header' does not refer to
a value<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header,
checksum) ==
0x02)>)> p...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note:
declared here<br>
struct Header<br>
^<br>
bug.cpp:57:96: error: use
of undeclared identifier
'checksum'<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header,
checksum) ==
0x02)>)> p...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:57:115: error:
type name requires a
specifier or qualifier<br>
...poco_static_assert_test<siz<wbr>eof(POCO_STATIC_ASSERTION_FAIL<wbr>URE<(bool)
(offsetof(Header,
checksum) ==
0x02)>)>
poco_stati...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:58:88: error:
'Header' does not refer to
a value<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, id) ==
0x04)>)> poco_st...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note:
declared here<br>
struct Header<br>
^<br>
bug.cpp:58:96: error: use
of undeclared identifier
'id'<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, id) ==
0x04)>)> poco_st...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:58:109: error:
type name requires a
specifier or qualifier<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, id) ==
0x04)>)> poco_st...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:59:88: error:
'Header' does not refer to
a value<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, seq) ==
0x06)>)> poco_s...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note:
declared here<br>
struct Header<br>
^<br>
bug.cpp:59:96: error: use
of undeclared identifier
'seq'<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, seq) ==
0x06)>)> poco_s...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:59:110: error:
type name requires a
specifier or qualifier<br>
typedef
poco_static_assert_test<sizeof<wbr>(POCO_STATIC_ASSERTION_FAILURE<wbr><(bool)
(offsetof(Header, seq) ==
0x06)>)> poco_s...<br>
<wbr> <wbr> <wbr>
^<br>
12 errors generated.<br>
fandre@ubuntu-trusty-64:~/clan<wbr>g$<br>
<br>
</div>
<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote>
</div>
</div>
</blockquote>
<br>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>