[contract] _NOEXCEPT errors in <ostream> for Clang 5.0 C++1z on Teeks Linux

Hello all, Most of Boost.Contract regression test fail for toolset clang-gnu-linux-5.0~c++1z~lc on platform teeks99-02-dc5-1z-lc-Docker-64on64 because of the following error on #include <ostream> done by Boost.Range (and sometimes by Boost.IOStreams): "clang++-5.0" -c -x c++ -Wno-c99-extensions -std=c++1z -stdlib=libc++ -isystem/usr/include/libcxxabi -O0 -g -fno-inline -Wall -g -fPIC -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTRACT_DISABLE_THREADS -DBOOST_CONTRACT_DYN_LINK -DBOOST_SYSTEM_DYN_LINK=1 -I".." -I"../libs/contract/test/function" -o "/var/boost/run/results/boost/bin.v2/libs/contract/test/function-smoke.test/clang-gnu-linux-5.0~c++1z~lc/debug/threadapi-pthread/function/smoke.o" "../libs/contract/test/function/smoke.cpp" In file included from ../libs/contract/test/function/smoke.cpp:9: In file included from ../libs/contract/test/function/../detail/oteststream.hpp:10: In file included from ../boost/iostreams/tee.hpp:18: In file included from ../boost/iostreams/detail/adapter/device_adapter.hpp:22: In file included from ../boost/iostreams/detail/call_traits.hpp:15: In file included from ../boost/iostreams/traits.hpp:38: In file included from ../boost/range/iterator_range.hpp:14: In file included from ../boost/range/iterator_range_io.hpp:32: In file included from /usr/include/c++/v1/ostream:138: In file included from /usr/include/c++/v1/ios:216: In file included from /usr/include/c++/v1/__locale:15: /usr/include/c++/v1/string:1942:14: error: expected ';' at end of declaration _NOEXCEPT ^ /usr/include/c++/v1/string:1947:9: error: expected unqualified-id _NOEXCEPT ^ /usr/include/c++/v1/__config:368:21: note: expanded from macro '_NOEXCEPT' # define _NOEXCEPT noexcept ^ 2 errors generated. Of course, Boost.Range and Boost.IOStreams show the same error on this toolset/platform independently of Boost.Contract. Any idea what the issue might be? Thanks, --Lorenzo

All,
On Sun, Nov 12, 2017 at 3:27 PM, Lorenzo Caminiti
"clang++-5.0" -c -x c++ -Wno-c99-extensions -std=c++1z -stdlib=libc++ -isystem/usr/include/libcxxabi -O0 -g -fno-inline -Wall -g -fPIC -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTRACT_DISABLE_THREADS -DBOOST_CONTRACT_DYN_LINK -DBOOST_SYSTEM_DYN_LINK=1 -I".." -I"../libs/contract/test/function" -o "/var/boost/run/results/boost/bin.v2/libs/contract/test/function-smoke.test/clang-gnu-linux-5.0~c++1z~lc/debug/threadapi-pthread/function/smoke.o" "../libs/contract/test/function/smoke.cpp"
In file included from ../libs/contract/test/function/smoke.cpp:9: In file included from ../libs/contract/test/function/../detail/oteststream.hpp:10: In file included from ../boost/iostreams/tee.hpp:18: In file included from ../boost/iostreams/detail/adapter/device_adapter.hpp:22: In file included from ../boost/iostreams/detail/call_traits.hpp:15: In file included from ../boost/iostreams/traits.hpp:38: In file included from ../boost/range/iterator_range.hpp:14: In file included from ../boost/range/iterator_range_io.hpp:32: In file included from /usr/include/c++/v1/ostream:138: In file included from /usr/include/c++/v1/ios:216: In file included from /usr/include/c++/v1/__locale:15: /usr/include/c++/v1/string:1942:14: error: expected ';' at end of declaration _NOEXCEPT ^ /usr/include/c++/v1/string:1947:9: error: expected unqualified-id _NOEXCEPT ^ /usr/include/c++/v1/__config:368:21: note: expanded from macro '_NOEXCEPT' # define _NOEXCEPT noexcept ^ 2 errors generated.
Any idea about this? I couldn't find any reference to it online... Again, Boost.Range and Boost.IOStreams see the same errors for Clang 5.0 on Teeks. Thanks, --Lorenzo

