Summary: | =media-libs/libvpx-1.3.0 with /bin/sh -> dash: configure: 408: local: -m32: bad variable name | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c> |
Component: | [OLD] Library | Assignee: | Mike Gilbert <floppym> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alex_y_xu, chromium, media-video, multilib+disabled, slyfox |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://code.google.com/p/webm/issues/detail?id=711 | ||
See Also: | https://launchpad.net/bugs/139097 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
config.log
libvpx-1.3.0-dash.patch |
Description
Lars Wendler (Polynomial-C) (RETIRED)
2014-01-15 08:10:36 UTC
To reproduce this problem you need to have /bin/sh pointing to dash. Got the same here:
> Creating makefiles for x86-linux-gcc libs
> + write_common_target_config_mk libs-x86-linux-gcc.mk vpx_config.h
> + local CC=x86_64-pc-linux-gnu-gcc -m32
> /tmp/portage/media-libs/libvpx-1.3.0/work/libvpx-v1.3.0/configure: 408: local: -m32: bad variable name
Some debugging revealed divverence in variable expansion:
The fix looks trivial:
diff --git a/build/make/configure.sh b/build/make/configure.sh
index 8dcb9bb..a38f712 100755
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -405,8 +405,8 @@ true
}
write_common_target_config_mk() {
- local CC=${CC}
- local CXX=${CXX}
+ local CC="${CC}"
+ local CXX="${CXX}"
enabled ccache && CC="ccache ${CC}"
enabled ccache && CXX="ccache ${CXX}"
print_webm_license $1 "##" ""
Created attachment 370428 [details, diff]
libvpx-1.3.0-dash.patch
Adds quoting around 'CC' / 'CXX' to pass on dash, but really looks likre dash deficiency.
(In reply to Sergei Trofimovich from comment #3) > Created attachment 370428 [details, diff] [details, diff] > libvpx-1.3.0-dash.patch > > Adds quoting around 'CC' / 'CXX' to pass on dash, but really looks likre > dash deficiency. does the declaration to 'local' change the nature of the variable assignment really this way that quoting is required? $ FOO="foo bar" $ BAR=${FOO} $ echo ${BAR} foo bar so if we were inside a function() and i'd just want to declare FOO and BAR as 'local', I'd have to also start using quoting? (In reply to Samuli Suominen from comment #4) > does the declaration to 'local' change the nature of the variable assignment > really this way that quoting is required? > In dash, yes, this appears to be the case. In bash, no, local FOO=${BAR} is still treated as a variable assignment and no quoting is necessary. All cases are easy to test: > [sf] ~:dash -c 'a="gcc -m32"; foo() { local z=${a}; echo $z; }; foo' > dash: 1: local: -m32: bad variable name > [sf] ~:bash -c 'a="gcc -m32"; foo() { local z=${a}; echo $z; }; foo' > gcc -m32 > [sf] ~:dash -c 'a="gcc -m32"; foo() { local z="${a}"; echo $z; }; foo' > gcc -m32 But this thing shows horrible inconsistency: > [sf] ~:dash -c 'a="gcc -m32"; z=${a}; echo $z;' > gcc -m32 + 21 Feb 2014; Mike Gilbert <floppym@gentoo.org> +files/libvpx-1.3.0-dash.patch, + libvpx-1.3.0.ebuild: + Fix compatibility with dash, bug 498136. Patch sent upstream via the bug tracker. (In reply to Mike Gilbert from comment #8) > Patch sent upstream via the bug tracker. If possible please follow <http://www.webmproject.org/code/contribute/submitting-patches/> . The reality is that otherwise the chance of that patch making it upstream is close to zero. (In reply to Paweł Hajdan, Jr. from comment #9) That process is way too cumbersome for a trivial build system fix, especially when I have no intention of making any future contributions to the project. Sorry, was having a moment of frustration. I'll try to upstream this properly. It's been fixed upstream. |