Skip to contentSkip to conversation

vim-7.2: remove quotes from CC in configure.in

PATCH Superseded Thilo Fromm 2 participants 4 messages Sep 29, 2010 – Oct 1, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vim-7.2: remove quotes from CC in configure.in

upstream: OE-only
configure.in features quotes around some calls to $CC (i.e. it calls
"$CC"). CC is, however, not always just the compiler name. In OpenEmbedded
CC looks more like "arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb".

configure executes tests in a form like res="$CC" --some-arg
The quotes make the shell try to execute the whole contents of the CC variable - compiler and options - as _one single_ binary, which will fail.

However, these errors remain unnoticed during the configure run:

...
configure: line 3707: arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb: command not found
...
checking for setjmp.h... yes
checking for GCC 3 or later... /SCRATCH/maniac/oe-merge-test/OE/tmp.6/work/armv5te-angstrom-linux-gnueabi/vim-7.2-r7.1/vim72/src/configure: line 11329: test: : integer expression expected no
checking whether we need -D_FORTIFY_SOURCE=1... /SCRATCH/maniac/oe-merge-test/OE/tmp.6/work/armv5te-angstrom-linux-gnueabi/vim-7.2-r7.1/vim72/src/configure: line 11339: test: : integer expression expected no
...

But finally:

...
configure: creating ./config.status
config.status: creating auto/config.mk
config.status: creating auto/config.h

So the configure step had errors, but didn't report any in the return code.

This patch removes the quotes around the CC variable in configure.in, which unbreaks the configure step.

---
 .../vim/files/configure.in_remove_CC_quotes.patch  |   15 +++++++++++++++
 recipes/vim/vim.inc                                |    2 +-
 recipes/vim/vim_7.2.bb                             |    2 ++
 3 files changed, 18 insertions(+), 1 deletions(-)
 create mode 100644 recipes/vim/files/configure.in_remove_CC_quotes.patch
recipes/vim/files/configure.in_remove_CC_quotes.patch new file +15 -0
new file mode 100644
index 0000000..db9fb07
@@ -0,0 +1,15 @@
+--- vim72-orig/src/configure.in	2010-09-29 19:13:33.000000000 +0200
++++ vim72/src/configure.in	2010-09-29 19:17:07.000000000 +0200
+@@ -35,10 +35,10 @@
+ fi
+ if test "$GCC" = yes; then
+   dnl method that should work for nearly all versions
+-  gccversion=`"$CC" -dumpversion`
++  gccversion=`$CC -dumpversion`
+   if test "x$gccversion" = "x"; then
+     dnl old method; fall-back for when -dumpversion doesn't work
+-    gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'`
++    gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'`
+   fi
+   dnl version 4.0.1 was reported to cause trouble on Macintosh by Marcin Dalecki
+   if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
recipes/vim/vim.inc +1 -1
index aa93527..1e71d52 100644
@@ -5,7 +5,7 @@ DEPENDS = "ncurses"
 RSUGGESTS_${PN} = "diffutils"
 LICENSE = "vim"
 
-INC_PR = "r7"
+INC_PR = "r8"
 
 SRC_URI = "ftp://ftp.vim.org/pub/vim/unix/vim-${PV}.tar.bz2;name=vim${PV}tarbz2 \
            ftp://ftp.vim.org/pub/vim/extra/vim-${PV}-extra.tar.gz;name=vim${PV}extratargz \
recipes/vim/vim_7.2.bb +2 -0
index d79f787..eafbeef 100644
@@ -15,11 +15,13 @@ PR = "${INC_PR}.1"
 
 # 001-411.diff contains 411 patches fetched from upstream
 SRC_URI += "file://001-411.diff;apply=no"
