Skip to contentSkip to conversation

fix compilation

PATCH In review Akio Takebe 3 participants 5 messages Jun 2, 2008 – Jan 26, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix compilation

Hi,

I got the following compilation error.
This patch fix the error, I think it is needed for xen-testing tree.

/root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c: In function 'get_src_version':
/root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c:384: error:
'PATH_MAX' undeclared (first use in this function) /root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c:384: error:
(Each undeclared identifier is reported only once /root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c:384: error:
for each function it appears in.) /root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c:384:
warning: unused variable 'filelist'
make[7]: *** [scripts/mod/sumversion.o] Error 1
make[6]: *** [scripts/mod] Error 2
make[5]: *** [scripts] Error 2
make[4]: *** [modules] Error 2
make[3]: *** [modules] Error 2
make[3]: Leaving directory `/root/unstable/xen-unstable.hg/build-linux-2. 6.18-xen_x86_32'
make[2]: *** [build] Error 1
make[2]: Leaving directory `/root/unstable/xen-unstable.hg' make[1]: *** [linux-2.6-xen-install] Error 2
make[1]: Leaving directory `/root/unstable/xen-unstable.hg'
make: *** [install-kernels] Error 1

Best Regards,

Akio Takebe

---

scripts/mod/sumversion.c +1 -0
diff -r 557a4a0a5eac scripts/mod/sumversion.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <string.h>
 #include "modpost.h"
+#include <linux/limits.h>
 
 /*
  * Stolen form Cryptographic API.
#1 lore raw

I don't think we've ever modified that source file, and it builds okay usually.

-- Keir

Quoted 52 lines · Akio Takebe

Hi,

I got the following compilation error.
This patch fix the error, I think it is needed for xen-testing tree.

/root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c: In function 'get_src_version':
/root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c:384: error:
'PATH_MAX' undeclared (first use in this function) /root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c:384: error:
(Each undeclared identifier is reported only once /root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c:384: error:
for each function it appears in.) /root/unstable/linux-2.6.18-xen.hg/scripts/mod/sumversion.c:384:
warning: unused variable 'filelist'
make[7]: *** [scripts/mod/sumversion.o] Error 1
make[6]: *** [scripts/mod] Error 2
make[5]: *** [scripts] Error 2
make[4]: *** [modules] Error 2
make[3]: *** [modules] Error 2
make[3]: Leaving directory `/root/unstable/xen-unstable.hg/build-linux-2. 6.18-xen_x86_32'
make[2]: *** [build] Error 1
make[2]: Leaving directory `/root/unstable/xen-unstable.hg' make[1]: *** [linux-2.6-xen-install] Error 2
make[1]: Leaving directory `/root/unstable/xen-unstable.hg'
make: *** [install-kernels] Error 1

Best Regards,

Akio Takebe

---
diff -r 557a4a0a5eac scripts/mod/sumversion.c

scripts/mod/sumversion.c Mon Jun 02 19:47:43 2008 +0900 renamed from scripts/mod/sumversion.c Fri May 30 19:08:50 2008 +0100 +1 -0
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <string.h>
 #include "modpost.h"
+#include <linux/limits.h>
 
 /*
  * Stolen form Cryptographic API.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

Hi, Keir

Quoted 2 lines

I don't think we've ever modified that source file, and it builds okay usually.

My environment is Fedora9. I suspect my environment causes the error. I checked the latest linux tree, and I found the following patch.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fc31c7716355a226b8ed4e16f4581e5c8fa53570;hp=d1ab423502e787e264b4797a5fa200d804c4fd63

We probably need to backport it.
I made a patch based on the above patch.

scripts/mod/sumversion.c +1 -0
diff -r 557a4a0a5eac scripts/mod/sumversion.c
@@ -7,6 +7,7 @@
 #include <ctype.h>
 #include <errno.h>
 #include <string.h>
+#include <limits.h>
 #include "modpost.h"
 
 /*
#3 lore raw

Okay, the looks fine.

K.

Quoted 27 lines · Akio Takebe

Hi, Keir

Quoted 2 lines

I don't think we've ever modified that source file, and it builds okay usually.

My environment is Fedora9. I suspect my environment causes the error. I checked the latest linux tree, and I found the following patch.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;
h=fc31c7716355a226b8ed4e16f4581e5c8fa53570;hp=d1ab423502e787e264b4797a5fa200d8 04c4fd63

We probably need to backport it.
I made a patch based on the above patch.

diff -r 557a4a0a5eac scripts/mod/sumversion.c

scripts/mod/sumversion.c Tue Jun 03 01:09:18 2008 +0900 renamed from scripts/mod/sumversion.c Fri May 30 19:08:50 2008 +0100 +1 -0
@@ -7,6 +7,7 @@
 #include <ctype.h>
 #include <errno.h>
 #include <string.h>
+#include <limits.h>
 #include "modpost.h"
 
 /*
#4 lore raw

Hi Keir,

Would you mind applying the patch below to xen-3.1-testing? I realize that it is probably unmaintained, but there are still projects out there (isolated-exec for example) that are doing alpha testing based on Xen 3.1.

I am compiling on Ubuntu 8.10, the gcc compiler on it seems to complain about things a lot, I guess.

Cheers,
Todd

Quoted 33 lines · Keir Fraser

Okay, the looks fine.

K.

Quoted 25 lines · Akio Takebe

Hi, Keir

Quoted 2 lines

I don't think we've ever modified that source file, and it builds okay usually.

My environment is Fedora9. I suspect my environment causes the error. I checked the latest linux tree, and I found the following patch.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;
h=fc31c7716355a226b8ed4e16f4581e5c8fa53570;hp=d1ab423502e787e264b4797a5fa200d8 04c4fd63

We probably need to backport it.
I made a patch based on the above patch.

diff -r 557a4a0a5eac scripts/mod/sumversion.c

scripts/mod/sumversion.c Tue Jun 03 01:09:18 2008 +0900 renamed from scripts/mod/sumversion.c Fri May 30 19:08:50 2008 +0100 +1 -0
@@ -7,6 +7,7 @@
 #include <ctype.h>
 #include <errno.h>
 #include <string.h>
+#include <limits.h>
 #include "modpost.h"
 
Quoted 9 lines

scripts/mod/sumversion.c Tue Jun 03 01:09:18 2008 +0900 line 13

Quoted 2 lines
scripts/mod/sumversion.c Tue Jun 03 01:09:18 2008 +0900 renamed from scripts/mod/sumversion.c Fri May 30 19:08:50 2008 +0100 +0 -0
 /*

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

--
Todd Deshane
http://todddeshane.net
http://runningxen.com