Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 240379 - media-video/mjpegtools-1.8.0-r2- encodertypes.h:76: error: 'abs' was not declared in this scope
Summary: media-video/mjpegtools-1.8.0-r2- encodertypes.h:76: error: 'abs' was not decl...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Media-video project
: 240435 (view as bug list)
Depends on:
Reported: 2008-10-07 13:25 UTC by Pavol Cvengros
Modified: 2009-07-22 21:24 UTC (History)
7 users (show)

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

mjpegtools-1.8.0-libc.patch (mjpegtools-1.8.0-libc.patch,2.38 KB, patch)
2008-10-28 18:48 UTC, Markus Peloquin
Details | Diff
mjpegtools-1.8.0-libc.patch (mjpegtools-1.8.0-libc.patch,3.94 KB, patch)
2008-10-28 19:22 UTC, Markus Peloquin
Details | Diff
mjpegtools-1.8.0-libc.patch (mjpegtools-1.8.0-libc.patch,5.39 KB, text/plain)
2008-12-10 17:26 UTC, Chris Slycord

Note You need to log in before you can comment on or make changes to this bug.
Description Pavol Cvengros 2008-10-07 13:25:24 UTC
Can't compile mjpegtools with different USE flags.
Using gcc-4.3.2 on ~x86

Reproducible: Always