+SRC_URI += "file://configure.in_remove_CC_quotes.patch;apply=no"
 
 # we need to apply patches in other dir then ${S}
 do_applypatch() {
 	cd ${WORKDIR}/vim${VIMVER}
 	patch -p1 <${WORKDIR}/001-411.diff
+	patch -p1 <${WORKDIR}/configure.in_remove_CC_quotes.patch
 }
 
 addtask applypatch after do_unpack before do_patch
Signature · 1 line
1.7.0.4
#1 lore raw

Am Mittwoch, den 29.09.2010, 19:59 +0200 schrieb Thilo Fromm:

Quoted 1 line

upstream: OE-only

Please remove this again.

Quoted 22 lines

configure.in features quotes around some calls to $CC (i.e. it calls
"$CC"). CC is, however, not always just the compiler name. In OpenEmbedded
CC looks more like "arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb".

configure executes tests in a form like res="$CC" --some-arg
The quotes make the shell try to execute the whole contents of the CC variable - compiler and options - as _one single_ binary, which will fail.

However, these errors remain unnoticed during the configure run:

...
configure: line 3707: arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb: command not found
...
checking for setjmp.h... yes
checking for GCC 3 or later... /SCRATCH/maniac/oe-merge-test/OE/tmp.6/work/armv5te-angstrom-linux-gnueabi/vim-7.2-r7.1/vim72/src/configure: line 11329: test: : integer expression expected no
checking whether we need -D_FORTIFY_SOURCE=1... /SCRATCH/maniac/oe-merge-test/OE/tmp.6/work/armv5te-angstrom-linux-gnueabi/vim-7.2-r7.1/vim72/src/configure: line 11339: test: : integer expression expected no
...

But finally:

Quoted 8 lines

...
configure: creating ./config.status
config.status: creating auto/config.mk
config.status: creating auto/config.h

So the configure step had errors, but didn't report any in the return code.

This patch removes the quotes around the CC variable in configure.in, which unbreaks the configure step.

I have the same questions as before. Do you know if something similar is needed upstream? I think it is not OE only since other frameworks have similar values for CC.

recipes/vim/files/configure.in_remove_CC_quotes.patch

Quoted 13 lines
---
 .../vim/files/configure.in_remove_CC_quotes.patch  |   15 +++++++++++++++
 recipes/vim/vim.inc                                |    2 +-
 recipes/vim/vim_7.2.bb                             |    2 ++
 3 files changed, 18 insertions(+), 1 deletions(-)
 create mode 100644 recipes/vim/files/configure.in_remove_CC_quotes.patch
recipes/vim/files/configure.in_remove_CC_quotes.patch new file +0 -0
new file mode 100644
index 0000000..db9fb07

Please add the appropriate patch header.

Quoted 37 lines
recipes/vim/files/configure.in_remove_CC_quotes.patch new file +15 -0
@@ -0,0 +1,15 @@
+--- vim72-orig/src/configure.in	2010-09-29 19:13:33.000000000 +0200
++++ vim72/src/configure.in	2010-09-29 19:17:07.000000000 +0200
+@@ -35,10 +35,10 @@
+ fi
+ if test "$GCC" = yes; then
+   dnl method that should work for nearly all versions
+-  gccversion=`"$CC" -dumpversion`
++  gccversion=`$CC -dumpversion`
+   if test "x$gccversion" = "x"; then
+     dnl old method; fall-back for when -dumpversion doesn't work
+-    gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'`
++    gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'`
+   fi
+   dnl version 4.0.1 was reported to cause trouble on Macintosh by Marcin Dalecki
+   if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
recipes/vim/vim.inc +1 -1
index aa93527..1e71d52 100644
@@ -5,7 +5,7 @@ DEPENDS = "ncurses"
 RSUGGESTS_${PN} = "diffutils"
 LICENSE = "vim"
 
