From: Eric S. <ej...@sh...> - 2009-02-26 16:20:15
|
I've attempted to compile subject, ran into a few snags, and have a few solutions. vmxnet.c build failed with: make[3]: Entering directory `/usr/src/open-vm-tools-2009.02.18-148847/modules/linux/vmxnet' In file included from /lib/modules/2.4.36/build/include/asm/dma.h:14, from vmxnet.c:34: /lib/modules/2.4.36/build/include/linux/delay.h:62: error: parse error before "const" make[3]: *** [vmxnet.o] Error 1 I couldn't see what the problem with linux/delay.h exactly was, but it doesn't appear to be necessary. I tried removing #include <asm/dma.h> from vmxnet.c, and the only complaint from the compiler was the lack of the udelay function, which is defined in <asm/delay.h>. It appears that asm/dma.h was including linux/delay.h, which in turn included asm/delay.h, which contained the udelay definition. I replaced <asm/dma.h> with <asm/delay.h>, and vmxnet.c compiled clean. Of course whether it actually works or not is another question. The next error was with vmhgfs. Makefile.normal had specified hgfsEscapeLinux.o, while the program was really hgfsEscape.o (the "Linux" part had apparently been dropped along the line). I modified Makefile.normal, specifying hgfsEscape.o, and it compiled clean. Can someone verify if this is correct? With vmsock, I get this: make[4]: Entering directory `/usr/src/open-vm-tools-2009.02.18-148847p/modules/linux/vsock/driver-2.4.36' Compiling .././linux/af_vsock.c ../linux/af_vsock.c: In function `VSockVmciStreamConnect': ../linux/af_vsock.c:3466: warning: implicit declaration of function `DEFINE_WAIT' ../linux/af_vsock.c:3466: error: `wait' undeclared (first use in this function) ../linux/af_vsock.c:3466: error: (Each undeclared identifier is reported only once ../linux/af_vsock.c:3466: error: for each function it appears in.) ../linux/af_vsock.c:3542: warning: implicit declaration of function `prepare_to_wait' ../linux/af_vsock.c:3577: warning: implicit declaration of function `finish_wait' ../linux/af_vsock.c: In function `VSockVmciAccept': ../linux/af_vsock.c:3615: error: `wait' undeclared (first use in this function) ../linux/af_vsock.c: In function `VSockVmciStreamSendmsg': ../linux/af_vsock.c:4360: error: `wait' undeclared (first use in this function) ../linux/af_vsock.c: In function `VSockVmciStreamRecvmsg': ../linux/af_vsock.c:4714: error: `wait' undeclared (first use in this function) make[4]: *** [af_vsock.o] Error 1 make[4]: Leaving directory `/usr/src/open-vm-tools-2009.02.18-148847p/modules/linux/vsock/driver-2.4.36' Can someone explain what might be the problem here? I don't expect vmsock to be useful in the IPCop distro, but I'm wondering what the problem is, as it should build with this kernel. -- -Eric 'shubes' |
From: Dmitry T. <dt...@vm...> - 2009-02-26 22:22:26
|
Hi Eric, Thank you very much for your report. On Thursday 26 February 2009 08:17:47 Eric Shubert wrote: > I've attempted to compile subject, ran into a few snags, and have a few > solutions. > > vmxnet.c build failed with: > make[3]: Entering directory > `/usr/src/open-vm-tools-2009.02.18-148847/modules/linux/vmxnet' > In file included from /lib/modules/2.4.36/build/include/asm/dma.h:14, > from vmxnet.c:34: > /lib/modules/2.4.36/build/include/linux/delay.h:62: error: parse error > before "const" > make[3]: *** [vmxnet.o] Error 1 > > I couldn't see what the problem with linux/delay.h exactly was, but it > doesn't appear to be necessary. I tried removing > #include <asm/dma.h> > from vmxnet.c, and the only complaint from the compiler was the lack of > the udelay function, which is defined in <asm/delay.h>. It appears that > asm/dma.h was including linux/delay.h, which in turn included > asm/delay.h, which contained the udelay definition. I replaced > <asm/dma.h> with <asm/delay.h>, and vmxnet.c compiled clean. Of course > whether it actually works or not is another question. > This should indeed work. > The next error was with vmhgfs. Makefile.normal had specified > hgfsEscapeLinux.o, while the program was really hgfsEscape.o (the > "Linux" part had apparently been dropped along the line). I modified > Makefile.normal, specifying hgfsEscape.o, and it compiled clean. Can > someone verify if this is correct? > Yes, that is correct. There should already be hgfsEscape.o in the list of dependencies so you can just remove hgfsEscapeLinux.o > With vmsock, I get this: > make[4]: Entering directory > `/usr/src/open-vm-tools-2009.02.18-148847p/modules/linux/vsock/driver-2.4.3 >6' Compiling .././linux/af_vsock.c > ../linux/af_vsock.c: In function `VSockVmciStreamConnect': > ../linux/af_vsock.c:3466: warning: implicit declaration of function > `DEFINE_WAIT' > ../linux/af_vsock.c:3466: error: `wait' undeclared (first use in this > function) > ../linux/af_vsock.c:3466: error: (Each undeclared identifier is reported > only once > ../linux/af_vsock.c:3466: error: for each function it appears in.) > ../linux/af_vsock.c:3542: warning: implicit declaration of function > `prepare_to_wait' > ../linux/af_vsock.c:3577: warning: implicit declaration of function > `finish_wait' > ../linux/af_vsock.c: In function `VSockVmciAccept': > ../linux/af_vsock.c:3615: error: `wait' undeclared (first use in this > function) > ../linux/af_vsock.c: In function `VSockVmciStreamSendmsg': > ../linux/af_vsock.c:4360: error: `wait' undeclared (first use in this > function) > ../linux/af_vsock.c: In function `VSockVmciStreamRecvmsg': > ../linux/af_vsock.c:4714: error: `wait' undeclared (first use in this > function) > make[4]: *** [af_vsock.o] Error 1 > make[4]: Leaving directory > `/usr/src/open-vm-tools-2009.02.18-148847p/modules/linux/vsock/driver-2.4.3 >6' > > Can someone explain what might be the problem here? I don't expect > vmsock to be useful in the IPCop distro, but I'm wondering what the > problem is, as it should build with this kernel. Could you please try the patch below? You will need to apply it to all copies of compat_wait.h in the tree. Thanks! -- Dmitry --- compat_wait.h.orig +++ compat_wait.h @@ -179,10 +179,16 @@ do { \ /* * DEFINE_WAIT() and friends were added in 2.5.39 and backported to 2.4.28. + * + * Unfortunately it is not true. While some distros may have done it the + * change has never made it into vanilla 2.4 kernel. Instead of testing + * particular kernel versions let's just test for presence of DEFINE_WAIT + * when figuring out whether we need to provide replacement implementation + * or simply alias existing one. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 28) || \ - (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0) && \ - LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 39)) + +#ifndef DEFINE_WAIT + # define COMPAT_DEFINE_WAIT(_wait) \ DECLARE_WAITQUEUE(_wait, current) # define compat_init_prepare_to_wait(_sleep, _wait, _state) \ @@ -197,7 +203,9 @@ do { \ __set_current_state(_state); \ remove_wait_queue(_sleep, _wait); \ } while (0) + #else + # define COMPAT_DEFINE_WAIT(_wait) \ DEFINE_WAIT(_wait) # define compat_init_prepare_to_wait(_sleep, _wait, _state) \ @@ -206,6 +214,7 @@ do { \ prepare_to_wait(_sleep, _wait, _state) # define compat_finish_wait(_sleep, _wait, _state) \ finish_wait(_sleep, _wait) -#endif + +#endif /* #ifndef DEFINE_WAIT */ #endif /* __COMPAT_WAIT_H__ */ |
From: Eric S. <ej...@sh...> - 2009-02-26 23:09:39
|
Dmitry Torokhov wrote: > Hi Eric, > > Thank you very much for your report. > > On Thursday 26 February 2009 08:17:47 Eric Shubert wrote: >> I've attempted to compile subject, ran into a few snags, and have a few >> solutions. >> >> vmxnet.c build failed with: >> make[3]: Entering directory >> `/usr/src/open-vm-tools-2009.02.18-148847/modules/linux/vmxnet' >> In file included from /lib/modules/2.4.36/build/include/asm/dma.h:14, >> from vmxnet.c:34: >> /lib/modules/2.4.36/build/include/linux/delay.h:62: error: parse error >> before "const" >> make[3]: *** [vmxnet.o] Error 1 >> >> I couldn't see what the problem with linux/delay.h exactly was, but it >> doesn't appear to be necessary. I tried removing >> #include <asm/dma.h> >> from vmxnet.c, and the only complaint from the compiler was the lack of >> the udelay function, which is defined in <asm/delay.h>. It appears that >> asm/dma.h was including linux/delay.h, which in turn included >> asm/delay.h, which contained the udelay definition. I replaced >> <asm/dma.h> with <asm/delay.h>, and vmxnet.c compiled clean. Of course >> whether it actually works or not is another question. >> > > This should indeed work. > >> The next error was with vmhgfs. Makefile.normal had specified >> hgfsEscapeLinux.o, while the program was really hgfsEscape.o (the >> "Linux" part had apparently been dropped along the line). I modified >> Makefile.normal, specifying hgfsEscape.o, and it compiled clean. Can >> someone verify if this is correct? >> > > Yes, that is correct. There should already be hgfsEscape.o in the list of > dependencies so you can just remove hgfsEscapeLinux.o > >> With vmsock, I get this: >> make[4]: Entering directory >> `/usr/src/open-vm-tools-2009.02.18-148847p/modules/linux/vsock/driver-2.4.3 >> 6' Compiling .././linux/af_vsock.c >> ../linux/af_vsock.c: In function `VSockVmciStreamConnect': >> ../linux/af_vsock.c:3466: warning: implicit declaration of function >> `DEFINE_WAIT' >> ../linux/af_vsock.c:3466: error: `wait' undeclared (first use in this >> function) >> ../linux/af_vsock.c:3466: error: (Each undeclared identifier is reported >> only once >> ../linux/af_vsock.c:3466: error: for each function it appears in.) >> ../linux/af_vsock.c:3542: warning: implicit declaration of function >> `prepare_to_wait' >> ../linux/af_vsock.c:3577: warning: implicit declaration of function >> `finish_wait' >> ../linux/af_vsock.c: In function `VSockVmciAccept': >> ../linux/af_vsock.c:3615: error: `wait' undeclared (first use in this >> function) >> ../linux/af_vsock.c: In function `VSockVmciStreamSendmsg': >> ../linux/af_vsock.c:4360: error: `wait' undeclared (first use in this >> function) >> ../linux/af_vsock.c: In function `VSockVmciStreamRecvmsg': >> ../linux/af_vsock.c:4714: error: `wait' undeclared (first use in this >> function) >> make[4]: *** [af_vsock.o] Error 1 >> make[4]: Leaving directory >> `/usr/src/open-vm-tools-2009.02.18-148847p/modules/linux/vsock/driver-2.4.3 >> 6' >> >> Can someone explain what might be the problem here? I don't expect >> vmsock to be useful in the IPCop distro, but I'm wondering what the >> problem is, as it should build with this kernel. > > Could you please try the patch below? You will need to apply it to all copies > of compat_wait.h in the tree. Thanks! > Dmitry, I figured this out as well (great minds think alike!). As a test I changed the KERNEL_VERSION(2, 4, 28) to 2.4.38 just to make it include the code. It compiled fine. I like your fix much better though (was thinking along the same lines). I'll try the patch and get back to you. Thanks! -- -Eric 'shubes' |
From: Eric S. <ej...@sh...> - 2009-02-26 23:39:30
|
Dmitry Torokhov wrote: > Hi Eric, > > Thank you very much for your report. > > On Thursday 26 February 2009 08:17:47 Eric Shubert wrote: >> I've attempted to compile subject, ran into a few snags, and have a few >> solutions. >> >> vmxnet.c build failed with: >> make[3]: Entering directory >> `/usr/src/open-vm-tools-2009.02.18-148847/modules/linux/vmxnet' >> In file included from /lib/modules/2.4.36/build/include/asm/dma.h:14, >> from vmxnet.c:34: >> /lib/modules/2.4.36/build/include/linux/delay.h:62: error: parse error >> before "const" >> make[3]: *** [vmxnet.o] Error 1 >> >> I couldn't see what the problem with linux/delay.h exactly was, but it >> doesn't appear to be necessary. I tried removing >> #include <asm/dma.h> >> from vmxnet.c, and the only complaint from the compiler was the lack of >> the udelay function, which is defined in <asm/delay.h>. It appears that >> asm/dma.h was including linux/delay.h, which in turn included >> asm/delay.h, which contained the udelay definition. I replaced >> <asm/dma.h> with <asm/delay.h>, and vmxnet.c compiled clean. Of course >> whether it actually works or not is another question. >> > > This should indeed work. > >> The next error was with vmhgfs. Makefile.normal had specified >> hgfsEscapeLinux.o, while the program was really hgfsEscape.o (the >> "Linux" part had apparently been dropped along the line). I modified >> Makefile.normal, specifying hgfsEscape.o, and it compiled clean. Can >> someone verify if this is correct? >> > > Yes, that is correct. There should already be hgfsEscape.o in the list of > dependencies so you can just remove hgfsEscapeLinux.o > >> With vmsock, I get this: >> make[4]: Entering directory >> `/usr/src/open-vm-tools-2009.02.18-148847p/modules/linux/vsock/driver-2.4.3 >> 6' Compiling .././linux/af_vsock.c >> ../linux/af_vsock.c: In function `VSockVmciStreamConnect': >> ../linux/af_vsock.c:3466: warning: implicit declaration of function >> `DEFINE_WAIT' >> ../linux/af_vsock.c:3466: error: `wait' undeclared (first use in this >> function) >> ../linux/af_vsock.c:3466: error: (Each undeclared identifier is reported >> only once >> ../linux/af_vsock.c:3466: error: for each function it appears in.) >> ../linux/af_vsock.c:3542: warning: implicit declaration of function >> `prepare_to_wait' >> ../linux/af_vsock.c:3577: warning: implicit declaration of function >> `finish_wait' >> ../linux/af_vsock.c: In function `VSockVmciAccept': >> ../linux/af_vsock.c:3615: error: `wait' undeclared (first use in this >> function) >> ../linux/af_vsock.c: In function `VSockVmciStreamSendmsg': >> ../linux/af_vsock.c:4360: error: `wait' undeclared (first use in this >> function) >> ../linux/af_vsock.c: In function `VSockVmciStreamRecvmsg': >> ../linux/af_vsock.c:4714: error: `wait' undeclared (first use in this >> function) >> make[4]: *** [af_vsock.o] Error 1 >> make[4]: Leaving directory >> `/usr/src/open-vm-tools-2009.02.18-148847p/modules/linux/vsock/driver-2.4.3 >> 6' >> >> Can someone explain what might be the problem here? I don't expect >> vmsock to be useful in the IPCop distro, but I'm wondering what the >> problem is, as it should build with this kernel. > > Could you please try the patch below? You will need to apply it to all copies > of compat_wait.h in the tree. Thanks! > I've applied the patch to all copies of compat_wait.h: open-vm-tools-2009.02.18-148847/modules/linux/vmmemctl/compat_wait.h open-vm-tools-2009.02.18-148847/modules/linux/vmhgfs/compat_wait.h open-vm-tools-2009.02.18-148847/modules/linux/vsock/include/compat_wait.h open-vm-tools-2009.02.18-148847/modules/linux/vmblock/include/compat_wait.h open-vm-tools-2009.02.18-148847/modules/linux/vmci/compat_wait.h and everything compiled ok. It should be noted that, as IPCop doesn't have a GUI (it typically runs headless), I used the following configuration: ./configure --disable-static \ --disable-multimon \ --without-gtk2 \ --without-gtkmm \ --without-icu \ --without-x \ --with-kernel-release=2.4.36 TTBOMK the only module using compat_wait.h with this configuration is vsock. Do you have any idea which release will contain all of these changes (vmxnet.c, vmhgfs/Makefile.normal, compat_wait.h)? Thanks again! -- -Eric 'shubes' |
From: Dmitry T. <dt...@vm...> - 2009-02-26 23:44:48
|
On Thursday 26 February 2009 15:39:13 Eric Shubert wrote: > Dmitry Torokhov wrote: > > Hi Eric, > > > > Thank you very much for your report. > > > > On Thursday 26 February 2009 08:17:47 Eric Shubert wrote: > >> I've attempted to compile subject, ran into a few snags, and have a few > >> solutions. > >> > >> vmxnet.c build failed with: > >> make[3]: Entering directory > >> `/usr/src/open-vm-tools-2009.02.18-148847/modules/linux/vmxnet' > >> In file included from /lib/modules/2.4.36/build/include/asm/dma.h:14, > >> from vmxnet.c:34: > >> /lib/modules/2.4.36/build/include/linux/delay.h:62: error: parse error > >> before "const" > >> make[3]: *** [vmxnet.o] Error 1 > >> > >> I couldn't see what the problem with linux/delay.h exactly was, but it > >> doesn't appear to be necessary. I tried removing > >> #include <asm/dma.h> > >> from vmxnet.c, and the only complaint from the compiler was the lack of > >> the udelay function, which is defined in <asm/delay.h>. It appears that > >> asm/dma.h was including linux/delay.h, which in turn included > >> asm/delay.h, which contained the udelay definition. I replaced > >> <asm/dma.h> with <asm/delay.h>, and vmxnet.c compiled clean. Of course > >> whether it actually works or not is another question. > > > > This should indeed work. > > > >> The next error was with vmhgfs. Makefile.normal had specified > >> hgfsEscapeLinux.o, while the program was really hgfsEscape.o (the > >> "Linux" part had apparently been dropped along the line). I modified > >> Makefile.normal, specifying hgfsEscape.o, and it compiled clean. Can > >> someone verify if this is correct? > > > > Yes, that is correct. There should already be hgfsEscape.o in the list of > > dependencies so you can just remove hgfsEscapeLinux.o > > > >> With vmsock, I get this: > >> make[4]: Entering directory > >> `/usr/src/open-vm-tools-2009.02.18-148847p/modules/linux/vsock/driver-2. > >>4.3 6' Compiling .././linux/af_vsock.c > >> ../linux/af_vsock.c: In function `VSockVmciStreamConnect': > >> ../linux/af_vsock.c:3466: warning: implicit declaration of function > >> `DEFINE_WAIT' > >> ../linux/af_vsock.c:3466: error: `wait' undeclared (first use in this > >> function) > >> ../linux/af_vsock.c:3466: error: (Each undeclared identifier is reported > >> only once > >> ../linux/af_vsock.c:3466: error: for each function it appears in.) > >> ../linux/af_vsock.c:3542: warning: implicit declaration of function > >> `prepare_to_wait' > >> ../linux/af_vsock.c:3577: warning: implicit declaration of function > >> `finish_wait' > >> ../linux/af_vsock.c: In function `VSockVmciAccept': > >> ../linux/af_vsock.c:3615: error: `wait' undeclared (first use in this > >> function) > >> ../linux/af_vsock.c: In function `VSockVmciStreamSendmsg': > >> ../linux/af_vsock.c:4360: error: `wait' undeclared (first use in this > >> function) > >> ../linux/af_vsock.c: In function `VSockVmciStreamRecvmsg': > >> ../linux/af_vsock.c:4714: error: `wait' undeclared (first use in this > >> function) > >> make[4]: *** [af_vsock.o] Error 1 > >> make[4]: Leaving directory > >> `/usr/src/open-vm-tools-2009.02.18-148847p/modules/linux/vsock/driver-2. > >>4.3 6' > >> > >> Can someone explain what might be the problem here? I don't expect > >> vmsock to be useful in the IPCop distro, but I'm wondering what the > >> problem is, as it should build with this kernel. > > > > Could you please try the patch below? You will need to apply it to all > > copies of compat_wait.h in the tree. Thanks! > > I've applied the patch to all copies of compat_wait.h: > open-vm-tools-2009.02.18-148847/modules/linux/vmmemctl/compat_wait.h > open-vm-tools-2009.02.18-148847/modules/linux/vmhgfs/compat_wait.h > open-vm-tools-2009.02.18-148847/modules/linux/vsock/include/compat_wait.h > open-vm-tools-2009.02.18-148847/modules/linux/vmblock/include/compat_wait.h > open-vm-tools-2009.02.18-148847/modules/linux/vmci/compat_wait.h > and everything compiled ok. Cool, thank you for doing that. > > It should be noted that, as IPCop doesn't have a GUI (it typically runs > headless), I used the following configuration: > ./configure --disable-static \ > --disable-multimon \ > --without-gtk2 \ > --without-gtkmm \ > --without-icu \ > --without-x \ > --with-kernel-release=2.4.36 > TTBOMK the only module using compat_wait.h with this configuration is > vsock. > > Do you have any idea which release will contain all of these changes > (vmxnet.c, vmhgfs/Makefile.normal, compat_wait.h)? > The next month refresh should pick it all up. -- Dmitry |