Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 318353 - media-video/flvstreamer-2.1a make fails due to misplaced inverted comma, e. g. 'CFLAGS=-O3...' instead of CFLAGS='-O3...'
Summary: media-video/flvstreamer-2.1a make fails due to misplaced inverted comma, e. g...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-04 01:22 UTC by Sascha Wuestemann
Modified: 2010-05-06 11:11 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,4.67 KB, text/plain)
2010-05-04 22:37 UTC, Sascha Wuestemann
Details
emerge --info =media-video/flvstreamer-2.1a (emerge--info.media-video.flvstreamer-2.1a,4.28 KB, text/plain)
2010-05-04 22:38 UTC, Sascha Wuestemann
Details
environment (environment,36.44 KB, text/plain)
2010-05-04 22:39 UTC, Sascha Wuestemann
Details
make.conf (make.conf,1.29 KB, text/plain)
2010-05-04 22:41 UTC, Sascha Wuestemann
Details
removes extraneous MAKEFLAGS, ebuild cleanups (flvstreamer-2.1a.ebuild-MAKEFLAGS.patch,1.36 KB, patch)
2010-05-05 00:43 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Wuestemann 2010-05-04 01:22:43 UTC
I need to rebuild world but flvstreamer fails at:
>>> Compiling source in /var/tmp/portage/media-video/flvstreamer-2.1a/work/flvstreamer ...
make -j1 CC=x86_64-pc-linux-gnu-gcc CXX=x86_64-pc-linux-gnu-g++ 'CFLAGS=-O3 -march=core2 -pipe -fomit-frame-pointer' 'CXXFLAGS=-O3 -march=core2 -pipe -fomit-frame-pointer' LDFLAGS=-Wl,-O1 linux

As you can see, the inverted commas are misplaced and the line should be:
make -j1 CC=x86_64-pc-linux-gnu-gcc CXX=x86_64-pc-linux-gnu-g++ CFLAGS='-O3 -march=core2 -pipe -fomit-frame-pointer' CXXFLAGS='-O3 -march=core2 -pipe -fomit-frame-pointer' LDFLAGS=-Wl,-O1 linux

Reproducible: Always

Steps to Reproduce:
1.emerge -eva world
2.leads to emerge =media-video/flvstreamer-2.1a


Actual Results:  
make fails:
make: invalid option -- 'D'
make: invalid option -- 'F'
make: invalid option -- 'A'
make: invalid option -- 'G'
make: invalid option -- '='
Usage: make [options] [target] ...
Options:
  -b, -m                      Ignored for compatibility.
  -B, --always-make           Unconditionally make all targets.
  -C DIRECTORY, --directory=DIRECTORY
                              Change to DIRECTORY before doing anything.
  -d                          Print lots of debugging information.
  --debug[=FLAGS]             Print various types of debugging information.
  -e, --environment-overrides
                              Environment variables override makefiles.
  -f FILE, --file=FILE, --makefile=FILE
                              Read FILE as a makefile.
  -h, --help                  Print this message and exit.
  -i, --ignore-errors         Ignore errors from commands.
  -I DIRECTORY, --include-dir=DIRECTORY
                              Search DIRECTORY for included makefiles.
  -j [N], --jobs[=N]          Allow N jobs at once; infinite jobs with no arg.
  -k, --keep-going            Keep going when some targets can't be made.
  -l [N], --load-average[=N], --max-load[=N]
                              Don't start multiple jobs unless load is below N.
  -L, --check-symlink-times   Use the latest mtime between symlinks and target.
  -n, --just-print, --dry-run, --recon
                              Don't actually run any commands; just print them.
  -o FILE, --old-file=FILE, --assume-old=FILE
                              Consider FILE to be very old and don't remake it.
  -p, --print-data-base       Print make's internal database.
  -q, --question              Run no commands; exit status says if up to date.
  -r, --no-builtin-rules      Disable the built-in implicit rules.
  -R, --no-builtin-variables  Disable the built-in variable settings.
  -s, --silent, --quiet       Don't echo commands.
  -S, --no-keep-going, --stop
                              Turns off -k.
  -t, --touch                 Touch targets instead of remaking them.
  -v, --version               Print the version number of make and exit.
  -w, --print-directory       Print the current directory.
  --no-print-directory        Turn off -w, even if it was turned on implicitly.
  -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
                              Consider FILE to be infinitely new.
  --warn-undefined-variables  Warn when an undefined variable is referenced.