On 11/15/17 20:19, Lorenzo Caminiti via Boost wrote:
All,
On Sun, Nov 12, 2017 at 3:27 PM, Lorenzo Caminiti
wrote: "clang++-5.0" -c -x c++ -Wno-c99-extensions -std=c++1z -stdlib=libc++ -isystem/usr/include/libcxxabi -O0 -g -fno-inline -Wall -g -fPIC -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTRACT_DISABLE_THREADS -DBOOST_CONTRACT_DYN_LINK -DBOOST_SYSTEM_DYN_LINK=1 -I".." -I"../libs/contract/test/function" -o "/var/boost/run/results/boost/bin.v2/libs/contract/test/function-smoke.test/clang-gnu-linux-5.0~c++1z~lc/debug/threadapi-pthread/function/smoke.o" "../libs/contract/test/function/smoke.cpp"
In file included from ../libs/contract/test/function/smoke.cpp:9: In file included from ../libs/contract/test/function/../detail/oteststream.hpp:10: In file included from ../boost/iostreams/tee.hpp:18: In file included from ../boost/iostreams/detail/adapter/device_adapter.hpp:22: In file included from ../boost/iostreams/detail/call_traits.hpp:15: In file included from ../boost/iostreams/traits.hpp:38: In file included from ../boost/range/iterator_range.hpp:14: In file included from ../boost/range/iterator_range_io.hpp:32: In file included from /usr/include/c++/v1/ostream:138: In file included from /usr/include/c++/v1/ios:216: In file included from /usr/include/c++/v1/__locale:15: /usr/include/c++/v1/string:1942:14: error: expected ';' at end of declaration _NOEXCEPT ^ /usr/include/c++/v1/string:1947:9: error: expected unqualified-id _NOEXCEPT ^ /usr/include/c++/v1/__config:368:21: note: expanded from macro '_NOEXCEPT' # define _NOEXCEPT noexcept ^ 2 errors generated.
Any idea about this? I couldn't find any reference to it online... Again, Boost.Range and Boost.IOStreams see the same errors for Clang 5.0 on Teeks.
Looks like a libc++ bug, like a missing semicolon.

Hello all,
On Wed, Nov 15, 2017 at 12:20 PM, Andrey Semashev via Boost
On Sun, Nov 12, 2017 at 3:27 PM, Lorenzo Caminiti
Any idea about this? I couldn't find any reference to it online... Again, Boost.Range and Boost.IOStreams see the same errors for Clang 5.0 on Teeks.
Looks like a libc++ bug, like a missing semicolon.
Looks like this was already marked as a Clang/Libc++ bug by Boost.RegEx: https://svn.boost.org/trac10/ticket/7872 I'll go with that conclusion. Thanks. --Lorenzo

On Wed, Nov 15, 2017 at 8:37 PM, Lorenzo Caminiti via Boost < boost@lists.boost.org> wrote:
Hello all,
On Wed, Nov 15, 2017 at 12:20 PM, Andrey Semashev via Boost
wrote: On Sun, Nov 12, 2017 at 3:27 PM, Lorenzo Caminiti < lorcaminiti@gmail.com>
Any idea about this? I couldn't find any reference to it online... Again, Boost.Range and Boost.IOStreams see the same errors for Clang 5.0 on Teeks.
Looks like a libc++ bug, like a missing semicolon.
Looks like this was already marked as a Clang/Libc++ bug by Boost.RegEx:
https://svn.boost.org/trac10/ticket/7872
I'll go with that conclusion.
This was marked (by me!) as a clang bug - that was fixed in clang trunk in January 2013. I find it hard to believe that you're running a clang built from those sources. -- Marshall

On Thu, Nov 16, 2017 at 10:03 AM, Marshall Clow
On Wed, Nov 15, 2017 at 8:37 PM, Lorenzo Caminiti via Boost < boost@lists.boost.org> wrote:
Hello all,
On Wed, Nov 15, 2017 at 12:20 PM, Andrey Semashev via Boost
wrote: On Sun, Nov 12, 2017 at 3:27 PM, Lorenzo Caminiti < lorcaminiti@gmail.com>
Any idea about this? I couldn't find any reference to it online... Again, Boost.Range and Boost.IOStreams see the same errors for Clang 5.0 on Teeks.
Looks like a libc++ bug, like a missing semicolon.
Looks like this was already marked as a Clang/Libc++ bug by Boost.RegEx:
https://svn.boost.org/trac10/ticket/7872
I'll go with that conclusion.
This was marked (by me!) as a clang bug - that was fixed in clang trunk in January 2013. I find it hard to believe that you're running a clang built from those sources.
Or rather, from a set of sources from before then. -- Marshall