Actual Results:  
libtool: compile:  i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../utils -O2 -march=native -pipe -fno-strict-aliasing -pthread -MT encoderparams.lo -MD -MP -MF .deps/encoderparams.Tpo -c -o encoderparams.o >/dev/null 2>&1
mv -f .deps/encoderparams.Tpo .deps/encoderparams.Plo
/bin/sh ../libtool --tag=CXX   --mode=compile i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../utils    -O2 -march=native -pipe -fno-strict-aliasing -pthread  -MT macroblock.lo -MD -MP -MF .deps/macroblock.Tpo -c -o macroblock.lo
libtool: compile:  i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../utils -O2 -march=native -pipe -fno-strict-aliasing -pthread -MT macroblock.lo -MD -MP -MF .deps/macroblock.Tpo -c  -fPIC -DPIC -o .libs/macroblock.o
In file included from macroblock.hh:54,
encodertypes.h: In member function 'int MotionVector::CodingPenaltyForSAD() const':
encodertypes.h:76: error: 'abs' was not declared in this scope In member function 'void MacroBlock::SelectCodingModeOnVariance()': error: 'INT_MAX' was not declared in this scope
make[2]: *** [macroblock.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-video/mjpegtools-1.8.0-r2/work/mjpegtools-1.8.0/mpeg2enc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-video/mjpegtools-1.8.0-r2/work/mjpegtools-1.8.0'
make: *** [all] Error 2
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-07 15:05:48 UTC
Please post your `emerge --info' too.
Comment 2 Pavol Cvengros 2008-10-07 15:16:46 UTC
Portage 2.2_rc11 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.24-gentoo-r8 i686)
System uname: Linux-2.6.24-gentoo-r8-i686-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-glibc2.0
Timestamp of tree: Tue, 07 Oct 2008 10:35:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r13, 2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0
sys-devel/autoconf:  2.63
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.26
CFLAGS="-O2 -march=native -pipe"
CONFIG_PROTECT="/etc /home/mythtv/ /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe"
FEATURES="distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X acl acpi alsa bash-completion berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gpm gstreamer hal iconv isdnlog jpeg kde kerberos ldap libnotify mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis win32codecs x86 xcb xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias asis auth_digest authn_dbd dbd dumpio ident imagemap log_forensic proxy roxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http substitute version" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="imon" LIRC_DEVICES="devinput imon imon_pad2keys imon_rsc" USERLAND="GNU" VIDEO_CARDS="nvidia"
Comment 3 Rafał Mużyło 2008-10-07 16:42:12 UTC
I'd say it's a standard gcc 4.3 problem.
I think <climits> and <cstdlib> are needed.
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2008-10-08 02:04:02 UTC
Actually it's a glibc 2.8 issue.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-08 14:27:08 UTC
*** Bug 240435 has been marked as a duplicate of this bug. ***
Comment 6 thewtex 2008-10-17 05:59:47 UTC
mjpegtools-1.9.0_rc3 does not have this problem, so a solution would be to stabilize as per bug 217427
Comment 7 Dave 2008-10-17 11:16:45 UTC
(In reply to comment #6)
> mjpegtools-1.9.0_rc3 does not have this problem, so a solution would be to
> stabilize as per bug 217427

I don't think it can be.  mytharchive depends on this earlier version of mjpegtools.  

Am I missing something?

Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2008-10-17 13:44:19 UTC
mjpegtools-1.9.0 series has produced bad images for the DVDs used by MythArchive. Specially something with the rollover images on the DVDs themselves so you can't tell what menu item you have highlighted. Unless someone can confirm, 1.9.0_rc3 fixes this issue for MythArchive, we need to stay at 1.8.0
Comment 9 Markus Peloquin 2008-10-28 18:48:46 UTC
Created attachment 170137 [details, diff]

This fixes 1.8.0, and helps bring it out of the stone age with numeric_limits :).  Some screwy header usage in there.

I'm trying to pave over another error that has to do with libcaca, now, but I expect a revdep-rebuild will fix that.  Rest assured that everything does *compile* fine on my system.
Comment 10 Markus Peloquin 2008-10-28 19:22:33 UTC
Created attachment 170145 [details, diff]

After rebuilding libsdl, the build process for mjpegtools ended up compiling more source code, so here's YAP.  (Again, some really ugly headers.)  Now I see this, though:

/bin/sh ../libtool --tag=CXX   --mode=link i686-pc-linux-gnu-g++  -O2 -march=pentium-m -pipe -fno-strict-aliasing -pthread  -version-info 0:0:0 -release 1.8 -Wl,-O1 -o -rpath /usr/lib libmplex2_la-ac3strm_in.lo libmplex2_la-audiostrm_out.lo libmplex2_la-bits.lo libmplex2_la-decodebufmodel.lo libmplex2_la-dtsstrm_in.lo libmplex2_la-inputstrm.lo libmplex2_la-interact.lo libmplex2_la-lpcmstrm_in.lo libmplex2_la-mpastrm_in.lo libmplex2_la-multiplexor.lo libmplex2_la-padstrm.lo libmplex2_la-stillsstream.lo libmplex2_la-stream_params.lo libmplex2_la-systems.lo libmplex2_la-videostrm_in.lo libmplex2_la-videostrm_out.lo  ../utils/  -lm 
mv -f .deps/main.Tpo .deps/main.Po
i686-pc-linux-gnu-g++ -shared -nostdlib /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../crti.o /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/crtbeginS.o  .libs/libmplex2_la-ac3strm_in.o .libs/libmplex2_la-audiostrm_out.o .libs/libmplex2_la-bits.o .libs/libmplex2_la-decodebufmodel.o .libs/libmplex2_la-dtsstrm_in.o .libs/libmplex2_la-inputstrm.o .libs/libmplex2_la-interact.o .libs/libmplex2_la-lpcmstrm_in.o .libs/libmplex2_la-mpastrm_in.o .libs/libmplex2_la-multiplexor.o .libs/libmplex2_la-padstrm.o .libs/libmplex2_la-stillsstream.o .libs/libmplex2_la-stream_params.o .libs/libmplex2_la-systems.o .libs/libmplex2_la-videostrm_in.o .libs/libmplex2_la-videostrm_out.o  -Wl,--rpath -Wl,/var/tmp/portage/media-video/mjpegtools-1.8.0-r1/work/mjpegtools-1.8.0/utils/.libs ../utils/.libs/ -L/usr/lib/gcc/i686-pc-linux-gnu/4.3.2 -L/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/lib -L/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/crtendS.o /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../crtn.o  -march=pentium-m -pthread -Wl,-O1 -Wl,-soname -Wl, -o .libs/
(cd .libs && rm -f && ln -s
(cd .libs && rm -f && ln -s
i686-pc-linux-gnu-ar cru .libs/libmplex2.a  libmplex2_la-ac3strm_in.o libmplex2_la-audiostrm_out.o libmplex2_la-bits.o libmplex2_la-decodebufmodel.o libmplex2_la-dtsstrm_in.o libmplex2_la-inputstrm.o libmplex2_la-interact.o libmplex2_la-lpcmstrm_in.o libmplex2_la-mpastrm_in.o libmplex2_la-multiplexor.o libmplex2_la-padstrm.o libmplex2_la-stillsstream.o libmplex2_la-stream_params.o libmplex2_la-systems.o libmplex2_la-videostrm_in.o libmplex2_la-videostrm_out.o
i686-pc-linux-gnu-ranlib .libs/libmplex2.a
(cd .libs && rm -f && ln -s ../
/bin/sh ../libtool --tag=CXX   --mode=link i686-pc-linux-gnu-g++  -O2 -march=pentium-m -pipe -fno-strict-aliasing -pthread   -Wl,-O1 -o mplex main.o -lm   -lm 
i686-pc-linux-gnu-g++ -O2 -march=pentium-m -pipe -fno-strict-aliasing -pthread -Wl,-O1 -o .libs/mplex main.o  ./.libs/ /var/tmp/portage/media-video/mjpegtools-1.8.0-r1/work/mjpegtools-1.8.0/utils/.libs/ -lm 
./.libs/ undefined reference to `PS_Stream::PS_Stream(unsigned int, unsigned int, OutputStream&, long)'
collect2: ld returned 1 exit status

I can't make any sense out of it.
Comment 11 Chris Slycord 2008-12-10 17:26:53 UTC
Created attachment 174872 [details]

I had a look at the patch used to make 1.9.0_rc3 work with gcc4.3 and the new glibc, and created this patch to mimic its fixes.

Works on my end.
Comment 12 Dan A. Dickey 2009-01-07 17:25:11 UTC
Um, almost a month now.  Granted, over the holidays, but
are we just waiting for someone to say that 1.9.x works with
mytharchive to close this, or is someone going to check in
an actual fix for it?
Comment 13 Dan A. Dickey 2009-03-02 20:41:56 UTC
Is nobody else using mytharchive?
I do.  I've been patiently waiting for this bug to be fixed...
Comment 14 Steven Parker 2009-03-30 02:55:21 UTC
I am also getting the original error posted here. mjpegtools-1.8 is needed for mytharchive, which I am trying to install so I would be able to copy some of my DVD's to my computer. A patch that makes it to portage, or a fix for the problems with mjpegtools-1.9 would be greatly appreciated. It's one of the reasons I want to use mythtv, and it would be nice to have all the features in one program like mythtv does.
Comment 15 Preston Crow 2009-06-06 05:12:09 UTC
The libc patch works great.  It's just one line in the ebuild to apply the patch, after putting the patch file in the files subdirectory.  Is there anyone here that can commit that change to portage and close this out?
Comment 16 Brad Allen 2009-07-22 20:37:34 UTC
Same problem, and the patch works here too.  Why the hell won't they fix this?
Comment 17 Dan A. Dickey 2009-07-22 21:10:31 UTC
Time constraints probably, and not enough developers to work on things.
It's probably not that they "won't" fix this - they probably just can't and it's not causing
enough of a problem for whoever could fix it.

When things like this happen, I seriously consider joining the Gentoo developers team.
But then - I'd be fixing things that bothered "me".  :)

Oh well... the patch works.

And yeah, it sure would be nice to get this fixed... hello?  Anyone there?
Comment 18 Samuli Suominen (RETIRED) gentoo-dev 2009-07-22 21:17:57 UTC
(In reply to comment #16)
> Same problem, and the patch works here too.  Why the hell won't they fix this?

Don't raise your tone or i'll get your bugzilla account revoked. Nobody of us is getting paid for any of this voluntary work.
Comment 19 Samuli Suominen (RETIRED) gentoo-dev 2009-07-22 21:21:12 UTC
Doesn't compile anymore with GCC 4.4+ and GLIBC 2.10+ using the attached patch,

libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I .. -I ../utils -march=core2 -msse4.1 -O2 -pipe -fno-strict-aliasing -pthread -MT libmplex2_la-mpastrm_in.lo -MD -MP -MF .deps/libmplex2_la-mpastrm_in.Tpo -c mpastrm_in.cpp  -fPIC -DPIC -o .libs/libmplex2_la-mpastrm_in.o
lpcmstrm_in.cpp: In static member function ‘static bool LPCMStream::Probe(IBitStream&)’:
lpcmstrm_in.cpp:56: error: invalid conversion from ‘const char*’ to ‘char*’
lpcmstrm_in.cpp: In member function ‘virtual void LPCMStream::Close()’:
lpcmstrm_in.cpp:186: warning: format ‘%lld’ expects type ‘long long int’, but argument 2 has type ‘bitcount_t’
make[2]: *** [libmplex2_la-lpcmstrm_in.lo] Error 1
Comment 20 Samuli Suominen (RETIRED) gentoo-dev 2009-07-22 21:24:54 UTC
+  22 Jul 2009; Samuli Suominen <>
+  mjpegtools-1.8.0-r2.ebuild, +files/mjpegtools-1.8.0-libc.patch:
+  Fix building with GCC 4.3+ and glibc-2.8+ wrt #240379, thanks to Chris
+  Slycord.

Applied it anyway; taking your word it fixes the old version on old system.

Dan, well put by the way. We actually have several developers that only take care of certain packages, it's no issue, all help is appericiated.