apt 0.7.14: do_compile failed with gcc 4.7
cover apt 0.7.14: do_compile failed with gcc 4.7
* Tested on:
Ubuntu 10.10 (gcc 4.4.5)
FC 17 64 bit (gcc 4.7.0)
// Robert
The following changes since commit f8a054aca9962ebfd4c74fc1d34cd684de6b3568:
perl: Allow perl to cross build and native build in a directory named "t" (2012-06-05 23:02:20 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/apt
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/apt
Robert Yang (2):
apt-get 0.7.14: hangs at runtime
apt 0.7.14: do_compile failed with gcc 4.7
.../apt/apt-0.7.14/remove-redeclaration.patch | 32 ++++++++++++-------- meta/recipes-devtools/apt/apt-native_0.7.14.bb | 2 +- meta/recipes-devtools/apt/apt.inc | 1 + meta/recipes-devtools/apt/apt_0.7.14.bb | 6 +-- 4 files changed, 23 insertions(+), 18 deletions(-)
PATCH 1/2 apt-get 0.7.14: hangs at runtime
This patch had a little problem, it made a infinite loop:
for (K = CmdL.FileList + 1; *K != 0; J++)
But the value of "K" will nerver change, so the apt-get hangs, revert this patch first, and will fix the problem in another patch.
Note: Increment the PR from 11 to 12
Revert "apt: Fix a latent bug exposed by gcc 4.7"
This reverts commit 9d526462fe97564652771812ad1d363e9962b1e3.
[YOCTO #2488]
--- .../apt/apt-0.7.14/remove-redeclaration.patch | 57 -------------------- meta/recipes-devtools/apt/apt_0.7.14.bb | 6 +-- 2 files changed, 2 insertions(+), 61 deletions(-) delete mode 100644 meta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patch
meta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patch deleted +0 -57
@@ -1,57 +0,0 @@ -Fix build errors - -deb/deblistparser.cc: In member function 'virtual short unsigned int debListParser::VersionHash()': -deb/deblistparser.cc:212:13: error: redeclaration of 'char* I' -deb/deblistparser.cc:202:22: error: 'const char** I' previously declared here - -Upstream-Status: Backport -Signed-off-by: Khem Raj <[email protected]> -Index: apt-0.7.14/apt-pkg/deb/deblistparser.cc -=================================================================== ---- apt-0.7.14.orig/apt-pkg/deb/deblistparser.cc 2012-03-30 11:17:09.112456632 -0700 -+++ apt-0.7.14/apt-pkg/deb/deblistparser.cc 2012-03-30 11:25:40.484481643 -0700 -@@ -209,18 +209,18 @@ - /* Strip out any spaces from the text, this undoes dpkgs reformatting - of certain fields. dpkg also has the rather interesting notion of - reformatting depends operators < -> <= */ -- char *I = S; -+ char *J = S; - for (; Start != End; Start++) - { - if (isspace(*Start) == 0) -- *I++ = tolower(*Start); -+ *J++ = tolower(*Start); - if (*Start == '<' && Start[1] != '<' && Start[1] != '=') -- *I++ = '='; -+ *J++ = '='; - if (*Start == '>' && Start[1] != '>' && Start[1] != '=') -- *I++ = '='; -+ *J++ = '='; - } - -- Result = AddCRC16(Result,S,I - S); -+ Result = AddCRC16(Result,S,J - S); - } - - return Result; -Index: apt-0.7.14/cmdline/apt-get.cc -=================================================================== ---- apt-0.7.14.orig/cmdline/apt-get.cc 2012-03-30 11:28:56.048490824 -0700 -+++ apt-0.7.14/cmdline/apt-get.cc 2012-03-30 11:32:00.248499740 -0700 -@@ -1752,12 +1752,12 @@ - if ((*Cache)[I].Install() == false) - continue; - -- const char **J; -- for (J = CmdL.FileList + 1; *J != 0; J++) -- if (strcmp(*J,I.Name()) == 0) -+ const char **K; -+ for (K = CmdL.FileList + 1; *K != 0; J++) -+ if (strcmp(*K,I.Name()) == 0) - break; - -- if (*J == 0) { -+ if (*K == 0) { - List += string(I.Name()) + " "; - VersionsList += string(Cache[I].CandVersion) + "\n"; - }
meta/recipes-devtools/apt/apt_0.7.14.bb +2 -4
@@ -3,12 +3,10 @@ RDEPENDS_${PN} = "dpkg" LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" require apt.inc -PR = "r11" +PR = "r12" SRC_URI += "file://nodoc.patch \ - file://includes-fix.patch \ - file://remove-redeclaration.patch \ - " + file://includes-fix.patch " SRC_URI[md5sum] = "19efa18fb1ef20c58b9b44e94258b814" SRC_URI[sha256sum] = "8fc06effaf8a4e4333308eedcdc6840f1c8056f2e924210f151dfc076bcd4045"
Signature · 1 line
1.7.1
Re: [PATCH 1/2] apt-get 0.7.14: hangs at runtime
Quoted 4 lines · Robert Yang
This patch had a little problem, it made a infinite loop:
for (K = CmdL.FileList + 1; *K != 0; J++)
thats a typo. change J++ to K++ in above construct
Quoted 6 lines
But the value of "K" will nerver change, so the apt-get hangs, revert this patch first, and will fix the problem in another patch.
Note: Increment the PR from 11 to 12
Revert "apt: Fix a latent bug exposed by gcc 4.7"
I dont think you have to revert it.
Quoted 102 lines
This reverts commit
9d526462fe97564652771812ad1d363e9962b1e3.[YOCTO #2488]
Signed-off-by Robert Yang <[email protected]>---
.../apt/apt-0.7.14/remove-redeclaration.patch | 57 -------------------- meta/recipes-devtools/apt/apt_0.7.14.bb | 6 +--2 files changed, 2 insertions(+), 61 deletions(-)delete mode 100644
meta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patchmeta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patch deleted +0
-57@@ -1,57 +0,0 @@ -Fix build errors - -deb/deblistparser.cc: In member function 'virtual short unsigned int debListParser::VersionHash()': -deb/deblistparser.cc:212:13: error: redeclaration of 'char* I' -deb/deblistparser.cc:202:22: error: 'const char** I' previously declared here - -Upstream-Status: Backport -Signed-off-by: Khem Raj <[email protected]> -Index: apt-0.7.14/apt-pkg/deb/deblistparser.cc -=================================================================== ---- apt-0.7.14.orig/apt-pkg/deb/deblistparser.cc 2012-03-30 11:17:09.112456632 -0700 -+++ apt-0.7.14/apt-pkg/deb/deblistparser.cc 2012-03-30 11:25:40.484481643 -0700 -@@ -209,18 +209,18 @@ - /* Strip out any spaces from the text, this undoes dpkgs reformatting - of certain fields. dpkg also has the rather interesting notion of - reformatting depends operators < -> <= */ -- char *I = S; -+ char *J = S; - for (; Start != End; Start++) - { - if (isspace(*Start) == 0) -- *I++ = tolower(*Start); -+ *J++ = tolower(*Start); - if (*Start == '<' && Start[1] != '<' && Start[1] != '=') -- *I++ = '='; -+ *J++ = '='; - if (*Start == '>' && Start[1] != '>' && Start[1] != '=') -- *I++ = '='; -+ *J++ = '='; - } - -- Result = AddCRC16(Result,S,I - S); -+ Result = AddCRC16(Result,S,J - S); - } - - return Result; -Index: apt-0.7.14/cmdline/apt-get.cc -=================================================================== ---- apt-0.7.14.orig/cmdline/apt-get.cc 2012-03-30 11:28:56.048490824 -0700 -+++ apt-0.7.14/cmdline/apt-get.cc 2012-03-30 11:32:00.248499740 -0700 -@@ -1752,12 +1752,12 @@ - if ((*Cache)[I].Install() == false) - continue; - -- const char **J; -- for (J = CmdL.FileList + 1; *J != 0; J++) -- if (strcmp(*J,I.Name()) == 0) -+ const char **K; -+ for (K = CmdL.FileList + 1; *K != 0; J++) -+ if (strcmp(*K,I.Name()) == 0) - break; - -- if (*J == 0) { -+ if (*K == 0) { - List += string(I.Name()) + " "; - VersionsList += string(Cache[I].CandVersion) + "\n"; - }meta/recipes-devtools/apt/apt_0.7.14.bb +0
-0@@ -3,12 +3,10 @@ RDEPENDS_${PN} = "dpkg"LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" require apt.inc
meta/recipes-devtools/apt/apt_0.7.14.bb +1
-1-PR = "r11" +PR = "r12"SRC_URI += "file://nodoc.patch \
- file://includes-fix.patch \
- file://remove-redeclaration.patch \
- "
+ file://includes-fix.patch "SRC_URI[md5sum] = "
19efa18fb1ef20c58b9b44e94258b814"
SRC_URI[sha256sum] = "8fc06effaf8a4e4333308eedcdc6840f1c8056f2e924210f151dfc076bcd4045" --
1.7.1_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 1/2] apt-get 0.7.14: hangs at runtime
Quoted 8 lines · Khem Raj
Quoted 4 lines · Robert Yang
This patch had a little problem, it made a infinite loop:
for (K = CmdL.FileList + 1; *K != 0; J++)
thats a typo. change J++ to K++ in above construct
Quoted 9 lines
Quoted 6 lines
But the value of "K" will nerver change, so the apt-get hangs, revert this patch first, and will fix the problem in another patch.
Note: Increment the PR from 11 to 12
Revert "apt: Fix a latent bug exposed by gcc 4.7"
I dont think you have to revert it.
Hi Khem,
I reverted it was because I thought that modified the patch was not a good idea, thanks for your suggestion, I'll modify the patch directly for such a case next time (this one has been merged:-)).
// Robert
Quoted 107 lines
Quoted 98 lines
This reverts commit
9d526462fe97564652771812ad1d363e9962b1e3.[YOCTO #2488]
Signed-off-by Robert Yang<[email protected]>--- .../apt/apt-0.7.14/remove-redeclaration.patch | 57 -------------------- meta/recipes-devtools/apt/apt_0.7.14.bb | 6 +-- 2 files changed, 2 insertions(+), 61 deletions(-)delete mode 100644
meta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patchmeta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patch deleted +0
-57@@ -1,57 +0,0 @@ -Fix build errors - -deb/deblistparser.cc: In member function 'virtual short unsigned int debListParser::VersionHash()': -deb/deblistparser.cc:212:13: error: redeclaration of 'char* I' -deb/deblistparser.cc:202:22: error: 'const char** I' previously declared here - -Upstream-Status: Backport -Signed-off-by: Khem Raj<[email protected]> -Index: apt-0.7.14/apt-pkg/deb/deblistparser.cc -=================================================================== ---- apt-0.7.14.orig/apt-pkg/deb/deblistparser.cc 2012-03-30 11:17:09.112456632 -0700 -+++ apt-0.7.14/apt-pkg/deb/deblistparser.cc 2012-03-30 11:25:40.484481643 -0700 -@@ -209,18 +209,18 @@ - /* Strip out any spaces from the text, this undoes dpkgs reformatting - of certain fields. dpkg also has the rather interesting notion of - reformatting depends operators< -> <= */ -- char *I = S; -+ char *J = S; - for (; Start != End; Start++) - { - if (isspace(*Start) == 0) -- *I++ = tolower(*Start); -+ *J++ = tolower(*Start); - if (*Start == '<'&& Start[1] != '<'&& Start[1] != '=') -- *I++ = '='; -+ *J++ = '='; - if (*Start == '>'&& Start[1] != '>'&& Start[1] != '=') -- *I++ = '='; -+ *J++ = '='; - } - -- Result = AddCRC16(Result,S,I - S); -+ Result = AddCRC16(Result,S,J - S); - } - - return Result; -Index: apt-0.7.14/cmdline/apt-get.cc -=================================================================== ---- apt-0.7.14.orig/cmdline/apt-get.cc 2012-03-30 11:28:56.048490824 -0700 -+++ apt-0.7.14/cmdline/apt-get.cc 2012-03-30 11:32:00.248499740 -0700 -@@ -1752,12 +1752,12 @@ - if ((*Cache)[I].Install() == false) - continue; - -- const char **J; -- for (J = CmdL.FileList + 1; *J != 0; J++) -- if (strcmp(*J,I.Name()) == 0) -+ const char **K; -+ for (K = CmdL.FileList + 1; *K != 0; J++) -+ if (strcmp(*K,I.Name()) == 0) - break; - -- if (*J == 0) { -+ if (*K == 0) { - List += string(I.Name()) + " "; - VersionsList += string(Cache[I].CandVersion) + "\n"; - }meta/recipes-devtools/apt/apt_0.7.14.bb +2
-5@@ -3,12 +3,10 @@ RDEPENDS_${PN} = "dpkg" LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" require apt.inc -PR = "r11" +PR = "r12" SRC_URI += "file://nodoc.patch \ - file://includes-fix.patch \ - file://remove-redeclaration.patch \ - " + file://includes-fix.patch " SRC_URI[md5sum] = "19efa18fb1ef20c58b9b44e94258b814" SRC_URI[sha256sum] = "8fc06effaf8a4e4333308eedcdc6840f1c8056f2e924210f151dfc076bcd4045" --1.7.1
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
PATCH 2/2 apt 0.7.14: do_compile failed with gcc 4.7
In reply to Robert Yangapt do_compile failed with gcc 4.7:
deb/deblistparser.cc: In member function 'virtual short unsigned int debListParser::VersionHash()':
deb/deblistparser.cc:212:13: error: redeclaration of 'char* I' deb/deblistparser.cc:202:22: error: 'const char** I' previously declared here
Backport the patch from the upstream would fix the problem, both target and native apt need it.
[YOCTO #2488]
--- .../apt/apt-0.7.14/remove-redeclaration.patch | 63 ++++++++++++++++++++ meta/recipes-devtools/apt/apt-native_0.7.14.bb | 2 +- meta/recipes-devtools/apt/apt.inc | 1 + meta/recipes-devtools/apt/apt_0.7.14.bb | 2 +- 4 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patch
meta/recipes-devtools/apt/apt-0.7.14/remove-redeclaration.patch new file +63 -0
@@ -0,0 +1,63 @@ +Fix build errors on gcc 4.7: + +deb/deblistparser.cc: In member function 'virtual short unsigned int debListParser::VersionHash()': +deb/deblistparser.cc:212:13: error: redeclaration of 'char* I' +deb/deblistparser.cc:202:22: error: 'const char** I' previously declared here + +Upstream-Status: Backport +Signed-off-by: Robert Yang <[email protected]> +--- + apt-pkg/deb/deblistparser.cc | 10 +++++----- + cmdline/apt-get.cc | 8 ++++---- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc +--- a/apt-pkg/deb/deblistparser.cc ++++ b/apt-pkg/deb/deblistparser.cc +@@ -209,18 +209,18 @@ unsigned short debListParser::VersionHash() + /* Strip out any spaces from the text, this undoes dpkgs reformatting + of certain fields. dpkg also has the rather interesting notion of + reformatting depends operators < -> <= */ +- char *I = S; ++ char *J = S; + for (; Start != End; Start++) + { + if (isspace(*Start) == 0) +- *I++ = tolower(*Start); ++ *J++ = tolower(*Start); + if (*Start == '<' && Start[1] != '<' && Start[1] != '=') +- *I++ = '='; ++ *J++ = '='; + if (*Start == '>' && Start[1] != '>' && Start[1] != '=') +- *I++ = '='; ++ *J++ = '='; + } + +- Result = AddCRC16(Result,S,I - S); ++ Result = AddCRC16(Result,S,J - S); + } + + return Result; +diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc +--- a/cmdline/apt-get.cc ++++ b/cmdline/apt-get.cc +@@ -1752,12 +1752,12 @@ bool DoInstall(CommandLine &CmdL) + if ((*Cache)[I].Install() == false) + continue; + +- const char **J; +- for (J = CmdL.FileList + 1; *J != 0; J++) +- if (strcmp(*J,I.Name()) == 0) ++ const char **K; ++ for (K = CmdL.FileList + 1; *K != 0; K++) ++ if (strcmp(*K,I.Name()) == 0) + break; + +- if (*J == 0) { ++ if (*K == 0) { + List += string(I.Name()) + " "; + VersionsList += string(Cache[I].CandVersion) + "\n"; + } +-- +1.7.1 +
meta/recipes-devtools/apt/apt-native_0.7.14.bb +1 -1
@@ -1,6 +1,6 @@ require apt-native.inc -PR = "r7" +PR = "r8" SRC_URI += "file://nodoc.patch \ file://noconfigure.patch \
meta/recipes-devtools/apt/apt.inc +1 -0
@@ -7,6 +7,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/apt_${PV}.tar.gz \ file://use-host.patch \ file://localefixes.patch \ file://makerace.patch \ + file://remove-redeclaration.patch \ " inherit autotools gettext
meta/recipes-devtools/apt/apt_0.7.14.bb +1 -1
@@ -3,7 +3,7 @@ RDEPENDS_${PN} = "dpkg" LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" require apt.inc -PR = "r12" +PR = "r13" SRC_URI += "file://nodoc.patch \ file://includes-fix.patch "
Signature · 1 line
1.7.1
Flanagan, Elizabeth
AppliedQuoted 18 lines · Robert Yang
* Tested on:
Ubuntu 10.10 (gcc 4.4.5)
FC 17 64 bit (gcc 4.7.0)// Robert
The following changes since commit
f8a054aca9962ebfd4c74fc1d34cd684de6b3568:perl: Allow perl to cross build and native build in a directory named "t" (2012-06-05 23:02:20 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/apt
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/aptRobert Yang (2):
apt-get 0.7.14: hangs at runtime
apt 0.7.14:do_compilefailed with gcc 4.7
Quoted 7 lines
.../apt/apt-0.7.14/remove-redeclaration.patch | 32 ++++++++++++-------- meta/recipes-devtools/apt/apt-native_0.7.14.bb | 2 +- meta/recipes-devtools/apt/apt.inc | 1 + meta/recipes-devtools/apt/apt_0.7.14.bb | 6 +--
4 files changed, 23 insertions(+), 18 deletions(-)
Merged into OE-Core
Thanks
-b
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 3 lines
Elizabeth Flanagan Yocto Project Build and Release