On Thu, Nov 16, 2017 at 12:03 PM, Marshall Clow via Boost < boost@lists.boost.org> wrote:
On Wed, Nov 15, 2017 at 8:37 PM, Lorenzo Caminiti via Boost < boost@lists.boost.org> wrote:
Hello all,
On Wed, Nov 15, 2017 at 12:20 PM, Andrey Semashev via Boost
wrote: On Sun, Nov 12, 2017 at 3:27 PM, Lorenzo Caminiti < lorcaminiti@gmail.com>
Any idea about this? I couldn't find any reference to it online... Again, Boost.Range and Boost.IOStreams see the same errors for Clang 5.0 on Teeks.
Looks like a libc++ bug, like a missing semicolon.
Looks like this was already marked as a Clang/Libc++ bug by Boost.RegEx:
https://svn.boost.org/trac10/ticket/7872
I'll go with that conclusion.
This was marked (by me!) as a clang bug - that was fixed in clang trunk in January 2013. I find it hard to believe that you're running a clang built from those sources.
-- Marshall
So I looked into this a bit more this weekend. The teeks99-[d|m]c5-1z-lc-Docker-64on64 build was using ubuntu's standard version of libc++, 3.7.0. In theory, that should work with any compiler version, including clang 5.0....but looking at the large number of compilation errors against that specific runner (the identical clang build that uses libstdc++, the default, instead has none of these issues), something is obviously not working correctly. So on friday I updated that docker image[1] to use a ubuntu ppa with a supposedly updated version (V5.0.0, from 2017-09-11) of libc++[2]. However in the subsequent run with that version, I'm still seeing the same issue. I'm guessing it might be some issue with my config? Is there some minimal source file that produces the same error I can try running to investigate further? If anyone wants to look for themselves, you can pull my docker image: docker pull teeks99/boost-cpp-docker:clang-5 There's a boost build user-config.jam file[3] in the root of that image, the toolset that build is using is "clang-5.0~c++1z~lc". Tom [1] https://github.com/teeks99/boost-cpp-docker/blob/master/clang-5/Dockerfile [2] https://launchpad.net/~anthony-justsoftwaresolutions/+archive/ubuntu/libcxx/... [3] https://github.com/teeks99/boost-cpp-docker/blob/master/clang-5/user-config....

On Sun, Nov 19, 2017 at 6:22 AM, Tom Kent via Boost
Is there some minimal source file that produces the same error I can try running to investigate further?
I can't be sure but from what I saw in the error message it seems the error is raised as soon as <ostream> is included so I'd expect the following to reproduce the error already: #include <ostream> int main() { return 0; } --Lorenzo

Lorenzo Caminiti wrote:
In file included from /usr/include/c++/v1/ostream:138: In file included from /usr/include/c++/v1/ios:216: In file included from /usr/include/c++/v1/__locale:15: /usr/include/c++/v1/string:1942:14: error: expected ';' at end of declaration _NOEXCEPT ^ /usr/include/c++/v1/string:1947:9: error: expected unqualified-id _NOEXCEPT ^ /usr/include/c++/v1/__config:368:21: note: expanded from macro '_NOEXCEPT' # define _NOEXCEPT noexcept ^ 2 errors generated.
Any idea about this? I couldn't find any reference to it online...
Something is wrong with that libc++ install as clang is 5.0, but <__config> line 368 only has this content at release_37: https://github.com/llvm-mirror/libcxx/blob/release_37/include/__config#L368 and I can't a version of <string> that corresponds to the above lines 1942 and 1947.

On Sun, Nov 12, 2017 at 4:27 PM, Lorenzo Caminiti via Boost < boost@lists.boost.org> wrote:
Hello all,
Most of Boost.Contract regression test fail for toolset clang-gnu-linux-5.0~c++1z~lc on platform teeks99-02-dc5-1z-lc-Docker-64on64 because of the following error on #include <ostream> done by Boost.Range (and sometimes by Boost.IOStreams):
"clang++-5.0" -c -x c++ -Wno-c99-extensions -std=c++1z -stdlib=libc++ -isystem/usr/include/libcxxabi -O0 -g -fno-inline -Wall -g -fPIC -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTRACT_DISABLE_THREADS -DBOOST_CONTRACT_DYN_LINK -DBOOST_SYSTEM_DYN_LINK=1 -I".." -I"../libs/contract/test/function" -o "/var/boost/run/results/boost/bin.v2/libs/contract/test/ function-smoke.test/clang-gnu-linux-5.0~c++1z~lc/debug/ threadapi-pthread/function/smoke.o" "../libs/contract/test/function/smoke.cpp"
In file included from ../libs/contract/test/function/smoke.cpp:9: In file included from ../libs/contract/test/function/../detail/oteststream.hpp:10: In file included from ../boost/iostreams/tee.hpp:18: In file included from ../boost/iostreams/detail/ adapter/device_adapter.hpp:22: In file included from ../boost/iostreams/detail/call_traits.hpp:15: In file included from ../boost/iostreams/traits.hpp:38: In file included from ../boost/range/iterator_range.hpp:14: In file included from ../boost/range/iterator_range_io.hpp:32: In file included from /usr/include/c++/v1/ostream:138: In file included from /usr/include/c++/v1/ios:216: In file included from /usr/include/c++/v1/__locale:15: /usr/include/c++/v1/string:1942:14: error: expected ';' at end of declaration _NOEXCEPT ^ /usr/include/c++/v1/string:1947:9: error: expected unqualified-id _NOEXCEPT ^ /usr/include/c++/v1/__config:368:21: note: expanded from macro '_NOEXCEPT' # define _NOEXCEPT noexcept ^ 2 errors generated.
I think I need more context for this.
Looking at the 5.0 libc++ sources, I see this:
1490: template
participants (5)
-
Andrey Semashev
-
Lorenzo Caminiti
-
Marshall Clow
-
Peter Dimov
-
Tom Kent