Building BusyBox (1.19.3) with Cygwin ?
Denys Vlasenko
vda.linux at googlemail.com
Sun Feb 5 13:50:35 UTC 2012
On Saturday 04 February 2012 06:02, Tom Hartnett wrote:
> * I am new to BusyBox *
>
> I apologize if this is not an appropriate avenue for this kind of
> (hopefully) basic problem.
>
> I recently got interested in BusyBox. I tried using a pre-built (for
> Windows32) executable.. and liked what I saw. So I tried building
> BusyBox from the source.
>
> But first, here’s the “lay of the land.”
>
> I’m running Windows 7 64-bit Professional.
>
> My (very new) Cygwin environment is:
> - cygwin1.dll 1.7.9
> - gcc 3.4.4
> - binutils 2.22.51
> - make 3.82
>
> So I tried “make defconfig,” and here’s what I get:
>
> HOSTCC scripts/basic/fixdep
> scripts/basic/fixdep.c: In function `parse_config_file':
> scripts/basic/fixdep.c:236: warning: array subscript has type `char'
> scripts/basic/fixdep.c:253: warning: array subscript has type `char'
> scripts/basic/fixdep.c:261: warning: array subscript has type `char'
> scripts/basic/fixdep.c: In function `parse_dep_file':
> scripts/basic/fixdep.c:337: warning: array subscript has type `char'
> /bin/sh: line 1: 5680 Segmentation fault (core dumped)
> scripts/basic/fixdep scripts/basic/.fixdep.d scripts/basic/fixdep 'gcc
> -Wp,-MD,scripts/basic/.fixdep.d -Wall -Wstrict-prototypes -O2
> -fomit-frame-pointer -o scripts/basic/fixdep
> scripts/basic/fixdep.c ' > scripts/basic/.fixdep.tmp
> scripts/Makefile.host:104: recipe for target `scripts/basic/fixdep' failed
> make[1]: *** [scripts/basic/fixdep] Error 139
> Makefile:356: recipe for target `scripts_basic' failed
> make: *** [scripts_basic] Error 2
>
> Any thoughts/pointers appreciated.
Try this patch, and let me know whether it helps.
--
vda
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 165a8c3..6f06751 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -226,10 +226,10 @@ void use_config(char *m, int slen)
void parse_config_file(char *map, size_t len)
{
/* modified for bbox */
- char *end_3 = map + len - 3; /* 3 == length of "IF_" */
- char *end_7 = map + len - 7;
- char *p = map;
- char *q;
+ unsigned char *end_3 = (unsigned char *)map + len - 3; /* 3 == length of "IF_" */
+ unsigned char *end_7 = (unsigned char *)map + len - 7;
+ unsigned char *p = (unsigned char *)map;
+ unsigned char *q;
int off;
for (; p <= end_3; p++) {
@@ -263,7 +263,7 @@ void parse_config_file(char *map, size_t len)
break;
}
if (q != p) {
- use_config(p, q-p);
+ use_config((char*)p, q - p);
}
}
}
@@ -335,7 +335,7 @@ void parse_dep_file(void *map, size_t len)
p = m;
while (p < end && *p != ' ') p++;
if (p == end) {
- do p--; while (!isalnum(*p));
+ do p--; while (!isalnum((unsigned char)*p));
p++;
}
memcpy(s, m, p-m); s[p-m] = 0;
More information about the busybox
mailing list