-INC_PR = "r7"
+INC_PR = "r8"
 
 SRC_URI = "ftp://ftp.vim.org/pub/vim/unix/vim-${PV}.tar.bz2;name=vim${PV}tarbz2 \
            ftp://ftp.vim.org/pub/vim/extra/vim-${PV}-extra.tar.gz;name=vim${PV}extratargz \
recipes/vim/vim_7.2.bb +0 -0
index d79f787..eafbeef 100644
@@ -15,11 +15,13 @@ PR = "${INC_PR}.1"
 
 # 001-411.diff contains 411 patches fetched from upstream
 SRC_URI += "file://001-411.diff;apply=no"

recipes/vim/vim_7.2.bb PR = "${INC_PR}.1" · line 27

Quoted 10 lines
recipes/vim/vim_7.2.bb +2 -0
+SRC_URI += "file://configure.in_remove_CC_quotes.patch;apply=no"
 
 # we need to apply patches in other dir then ${S}
 do_applypatch() {
 	cd ${WORKDIR}/vim${VIMVER}
 	patch -p1 <${WORKDIR}/001-411.diff
+	patch -p1 <${WORKDIR}/configure.in_remove_CC_quotes.patch
 }
 
 addtask applypatch after do_unpack before do_patch

Besides that I build tested your patch and it worked for angstrom-2008.1, minimal-{eglibc,libc,uclibc} and MACHINE = "beagleboard".

Thanks,

Paul

#2 lore raw

Hello Paul,

Quoted 3 lines
Quoted 1 line

upstream: OE-only

Please remove this again.

I will. Same thing as with the other patches: I learned the right place for this tag after this patch went out.

Quoted 4 lines
Quoted 4 lines

configure.in features quotes around some calls to $CC (i.e. it calls
"$CC"). CC is, however, not always just the compiler name. In OpenEmbedded
CC looks more like "arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb".

[...]

Quoted 11 lines
Quoted 7 lines

configure: creating ./config.status
config.status: creating auto/config.mk
config.status: creating auto/config.h

So the configure step had errors, but didn't report any in the return code.

This patch removes the quotes around the CC variable in configure.in, which unbreaks the configure step.

I have the same questions as before. Do you know if something similar is needed upstream? I think it is not OE only since other frameworks have similar values for CC.

Hmmm, do you think? I found this a way too tiny issue to report back upstream. But allright, I'll report it to the Vim developer's mailing list tomorrow, and refer to the e-mail thread in the upstream tag.

Quoted 7 lines

recipes/vim/files/configure.in_remove_CC_quotes.patch

Quoted 5 lines
recipes/vim/files/configure.in_remove_CC_quotes.patch new file +0 -0
new file mode 100644
index 0000000..db9fb07

Please add the appropriate patch header.

I'm getting the idea now. Don't give up yet :)

Quoted 6 lines
Quoted 2 lines

addtask applypatch after do_unpack before do_patch

Besides that I build tested your patch and it worked for angstrom-2008.1, minimal-{eglibc,libc,uclibc} and MACHINE = "beagleboard".

It worked? Well, then your default minimal build includes X libraries. Target vim-7.2 fails in a clean build without X libraries, because the recipe is still broken. Another patch fixes this, it's already in the queue. Anyway, thanks for testing!

Regards,
Thilo

Signature · 8 lines
Dipl.-Ing (FH) Thilo Fromm, MSc., Embedded Systems Developer
DResearch Digital Media Systems GmbH
Otto-Schmirgal-Str. 3, D-10319 Berlin, Germany
Tel: +49 (30) 515 932 228   mailto:[email protected]
Fax: +49 (30) 515 932 77    http://www.dresearch.de
Amtsgericht: Berlin Charlottenburg, HRB:54412
Ust.-IDNr. DE169013825; WEEE Reg.-Nr. DE 85995642
Geschäftsführer: Dr. M. Weber, W. Mögle
#3 lore raw

PATCH v2 1/1 vim-7.2: remove quotes from CC in configure.in

In reply to Paul Menzel

configure.in features quotes around some calls to $CC (i.e. it calls
"$CC"). CC is, however, not always just the compiler name. In OpenEmbedded
CC looks more like "arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb".

