Here's the output of the end of the build: gcc -O2 -funroll-loops -pipe -fexpensive-optimizations -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -pipe -o ffmpeg ffmpeg.o cmdutils.o libavformat/.libs/libavformat.a -lz libavcodec/.libs/libavcodec.a -lm -lnsl -ldl libavcodec/.libs/libavcodec.a(pthread.o)(.text+0x90): In function `avcodec_thread_free': : undefined reference to `pthread_join' libavcodec/.libs/libavcodec.a(pthread.o)(.text+0x238): In function `avcodec_thread_init': : undefined reference to `pthread_create' collect2: ld returned 1 exit status make[3]: *** [ffmpeg] Error 1 make[3]: Leaving directory `/var/tmp/portage/avifile-0.7.41.20041001/work/avifile-0.7-0.7.41/ffmpeg' make[2]: *** [check-am] Error 2 make[2]: Leaving directory `/var/tmp/portage/avifile-0.7.41.20041001/work/avifile-0.7-0.7.41/ffmpeg' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/avifile-0.7.41.20041001/work/avifile-0.7-0.7.41/ffmpeg' make: *** [check-recursive] Error 1 Seems that -lpthread is missing here... Here are the flags used to build: [ebuild U ] media-video/avifile-0.7.41.20041001 [0.7.38.20030710-r1] (-3dnow) +X +alsa +avi -debug +dvd +esd (-mmx) +oggvorbis -qt +sdl (-sse) -static +truetype +xv +zlib 0 kB gcc version 3.3.4 20040623 glibc-2.3.4.20040808-r1 Reproducible: Always Steps to Reproduce: 1. 2. 3.
works good for me. Can you please emerge sync and try again as there have been some recent changes. Also, please post the output of 'emerge --info'
I do synchronise my portage tree daily and I did retried (I always do...) after a sync before posting a bug report. Here's the ebuild file I got: # ls -l /usr/portage/media-video/avifile/avifile-0.7.41.20041001.ebuild -rw-r--r-- 1 root root 3891 Oct 7 11:06 /usr/portage/media-video/avifile/avifile-0.7.41.20041001.ebuild # md5sum /usr/portage/media-video/avifile/avifile-0.7.41.20041001.ebuild 542809be7e4fe97811ff3a90238cd1b3 /usr/portage/media-video/avifile/avifile-0.7.41.20041001.ebuild You can easily see there is a bug: you can never use the pthread library without explicitely link against it. It would be surprising (and abnormal...) that you could do this without hacking the gcc specs. I'll send an attachment with my current emerge info output. What I did also forget was to send the flags used for this package: # emerge -b --update --verbose --pretend =media-video/avifile-0.7.41.20041001 These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild U ] media-video/avifile-0.7.41.20041001 [0.7.38.20030710-r1] (-3dnow) +X +alsa +avi -debug +dvd +esd (-mmx) +oggvorbis -qt +sdl (-sse) -static +truetype +xv +zlib 0 kB
Created attachment 41397 [details] emerge --info output
I've got: [ebuild R ] media-video/avifile-0.7.41.20041001 (-3dnow) +X +alsa +avi -debug +dvd +esd (-mmx) +oggvorbis +qt +sdl (-sse) -static +truetype +xv +zlib 0 kB I'm betting that it's the +qt because libqt-mt is linked against pthread
I tried with your cflags, and it linked fine for me...
OK, I'm sorry: I still forgot one point: I got "maketest" in my FEATURES, and I realised, re-reading the emerge log, that the build fails to build ffmpeg in the test phase. I'll send the complete log so you can see. One thing is sure, ffmpeg cannot link without the -lpthread flag if it uses the pthread library, whatever are the other libraries given...
Created attachment 41411 [details] emerge log file
Same error here, on x86; I've the maketest flag in FEATURES
Just out of curiousity, do you folks have nplt built in to glibc? If not, I'd try making sure qt has threads enabled. If that doesn't work, I'll try going to an amd64 dev box and seeing what I can find.
chris, it has nothing to do with qt... the problem is that when they have USE=maketest, it tries to build ffmpeg, but the rules for ffmpeg are fubar... for now, I'm just disabling src_test()...