Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259461 - media-video/mjpegtools: Request to make X11 optional by USE flag
Summary: media-video/mjpegtools: Request to make X11 optional by USE flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement with 1 vote (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-18 10:38 UTC by Vladimir Monchenko
Modified: 2011-05-12 18:42 UTC (History)
10 users (show)

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


Attachments
patch for configuring build without X11 (mjpegtools-1.9.0_noX.diff,2.69 KB, patch)
2009-03-17 20:36 UTC, Lucian Muresan
Details | Diff
diff for ebuild 1.9.0 to honor the -X USE flag (mjpegtools-1.9.0.ebuild_noX.diff,303 bytes, patch)
2009-03-17 20:38 UTC, Lucian Muresan
Details | Diff
build.log of failed build (build.log,82.17 KB, text/plain)
2009-08-19 06:49 UTC, Stefan Richter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Monchenko 2009-02-18 10:38:57 UTC
It is not possible to update mjpegtools. After a while after the beginning of compilation process is completed with an error.

Reproducible: Always

Steps to Reproduce:
emerge -uDN mjpegtools

Actual Results:  
/bin/sh ../libtool --tag=CC   --mode=compile i586-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I/usr/include -I../utils      -Os -march=i586 -pipe -mmmx -m3dnow -fomit-frame-pointer -fno-strict-aliasing -pthread -Wall -Wunused -MT liblavplay_la-audiolib.lo -MD -MP -MF .deps/liblavplay_la-audiolib.Tpo -c -o liblavplay_la-audiolib.lo `test -f 'audiolib.c' || echo './'`audiolib.c
 i586-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I/usr/include -I../utils -Os -march=i586 -pipe -mmmx -m3dnow -fomit-frame-pointer -fno-strict-aliasing -pthread -Wall -Wunused -MT liblavplay_la-audiolib.lo -MD -MP -MF .deps/liblavplay_la-audiolib.Tpo -c audiolib.c  -fPIC -DPIC -o .libs/liblavplay_la-audiolib.o
audiolib.c: In function 'do_audio':
audiolib.c:1089: warning: suggest explicit braces to avoid ambiguous 'else'
 i586-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I/usr/include -I../utils -Os -march=i586 -pipe -mmmx -m3dnow -fomit-frame-pointer -fno-strict-aliasing -pthread -Wall -Wunused -MT liblavplay_la-audiolib.lo -MD -MP -MF .deps/liblavplay_la-audiolib.Tpo -c audiolib.c -o liblavplay_la-audiolib.o >/dev/null 2>&1
mv -f .deps/liblavplay_la-audiolib.Tpo .deps/liblavplay_la-audiolib.Plo
/bin/sh ../libtool --tag=CC   --mode=link i586-pc-linux-gnu-gcc  -Os -march=i586 -pipe -mmmx -m3dnow -fomit-frame-pointer -fno-strict-aliasing -pthread -Wall -Wunused  -version-info 0:0:0 -release 1.9  -Wl,-O1 -o liblavplay.la -rpath /usr/lib liblavplay_la-liblavplay.lo liblavplay_la-audiolib.lo liblavfile.la  liblavjpeg.la  ../utils/libmjpegutils.la   -lX11 -lm
i586-pc-linux-gnu-gcc -shared  .libs/liblavplay_la-liblavplay.o .libs/liblavplay_la-audiolib.o  -Wl,--rpath -Wl,/var/tmp/portage/media-video/mjpegtools-1.9.0/work/mjpegtools-1.9.0/lavtools/.libs -Wl,--rpath -Wl,/var/tmp/portage/media-video/mjpegtools-1.9.0/work/mjpegtools-1.9.0/utils/.libs -L/var/tmp/portage/media-video/mjpegtools-1.9.0/work/mjpegtools-1.9.0/utils/.libs ./.libs/liblavfile.so -L/usr/lib ./.libs/liblavjpeg.so ../utils/.libs/libmjpegutils.so -lX11 -lm  -march=i586 -mmmx -m3dnow -pthread -Wl,-O1 -Wl,-soname -Wl,liblavplay-1.9.so.0 -o .libs/liblavplay-1.9.so.0.0.0
/usr/lib/gcc/i586-pc-linux-gnu/4.1.2/../../../../i586-pc-linux-gnu/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
make[2]: *** [liblavplay.la] Ошибка 1
make[2]: Leaving directory `/var/tmp/portage/media-video/mjpegtools-1.9.0/work/mjpegtools-1.9.0/lavtools'
make[1]: *** [all-recursive] Ошибка 1
make[1]: Leaving directory `/var/tmp/portage/media-video/mjpegtools-1.9.0/work/mjpegtools-1.9.0'
make: *** [all] Ошибка 2
 *
 * ERROR: media-video/mjpegtools-1.9.0 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2669:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed";
 *  The die message:



Portage 2.1.6.4 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.24-gentoo-r3-i686-VIA_Samuel_2-with-glibc2.0
Timestamp of tree: Sun, 15 Feb 2009 12:00:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r9, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i586-pc-linux-gnu"
CFLAGS="-Os -march=i586 -pipe -mmmx -m3dnow -fomit-frame-pointer"
CHOST="i586-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -march=i586 -pipe -mmmx -m3dnow -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://192.168.2.1"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="ru"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://server/gentoo-portage"
USE="3dnow a52 acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt dbus dri dts dvd dvdr dvdread eds emboss encode esd evo fam firefox fontconfig fortran gdbm gif gpm gstreamer hal iconv isdnlog jpeg kde libnotify mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly openmp pcre pdf perl png ppds pppd qt3 qt3support qt4 readline reflection session spell spl ssl startup-notification svg sysfs tcpd threads tiff truetype unicode usb userlocales vorbis win32codecs x264 x86 xml xml2 xorg xulrunner xv xvid zlib" ALSA_CARDS="via82xx" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" LIRC_DEVICES="serial" USERLAND="GNU" VIDEO_CARDS="via"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Vladimir Monchenko 2009-02-18 10:45:14 UTC
Excuse, has forgotten to specify that I instal mjpegtools on the computer without Xorg.
Comment 2 Stefan Lucke 2009-03-15 20:41:00 UTC
Same here:
>>> Emerging (8 of 11) media-video/mjpegtools-1.9.0
 * mjpegtools-1.9.0.tar.gz RMD160 SHA1 SHA256 size ;-) ...                                                                    [ ok ]
 * checking ebuild checksums ;-) ...                                                                                          [ ok ]
 * checking auxfile checksums ;-) ...                                                                                         [ ok ]
 * checking miscfile checksums ;-) ...                                                                                        [ ok ]
