Skip to content

Problem with pthread_xxx code (version GLIBCXX_3.4.21 not found) #55

@freezed-or-frozen

Description

@freezed-or-frozen

While playing with pthread_create() and pthread_join() in a C++ source code, I get this strange error :

robot@ev3dev:~/snir2$ ./test_threads 
terminate called after throwing an instance of '__gnu_cxx::__concurrence_broadcast_error'
  what():  __gnu_cxx::__concurrence_broadcast_error
Abandon

After googling it, I have read some solution from issue #27
I installed docker image and compiled the same source code with :
arm-linux-gnueabi-g++ -o test_threads -std=c++11 -static test_threads.cpp ev3dev.cpp -lpthread

I quess these error is strongly linked to the static compilation.
From the docker image, I compiled with :
arm-linux-gnueabi-g++ -o test_threads -std=c++11 test_threads.cpp ev3dev.cpp -lpthread

Now, I get an error dealing with the libstdc++ version :

./test_threads: /usr/lib/arm-linux-gnueabi/libstdc++.so.6: version GLIBCXX_3.4.21 not found (required by ./test_threads)

I have no clue how to fix all these errors...

ev3dev version installed on the robot is :

robot@ev3dev:~/snir2$ uname -a
Linux ev3dev 4.4.87-22-ev3dev-ev3 #1 PREEMPT Sat Sep 9 14:45:55 CDT 2017 armv5tejl GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions