Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72503 - transcode-0.6.13 Build failure "undefined reference" in link phase
Summary: transcode-0.6.13 Build failure "undefined reference" in link phase
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-25 13:49 UTC by John Gluck
Modified: 2005-04-25 06:44 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Gluck 2004-11-25 13:49:28 UTC
This is an X86 arch bug only.

In work/transcode-0.6.13/aclib/tcmemcpy.c If the arch is X86 then

The pointer to tc_memcpy is set to either ac_memcpy_amdmmx or memcpy

The problem is that neither of these functions is defined in any file provided.
It looks like a file was inadvertantly left out of the package.

Note the previous version of transcode builds ok, but I didn't have the "keep" set so the source was deleted.

I set this bug to "Major" since other apps depend on transcode. Don't know if this is correct/ Please let me know.

Reproducible: Always
Steps to Reproduce:
1. emerge transcode-0.6.13 on an X86 machine (I have pentium 4 machines)
2. 
3.

Actual Results:  
gcc -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2
-march=pentium4 -fomit-frame-pointer -DDCT_YUV_PRECISION=1 -o tcextract
tcextract-tcextract.o tcextract-extract_ac3.o tcextract-extract_mpeg2.o
tcextract-extract_pcm.o tcextract-fileinfo.o tcextract-extract_yuv.o
tcextract-extract_rgb.o tcextract-extract_dv.o tcextract-ioaux.o
tcextract-extract_mp3.o tcextract-scan_dv.o tcextract-aux_pes.o
tcextract-extract_avi.o tcextract-extract_ogm.o tcextract-extract_lzo.o
tcextract-extract_mxf.o  ../libac3/.libs/libac3_tc.a
../libmpeg2/.libs/libmpeg2cvs.a ../libvo/.libs/libvout.a
../avilib/.libs/libavi.a /usr/lib/libvorbis.so -L/usr/lib /usr/lib/libogg.so
../aclib/.libs/libac.a -lm -lz -ldl
../aclib/.libs/libac.a(tcmemcpy.o)(.text+0x2d): In function `tc_memcpy_init':
: undefined reference to `ac_memcpy_amdmmx'
../aclib/.libs/libac.a(tcmemcpy.o)(.text+0x75): In function `tc_memcpy_init':
: undefined reference to `ac_memcpy_mmx'
collect2: ld returned 1 exit status
make[3]: *** [tcextract] Error 1


Expected Results:  
It would not fail on the link as noted above.

Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1,
2.6.9-gentoo-r4 i686)
=================================================================
System uname: 2.6.9-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.4.16
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux26-headers-2.6.8.1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache digest distlocks keepwork sandbox sfperms"
GENTOO_MIRRORS="http://gentoo.binarycompass.org ftp://mirror.nutsmaas.nl/gentoo/
http://gentoo.math.bme.hu http://gentoo.mirror.sdv.fr
ftp://gentoo.osuosl.org/.1/gentoo http://gentoo.osuosl.org"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa apm arts avi berkdb bitmap-fonts bonobo cdr crypt cscope cups encode
esd f77 fam flac foomaticdb fortran gdbm gif gnome gphoto2 gpm gstreamer gtk
gtk2 gtkhtml guile imagemagick imlib jack java jpeg junit kde libg++ libwww mad
mikmod motif mozilla mpeg mysql ncurses nls nptl oggvorbis opengl oss pam pdflib
perl png python qt quicktime readline samba scanner sdl slang speex spell ssl
svga tcltk tcpd tetex tiff truetype x86 xml xml2 xmms xv zlib"
Comment 1 John Gluck 2004-11-25 14:10:05 UTC
The problem is tin the aclibs/Makefile. The assembler files are commented out.

This is a snippet of the file:

noinst_LTLIBRARIES = libac.la
#ASM_SRC = \
#       memcpy.s \
#       rescale.s \
#       average.s \
#       swap.s \
#       asm_io.s

libac_la_SOURCES = \
        tcmemcpy.c \
        cputest.c \
        $(ASM_SRC)
Comment 2 Dan A. Dickey 2004-12-02 04:45:44 UTC
Same problem here.
Comment 3 Marc Hildebrand (RETIRED) gentoo-dev 2004-12-03 03:23:01 UTC
Did yo try transcode-0.6.14 as well?
Cheers,

Marc.
Comment 4 Dan A. Dickey 2004-12-03 05:14:07 UTC
See bug 72923.
The fix is to include "mmx" in your USE settings.
Comment 5 John Gluck 2004-12-04 17:59:06 UTC
In reply to the request about transcode-0.6.14...

I just tried to compile ti and it fails. The following are the errors:

i686-pc-linux-gnu-gcc -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=pentium4 -fomit-frame-pointer -DDCT_YUV_PRECISION=1 -o tcdecode tcdecode-tcdecode.o tcdecode-decode_ac3.o tcdecode-decode_mpeg2.o tcdecode-decode_yuv.o tcdecode-fileinfo.o tcdecode-ioaux.o tcdecode-decode_dv.o tcdecode-decode_mp3.o tcdecode-mpg123.o tcdecode-decode_a52.o tcdecode-decode_af6.o tcdecode-scan_dv.o tcdecode-decode_lavc.o tcdecode-decode_xvid.o tcdecode-decode_ogg.o tcdecode-decode_mov.o tcdecode-decode_lzo.o  -L/usr/lib -lavcodec -L/usr//lib /usr/lib/libmp3lame.so ../libac3/.libs/libac3_tc.a ../libmpeg2/.libs/libmpeg2cvs.a ../libvo/.libs/libvout.a /usr/lib/libvorbisfile.so /usr/lib/libvorbis.so /usr/lib/libogg.so /usr/lib/libquicktime.so -lpng -lpthread ../aclib/.libs/libac.a -lm -lz-ldl
../libvo/.libs/libvout.a(yuv2rgb.o)(.text+0xcd9): In function `yuv2rgb_init':
: undefined reference to `yuv2rgb_init_mmxext'
../libvo/.libs/libvout.a(yuv2rgb.o)(.text+0x101b): In function `yuv2rgb_init':
: undefined reference to `yuv2rgb_init_mmx'
collect2: ld returned 1 exit status
make[3]: *** [tcdecode] Error 1
make[3]: Leaving directory `/var/tmp/portage/transcode-0.6.14/work/transcode-0.6.14/import'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/transcode-0.6.14/work/transcode-0.6.14/import'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/transcode-0.6.14/work/transcode-0.6.14'
make: *** [all] Error 2

!!! ERROR: media-video/transcode-0.6.14 failed.
!!! Function src_compile, Line 96, Exitcode 2
!!! (no error message)
Comment 6 John Gluck 2004-12-05 10:12:17 UTC
I tried building transcode-0.6.14 again this morning. I've upgraded portage and now it worked. I doo get the following:

>>> Checking transcode-0.6.14.tar.gz's mtime...
>>> WORKDIR is up-to-date, keeping...
 * Patching ${S}/autotools/ltmain.sh ...
 *   Could not apply portage.patch!
 *   Please verify that it is not needed.
 * Cannot apply any patch, running libtoolize...
Putting files in AC_CONFIG_AUX_DIR, `autotools'.
 * Applying uClibc/libtool patches ...
 * econf: updating /var/tmp/portage/transcode-0.6.14/work/transcode-0.6.14/autot
ools/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating /var/tmp/portage/transcode-0.6.14/work/transcode-0.6.14/autot
ools/config.sub with /usr/share/gnuconfig/config.sub


Still, It compiles and installs.
Comment 7 Heitzso 2005-02-28 10:51:28 UTC
I just hit the 
 undefined reference to `yuv2rgb_init_mmx'
bug.  I'm on an x86 gentoo stable system but
needed to ~x86 transcode to get a current version
for the export profile flag.  I'm surprised
that the compile is rigged to crash if 'mmx'
is not set as a USE flag.  I don't know if there
is an elegant way to handle this but, if there is,
I'd suggest altering the setup to work more 
gracefully.  Just a request.  Thanks.
Comment 8 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-04-25 06:44:45 UTC
As .14 works, the problem was probably fixed upstream. Just use a newer version.