>>> Unpacking source...
>>> Unpacking mjpegtools-1.9.0.tar.gz to /var/tmp/portage/media-video/mjpegtools-1.9.0/work
>>> Source unpacked in /var/tmp/portage/media-video/mjpegtools-1.9.0/work
>>> Compiling source in /var/tmp/portage/media-video/mjpegtools-1.9.0/work/mjpegtools-1.9.0 ...
 * econf: updating mjpegtools-1.9.0/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating mjpegtools-1.9.0/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --without-x --disable-xfree-ext --without-libquicktime --with-libpng --without-v4l --without-gtk --without-sdl --without-libdv --disable-simd-accel --enable-largefile --without-jpeg-mmx --libdir=/usr/lib64 --build=x86_64-pc-linux-gnu

[snip]

checking for pthread_attr_getstacksize... yes
checking for jpeg_start_compress in -ljpeg... yes
checking for x86_64-pc-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBPNG... yes
checking for X... disabled
checking for __progname... yes
checking for XF86DGAQueryExtension in -lXxf86dga... no
checking for GTK... no
checking for sdl-config... no
checking for SDL - version >= 1.1.3... no
*** The sdl-config script installed by SDL could not be found
*** If SDL was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the SDL_CONFIG environment variable to the
*** full path to sdl-config.
checking Architecture... x86_64
checking sub-architecture settings...
checking what warning flags to pass to the C compiler... -Wall -Wunused

[snip]

/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lX11

