ffmpeg: "libthr.so.3" and "libc.so.7" giving me fits

I need to create a static ffmpeg executable on FreeBSD 9.3-RELEASE. I'm close but I still have two libraries that are giving me fits.

How do I compile ffmpeg so that the static libthr.a and libc.a libraries are included within the ffmpeg executable? Every time I compile ffmpeg from source and I do a ldd ffmpeg, I get the following:

Code:
libthr.so.3 => /lib/libthr.so.7 (0x28c2c000)
libc.so.7 => /lib/libc.so.7 (0x28c4d000)
All the other third-party static libraries (ex: libaacplus.a, libmp3lame.a, etc...) are added correctly and do not show up when I run the ldd command.
 
Let' go a step further.

Let's not even think about my problem of trying to create a static ffmpeg executable. Let's ask this question:

Has anyone created a static executable of any kind with the following two static libraries: libthr.a and libc.a?

If you did, how did you do it?
 
Code:
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>

void* mythread( void* arg )
{
  return NULL;
}

int main( int argc, const char* const argv[] )
{
 pthread_t pthr;
 pthread_attr_t pthattr;

 int i;

 pthread_attr_init(&pthattr);
 pthread_attr_setdetachstate(&pthattr, PTHREAD_CREATE_DETACHED);

 while( 1 ) {
  for( i=100; i; i-- )
   if( pthread_create( &pthr, &pthattr, mythread, NULL ) != 0 )
    fprintf( stderr, "pthread_create failed\n" );

  putchar( '.' );
  fflush( stdout );
  usleep( 25000 );
 }
}

Build with the following command:
Code:
cc -o pthr1-static -pthread -static pth1.c
The result:
Code:
jimmy@jmobile:~/wsThreads % ldd pth1-static 
ldd: pth1-static: not a dynamic ELF executable
 
Back
Top