This program built for x86_64-pc-linux-gnu
Report bugs to <bug-make@gnu.org>
make: *** [linux] Error 2


Expected Results:  
The build  script should place the inverted commas correctly.

I suspect this an error for the maintainer to solve, not gnu.org.
Comment 1 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-05-04 02:13:29 UTC
Please post the full build.log as well as emerge --info
Comment 2 Joost Ruis 2010-05-04 10:39:08 UTC
Cannot reproduce it here on 2 different chroots/arches.

@reporter this is why you should ALWAYS post emerge --info (and maybe your make.conf)
Comment 3 Sascha Wuestemann 2010-05-04 22:36:22 UTC
# emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0/desktop, gcc-4.4.3, glibc-2.11.1-r0, 2.6.33-vs2.3.0.36.30.4-gentoo x86_64)
=================================================================
System uname: Linux-2.6.33-vs2.3.0.36.30.4-gentoo-x86_64-Intel-R-_Atom-TM-_CPU_330_@_1.60GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 04 May 2010 00:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p5
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.5-r1, 3.1.2-r2
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.1-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1
sys-devel/gcc:       4.3.4, 4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=core2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O3 -march=core2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ "
LANG="C"
LDFLAGS="-Wl,-O1"
LINGUAS="de en"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
Comment 4 Sascha Wuestemann 2010-05-04 22:37:11 UTC
Created attachment 230367 [details]
build.log
Comment 5 Sascha Wuestemann 2010-05-04 22:38:10 UTC
Created attachment 230369 [details]
emerge --info =media-video/flvstreamer-2.1a
Comment 6 Sascha Wuestemann 2010-05-04 22:39:02 UTC
Created attachment 230371 [details]
environment
Comment 7 Sascha Wuestemann 2010-05-04 22:41:13 UTC
Created attachment 230373 [details]
make.conf
Comment 8 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-05-05 00:43:18 UTC
Created attachment 230375 [details, diff]
removes extraneous MAKEFLAGS, ebuild cleanups