Even if configured without X11, it tries to link in -lX11 :-(( .
Comment 3 Lucian Muresan 2009-03-17 20:36:04 UTC
Created attachment 185344 [details, diff]
patch for configuring build without X11

I too want to build on a gentoo PC running without X (used as a htpc with DirectFB output only) and have to patch this all the time (like other packages, too...)
Comment 4 Lucian Muresan 2009-03-17 20:38:35 UTC
Created attachment 185346 [details, diff]
diff for ebuild 1.9.0 to honor the -X USE flag
Comment 5 Stefan Lucke 2009-04-18 22:12:18 UTC
(In reply to comment #4)
> Created an attachment (id=185346) [edit]
> diff for ebuild 1.9.0 to honor the -X USE flag
> 

Thanks Lucian,
build now works fine with your patches.
Comment 6 damage 2009-07-10 09:03:26 UTC
Hi,
could you please add this patch as soon as possible to the trunk and could you please also stabilize mjpegtools?

Because someone closed #217427 (the problem is known there!!!) which results in a currently stable(!) broken mjpegtools.

greez and tia
Damage
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2009-07-22 23:40:31 UTC
Conditional patching is no good. I see it has X_LIBS available, it should include -lX11 by itself...
Comment 8 Stefan Richter 2009-08-19 06:46:04 UTC
I saw this bug also during a new installation, with a world file copied from another box:  mjpegtools-1.9.0 failed to build as described by the reporter because it was emerged before X was emerged, even though the default -X use flag was specified.  mjpegtools-1.8.0-r2 built fine.
Comment 9 Stefan Richter 2009-08-19 06:49:29 UTC
Created attachment 201675 [details]
build.log of failed build
Comment 10 Konstantin Münning 2009-11-11 13:36:01 UTC
(In reply to comment #8)

Same here - emerging of mjpegtools-1.9.0 (upgrading from mjpegtools-1.8.0-r1) fails due to missing libX11. Package seems to not fully honor -X use flag.   mjpegtools-1.8.0-r2 emerges fine.
Comment 11 mark 2010-03-01 08:40:42 UTC
Same here, also noted on new 1.9.0-r1 version. Culprit is an additional -lX11 in lavtools/Makefile.in. Removing that and rebuilding allows the installation to continue. My steps:

* (emerge failed)
* (go to /usr/portage/media-video/mjpegtools)
* ebuild mjpegtools-1.9.0-r1.ebuild clean
* ebuild mjpegtools-1.9.0-r1.ebuild unpack
* vi /var/tmp/portage/media-video/mjpegtools-1.9.0-r1/work/mjpegtools-1.9.0/lavtools/Makefile.in
* (remove the -lX11 around line 43 and save)
* ebuild mjpegtools-1.9.0-r1.ebuild compile
* ebuild mjpegtools-1.9.0-r1.ebuild install
* ebuild mjpegtools-1.9.0-r1.ebuild postinst
* ebuild mjpegtools-1.9.0-r1.ebuild qmerge

There's probably a quicker way...

This seems to be a simple change - let's please get this in so us headless folks can update the package without this hassle every release.
Comment 12 Konstantin Münning 2011-01-31 16:37:05 UTC
Still not fixed in mjpegtools-1.9.0-r1.
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2011-04-01 09:48:36 UTC
Has been failing since 2009, no response from maintainers -> USE="X" removed and forced --with-x
Comment 14 Stefan Richter 2011-04-01 12:38:22 UTC
The solution from comment 11 seems very much preferable to the one from comment 13.  The latter loses the ability to install mjpegtools on headless systems.  I.e. the regression relative to 1.8 is fixed by the former but not fixed by the latter method.
Comment 15 Samuli Suominen (RETIRED) gentoo-dev 2011-04-01 12:45:28 UTC
It has never been possible, it has always been broken so converting this to low priority enchancement proposal then.
I wouldn't expect anything to happen here anytime soon though, the existing 2 years should be indicator for that.
Comment 16 Christophe LEFEBVRE 2011-04-02 20:08:48 UTC
*** This bug has been confirmed by popular vote. ***
Comment 17 Daniel Pielmeier gentoo-dev 2011-05-12 18:42:59 UTC
This should be fixed in mjpegtools-2.0.0_rc1 please reopen if there are still issues.