NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Problems with C++ compiler on 9.0_RC2



Martin Husemann <martin%duskware.de@localhost> écrit :
> On Mon, Feb 10, 2020 at 11:01:37AM +0100, Marc Baudoin wrote:
> > I believe only C++ programs using pthread fail.  I don't know how
> > to do a minimal example but the easiest way to see the problem is
> > to compile pkgsrc/multimedia/libvpx (which doesn't have too many
> > dependencies).
> 
> Here is a trivial reproducer:
> 
> --8<--
> #include <memory>
> #include <iostream>
> using namespace std;
> 
> int main(int argc, char **argv)
> {
>         cout << "hello world\n";
>         return 0;
> }
> -->8--

Thanks.

> Compile with c++ and watch it fail as you described.
> 
> The original compilation was done with -std=c++11, but that does not seem
> to matter here.

It doesn't matter indeed, it always fail for me:

% c++ -std=c++11 toto.cxx
In file included from /usr/include/g++/memory:74:0,
                 from toto.cxx:1:
/usr/include/g++/ext/concurrence.h:124:5: error: ‘__gthread_mutex_t’ does not name a type; did you mean ‘__pthread_volatile’?
     __gthread_mutex_t _M_mutex;
     ^~~~~~~~~~~~~~~~~
     __pthread_volatile
/usr/include/g++/ext/concurrence.h:169:5: error: ‘__gthread_mutex_t’ does not name a type; did you mean ‘__pthread_volatile’?
     __gthread_mutex_t* gthread_mutex(void)
     ^~~~~~~~~~~~~~~~~
     __pthread_volatile
/usr/include/g++/ext/concurrence.h:179:5: error: ‘__gthread_recursive_mutex_t’ does not name a type; did you mean ‘__recursive_mutex’?
     __gthread_recursive_mutex_t _M_mutex;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     __recursive_mutex
/usr/include/g++/ext/concurrence.h:224:5: error: ‘__gthread_recursive_mutex_t’ does not name a type; did you mean ‘__recursive_mutex’?
     __gthread_recursive_mutex_t* gthread_recursive_mutex(void)
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     __recursive_mutex

> The failure (at least with above test) does not happen in -current, nor
> when installing 9.0_RC2 from scratch.

But it happens for me on every system I have that have been
upgraded with an install ISO from 8.1 to 9.0_RC2.

Strangely enough, it doesn't happen on another system that have
been upgraded (always with a binary install image) from 8.1 to
several 9.0_BETAs over time then 9.0_RC1 then 9.0_RC2...


Home | Main Index | Thread Index | Old Index