The problem has nothing to do with ``inverted commas'' (maybe you're speaking about apostrophes?). The problem is that that author of the package's Makefiles did not read:
info '(make.info.bz2)Options/Recursion'
which discusses the proper use of MAKEOPTS. $(MAKEOPTS) is never intended for passing to a call to $(MAKE). The variable that should be used instead for such purposes is $(MFLAGS). However, passing MFLAGS to $(MAKE) is pointless because make does getenv("MAKEOPTS") and processes the flags in there in addition to the flags it receives on the commandline (through argv).

The attached patch removes the misused MAKEOPTS through a sed expression. It also unquotes EAPI= (as the new style is for that var to be unquoted), and removes a pointless {,} expansion.
Comment 9 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-05-05 01:09:30 UTC
Reported upstream:
https://savannah.nongnu.org/support/?107355
Comment 10 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-05-05 02:28:17 UTC
Oh, to reproduce:
MAKEOPTS=-j1
is necessary somehow. GNU Make probably adds some interesting stuff to the $(MAKEFLAGS) variable when it's doing parallel jobs.
Comment 11 Sascha Wuestemann 2010-05-05 09:48:41 UTC
Thank you for helping me out of this problem. I didn't expect passing MAKEOPTS to the command line could make any trouble because it is part of the make.conf variables. I had already got the feeling that it is a lokal problem as nobody else has reported this problem but I had no idea where to look.
I'll explain why I used MAKEOPTS. The current make.conf is modified, I had MAKEOPTS="-j5" at make.conf when starting emerge -eva world and I decided to have this running for long and not stressing cpu time and load too much, so I simply added MAKEOPTS="-j1" to the emerge command keeping make.conf as it was. Since my trouble with compiling flvstreamer didn't went away after a couple of days and emerge --sync I decided to give a modified make.conf (this is the current make.conf which I uploaded) a try but it didn't help neither. My fault, I took emerge --resume without thinking.

So I give emerge -eva a new start, now. Thanks again.

Can you pass me a link describing how to test a patched ebuild? I'd like to help veryfying the patch.
Comment 12 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-05-05 19:27:07 UTC
(In reply to comment #11)
> Thank you for helping me out of this problem. I didn't expect passing MAKEOPTS
> to the command line could make any trouble because it is part of the make.conf

No, it is very good that you found this bug. The error is not your use of MAKEOPTS. The error is flvstreamer's misuse of a differently named Makefile variable MAKEFLAGS. I was just noting that _your_ MAKEOPTS setting is necessary for reproducing this bug (few Gentoo people would leave MAKEOPTS empty or have -j1, which is why they haven't found this bug).

> Can you pass me a link describing how to test a patched ebuild? I'd like to
> help veryfying the patch.

To test the patch, try following these instructions:

1. Enter the directory of flvstreamer in the portage tree:
$ cd $(portageq portdir)/media-video/flvstreamer

2. Get and apply the patch. (note that -O- tells wget to write the patch to stdout)
$ wget https://bugs.gentoo.org/attachment.cgi?id=230375 -O- | patch -p0

3. Regenerate the Manifest file:
$ ebuild flvstreamer-2.1.a.ebuild manifest

4. Set MAKEOPTS=-j1 and remerge flvstreamer. You can temporarily change MAKEOPTS without editing make.conf by the following command:
$ MAKEOPTS=-j1 emerge -v flvstreamer

(I wonder if I am bug-spamming :-/ )
Comment 13 Sascha Wuestemann 2010-05-05 20:55:48 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Thank you for helping me out of this problem. I didn't expect passing MAKEOPTS
> > to the command line could make any trouble because it is part of the make.conf
> 
> No, it is very good that you found this bug. The error is not your use of
> MAKEOPTS. The error is flvstreamer's misuse of a differently named Makefile
> variable MAKEFLAGS. I was just noting that _your_ MAKEOPTS setting is necessary
> for reproducing this bug (few Gentoo people would leave MAKEOPTS empty or have
> -j1, which is why they haven't found this bug).

Thank you for pointing this out and make me feel better! :-)

> 
> > Can you pass me a link describing how to test a patched ebuild? I'd like to
> > help veryfying the patch.
> 
> To test the patch, try following these instructions:
> 
> 1. Enter the directory of flvstreamer in the portage tree:
> $ cd $(portageq portdir)/media-video/flvstreamer
> 
> 2. Get and apply the patch. (note that -O- tells wget to write the patch to
> stdout)
> $ wget https://bugs.gentoo.org/attachment.cgi?id=230375 -O- | patch -p0
> 
> 3. Regenerate the Manifest file:
> $ ebuild flvstreamer-2.1.a.ebuild manifest
> 
> 4. Set MAKEOPTS=-j1 and remerge flvstreamer. You can temporarily change
> MAKEOPTS without editing make.conf by the following command:
> $ MAKEOPTS=-j1 emerge -v flvstreamer
> 
> (I wonder if I am bug-spamming :-/ )
> 

Did as you said, worked like a charm. I can verify the patch working. Don't know if all work on this case has been done already, so I pass closing it to you guys.
I am happy having helped to find a hidden bug.
Comment 14 Markos Chandras (RETIRED) gentoo-dev 2010-05-06 11:11:01 UTC
Fixed in CVS :)

I hope upstream will merge the patch as well

Thanks Nathan :)