Bug 244225

Summary: portaudio seems to be badly built
Product: [Fedora] Fedora Reporter: STEPHAN Gael <pix>
Component: portaudioAssignee: Matthias Saou <matthias>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 7   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-06-14 17:17:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description STEPHAN Gael 2007-06-14 16:12:28 UTC
Description of problem:
i can't build with portaudio:
configure:18394: gcc -o conftest -g -O2   conftest.c -lportaudio  -lspeex -ltbb  >&5
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libportaudio.so: undefined
reference to `pthread_kill'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libportaudio.so: undefined
reference to `pthread_create'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libportaudio.so: undefined
reference to `pthread_cancel'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libportaudio.so: undefined
reference to `pthread_join'
collect2: ld returned 1 exit status


Version-Release number of selected component (if applicable):
portaudio-18.1-8.fc6

How reproducible:
try to link :)

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
My guess: not linked with libpthread

Comment 1 Matthias Saou 2007-06-14 16:24:05 UTC
Wow! I had totally forgotten I was the maintainer of portaudio... I recently
needed it updated, and thought "I'll have to file a bug against it to get it done".

I'll have a look at this when I get a moment. Strange though that no one has
noticed this before!

Comment 2 STEPHAN Gael 2007-06-14 16:30:34 UTC
i did some tests, it's v ery strange. To workaround this, i did a export
LD_PRELOAD=/lib/libpthread.so.0 and i had the same error.
I ldd the file:
[root@ruatha TeamBlibbityBlabbity-0.1]# ldd /usr/lib/libportaudio.so 
        linux-gate.so.1 =>  (0x00cd9000)
        /lib/libpthread.so.0 (0x002f2000)
        libc.so.6 => /lib/libc.so.6 (0x00406000)
        /lib/ld-linux.so.2 (0x80000000)

And it's linked with libpthread..
and:

[root@ruatha TeamBlibbityBlabbity-0.1]# strings /lib/libpthread.so.0 | grep
pthread_kill
pthread_kill
pthread_kill_other_threads_np

So i'm beginning to think about a gcc/ld problem...

Comment 3 STEPHAN Gael 2007-06-14 16:41:10 UTC
[pix@ruatha wynux]$ cat hello.c
#include <stdio.h>

int main(int argc, char **argv)
{
    printf("Hello world!\n");
    
    return 0;
}
[pix@ruatha wynux]$ gcc -o hello hello.c -lportaudio
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libportaudio.so: undefined
reference to `pthread_kill'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libportaudio.so: undefined
reference to `pthread_create'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libportaudio.so: undefined
reference to `pthread_cancel'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libportaudio.so: undefined
reference to `pthread_join'
collect2: ld returned 1 exit status


Comment 4 Matthias Saou 2007-06-14 16:51:13 UTC
Yeah, but "gcc -o hello hello.c -lportaudio -lpthread" will work. Isn't this
just a case of the library not having a nice portaudio-config nor portaudio.pc
file to add -lpthread when trying to link against it?

Comment 5 STEPHAN Gael 2007-06-14 17:15:00 UTC
Gasp, i'm sorry, looks like the configure script of the software i want to
compile is faulty then.
Feel free to close wontfix/invalid :)

Comment 6 Matthias Saou 2007-06-14 17:17:58 UTC
Closing NOTABUG, as hopefully it's indeed... not a bug :-)