-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: blacklist native in C++11 #4039
Conversation
@josephnoir, do you know if these tests were supposed to run on native? |
IIRC they should work fine on native. Did the mutex implementation change? @gebart, do you recall any problems on native? |
@josephnoir I don't have any problems running the tests on native on my machine (g++ (Gentoo 4.9.3 p1.0, pie-0.6.2) 4.9.3) |
On OS X, with
@gebart, you're right though. The tests run fine on Ubuntu with |
My Ubuntu always wants to link to the
|
Do I have to install some special package, other then |
Building works fine, for me but I get a segefault:
gcc (GCC) 5.2.0 on Linux 4.1.6-1 (ARCH Linux) |
I get
btw. |
With clang 3.6.2 I get the same error as @josephnoir. |
Just tried it on a Ubuntu 15.04 and had to install the packages |
Ha, I hadn't installed those, now with those installed (which pulled in |
Are those the correct outputs (aka some tests/cpp11_condition_variable:
tests/cpp11_mutex:
tests/cpp11_thread:
|
(build on current release branch). |
I guess that's pulled in as soon as you set |
@authmillenon Those are the correct outputs. At the time I thought That leaves the segfault with gcc 5.2 and the clang problems ... |
(updated the Wikipage, please adapt to your liking if it's not) |
I don't have the
|
Looks like it only exists with newer versions of the compiler, can't find anything on the topic though. |
And what about the segfault with gcc? |
IMHO we have to come to a decision. Either we document somewhere, that certain compiler versions are not supported for native + C++ for now (and maybe block building them altogether for now) or we fix it. |
I agree. Anyone with any clue why it segfaults with newer GCC versions? |
I can take a look at it tonight. |
thx |
Just figured that the riot_and_cpp example is segfaulting with my toolchain, too. |
gcc-4.9.2 works |
For the clang problem, this patch "solves" the problem: diff --git a/sys/cpp11-compat/include/riot/mutex.hpp b/sys/cpp11-compat/include/riot/mutex.hpp
index d478327..4d10cd9 100644
--- a/sys/cpp11-compat/include/riot/mutex.hpp
+++ b/sys/cpp11-compat/include/riot/mutex.hpp
@@ -44,7 +44,7 @@ class mutex {
public:
using native_handle_type = mutex_t*;
- inline constexpr mutex() noexcept : m_mtx{0, PRIORITY_QUEUE_INIT} {}
+ inline mutex() noexcept : m_mtx{{0}, PRIORITY_QUEUE_INIT} {}
~mutex();
void lock(); |
Shouldn't it suffice to just set braces around |
I still get a compiler error if I leave the |
Yeah, found that one too. Problem is, IIRC, the constructor is should be a constexpr. I have no clue about the gcc thing. The segfault also occurs on Fedora with |
The "gcc thing" is solved with #4043. |
@OlegHahm Nice. |
According to http://en.cppreference.com/w/cpp/language/constexpr is just signifying, that the expression can be evaluated at compile time (and the rules for structs seem to have changed since C++14). If @OlegHahm has a compile error there, it might not be possible to do so, so why not just not make it |
@OlegHahm are you providing a PR for that before you open a new RC? |
(ah, just saw that you already made a new RC). |
Probably doesn't help if it can't be compiled, although I am wondering why it is working with BTW: here is a draft of the standard. |
Also not needed any more. |
Will someone provide a PR for #4039 (comment) or should I? |
Non-release version of #4038.