configure executes tests in a form like
res="$CC" --some-arg
The shell tries to run the whole contents of the CC variable - not just the first string
- as _one_ command, which will fail.

However, these errors remain unnoticed during the configure run:

...
configure: line 3707: arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb: command not found
...
checking for setjmp.h... yes
checking for GCC 3 or later... /SCRATCH/maniac/oe-merge-test/OE/tmp.6/work/armv5te-angstrom-linux-gnueabi/vim-7.2-r7.1/vim72/src/configure: line 11329: test: : integer expression expected no
checking whether we need -D_FORTIFY_SOURCE=1... /SCRATCH/maniac/oe-merge-test/OE/tmp.6/work/armv5te-angstrom-linux-gnueabi/vim-7.2-r7.1/vim72/src/configure: line 11339: test: : integer expression expected no
...

But finally:

...
configure: creating ./config.status
config.status: creating auto/config.mk
config.status: creating auto/config.h

So the configure step had errors, but didn't report any.

This patch removes the quotes around the CC variable in configure.in.

---
 .../vim/files/configure.in_remove_CC_quotes.patch  |   17 +++++++++++++++++
 recipes/vim/vim.inc                                |    2 +-
 recipes/vim/vim_7.2.bb                             |    2 ++
 3 files changed, 20 insertions(+), 1 deletions(-)
 create mode 100644 recipes/vim/files/configure.in_remove_CC_quotes.patch
recipes/vim/files/configure.in_remove_CC_quotes.patch new file +17 -0
new file mode 100644
index 0000000..c8cfe8e
@@ -0,0 +1,17 @@
+upstream: http://groups.google.com/group/vim_dev/browse_thread/thread/5685c3b859e3c793# 
+status: reported upstream
+--- vim72-orig/src/configure.in	2010-09-29 19:13:33.000000000 +0200
++++ vim72/src/configure.in	2010-09-29 19:17:07.000000000 +0200
+@@ -35,10 +35,10 @@
+ fi
+ if test "$GCC" = yes; then
+   dnl method that should work for nearly all versions
+-  gccversion=`"$CC" -dumpversion`
++  gccversion=`$CC -dumpversion`
+   if test "x$gccversion" = "x"; then
+     dnl old method; fall-back for when -dumpversion doesn't work
+-    gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'`
++    gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'`
+   fi
+   dnl version 4.0.1 was reported to cause trouble on Macintosh by Marcin Dalecki
+   if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
recipes/vim/vim.inc +1 -1
index aa93527..1e71d52 100644
@@ -5,7 +5,7 @@ DEPENDS = "ncurses"
 RSUGGESTS_${PN} = "diffutils"
 LICENSE = "vim"
 
-INC_PR = "r7"
+INC_PR = "r8"
 
 SRC_URI = "ftp://ftp.vim.org/pub/vim/unix/vim-${PV}.tar.bz2;name=vim${PV}tarbz2 \
            ftp://ftp.vim.org/pub/vim/extra/vim-${PV}-extra.tar.gz;name=vim${PV}extratargz \
recipes/vim/vim_7.2.bb +2 -0
index d79f787..eafbeef 100644
@@ -15,11 +15,13 @@ PR = "${INC_PR}.1"
 
 # 001-411.diff contains 411 patches fetched from upstream
 SRC_URI += "file://001-411.diff;apply=no"
+SRC_URI += "file://configure.in_remove_CC_quotes.patch;apply=no"
 
 # we need to apply patches in other dir then ${S}
 do_applypatch() {
 	cd ${WORKDIR}/vim${VIMVER}
 	patch -p1 <${WORKDIR}/001-411.diff
+	patch -p1 <${WORKDIR}/configure.in_remove_CC_quotes.patch
 }
 
 addtask applypatch after do_unpack before do_patch
Signature · 1 line
1.7.0.4