After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 592314 - core/tests/examples/streams/ does not link to pthread
core/tests/examples/streams/ does not link to pthread
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Windows
: Normal minor
: 0.10.25
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-19 10:44 UTC by LRN
Modified: 2009-08-21 08:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description LRN 2009-08-19 10:44:46 UTC
testrtpool.c does use pthread a lot and includes pthread.h, but there is no traces of -lpthread in Makefile.am

As a result, ld complains about undefined symbols while linking rtpool-test on systems where -lpthread is not implicit (such as Windows).

Fix: add -lpthread to rtpool_test_LDADD
Comment 1 Sebastian Dröge (slomo) 2009-08-19 13:27:19 UTC
commit b0b971ff322e22c1202ec100525e140068d0b911
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Wed Aug 19 15:25:41 2009 +0200

    examples: Link rtpool-test to libpthread for using the POSIX threads
    
    Also the other streams example can run without pthreads therefore
    enable it even if pthreads are not available.
    
    Fixes bug #592314.
Comment 2 Tim-Philipp Müller 2009-08-19 15:39:40 UTC
Sorry for the nitpicking, but I'm not convinced this is 100% technically correct. It would be better to check for whether GThread uses posix threads as implementation and only enable the test in that case. On windows for example we might have pthreads, but GThread might use something else as implementation. It's only a test of course, but still..
Comment 3 Sebastian Dröge (slomo) 2009-08-21 08:18:11 UTC
(In reply to comment #2)
> Sorry for the nitpicking, but I'm not convinced this is 100% technically
> correct. It would be better to check for whether GThread uses posix threads as
> implementation and only enable the test in that case. On windows for example we
> might have pthreads, but GThread might use something else as implementation.
> It's only a test of course, but still..

Hm, no. Nothing uses GThread in rtpool-test/testrtpool. The only usage of thread related things is in testrtpool.c and there pthreads are directly used. Am I missing something?
Comment 4 Tim-Philipp Müller 2009-08-21 08:55:59 UTC
You're right. I thought the example did something else than it actually does. Sorry for the noise.