* tools/virtio: Compile errors
@ 2012-02-08 16:04 Dongsu Park
2012-02-08 16:11 ` devendra.aaru
2012-02-08 16:47 ` Michael S. Tsirkin
0 siblings, 2 replies; 11+ messages in thread
From: Dongsu Park @ 2012-02-08 16:04 UTC (permalink / raw)
To: linux-kernel; +Cc: Michael S. Tsirkin
Hi,
there are compile problems under tools/virtio.
If I simply run make,
~/linuxsrc/linux-3.2/tools/virtio $ make
gcc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
-fno-strict-overflow -MMD -c -o virtio_ring.o
../../drivers/virtio/virtio_ring.c
../../drivers/virtio/virtio_ring.c:24:26: fatal error: linux/module.h:
No such file or directory
compilation terminated.
make: *** [virtio_ring.o] Error 1
Of course that's supposed to be a simple error in CFLAGS in Makefile,
so I tried it again modifying CFLAGS, from "-I ../../usr/include" to
"-I ../../include". But this time it's another compile error.
~/linuxsrc/linux-3.2/tools/virtio $ make
gcc -g -O2 -Wall -I. -I ../../include/ -Wno-pointer-sign
-fno-strict-overflow -MMD -c -o virtio_ring.o
../../drivers/virtio/virtio_ring.c
In file included from ./linux/virtio.h:11:0,
from ../../drivers/virtio/virtio_ring.c:19:
../../include/linux/types.h:13:2: warning: #warning "Attempt to use
kernel headers from user space, see
http://kernelnewbies.org/KernelHeaders"
In file included from ../../include/linux/module.h:9:0,
from ../../drivers/virtio/virtio_ring.c:24:
../../include/linux/list.h:24:42: warning: ‘struct list_head’ declared
inside parameter list
../../include/linux/list.h:24:42: warning: its scope is only this
definition or declaration, which is probably not what you want
../../include/linux/list.h: In function ‘INIT_LIST_HEAD’:
../../include/linux/list.h:26:6: error: dereferencing pointer to
incomplete type
../../include/linux/list.h:27:6: error: dereferencing pointer to
incomplete type
../../include/linux/list.h: At top level:
../../include/linux/list.h:39:17: warning: ‘struct list_head’ declared
inside parameter list
...<snip>...
I tried again to fix it further, without success.
Has anyone succeeded compiling tools/virtio?
By the way, my system is Ubuntu 11.10 with Kernel 3.2.
Cheers,
Dongsu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: tools/virtio: Compile errors
2012-02-08 16:04 tools/virtio: Compile errors Dongsu Park
@ 2012-02-08 16:11 ` devendra.aaru
2012-02-08 16:38 ` Dongsu Park
2012-02-08 16:47 ` Michael S. Tsirkin
1 sibling, 1 reply; 11+ messages in thread
From: devendra.aaru @ 2012-02-08 16:11 UTC (permalink / raw)
To: Dongsu Park; +Cc: linux-kernel, Michael S. Tsirkin
On Wed, Feb 8, 2012 at 11:04 AM, Dongsu Park <advance38@gmail.com> wrote:
> Hi,
>
> there are compile problems under tools/virtio.
> If I simply run make,
>
> ~/linuxsrc/linux-3.2/tools/virtio $ make
> gcc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
> -fno-strict-overflow -MMD -c -o virtio_ring.o
> ../../drivers/virtio/virtio_ring.c
> ../../drivers/virtio/virtio_ring.c:24:26: fatal error: linux/module.h:
> No such file or directory
> compilation terminated.
> make: *** [virtio_ring.o] Error 1
>
compile with make mod.
> Of course that's supposed to be a simple error in CFLAGS in Makefile,
> so I tried it again modifying CFLAGS, from "-I ../../usr/include" to
> "-I ../../include". But this time it's another compile error.
>
> ~/linuxsrc/linux-3.2/tools/virtio $ make
> gcc -g -O2 -Wall -I. -I ../../include/ -Wno-pointer-sign
> -fno-strict-overflow -MMD -c -o virtio_ring.o
> ../../drivers/virtio/virtio_ring.c
> In file included from ./linux/virtio.h:11:0,
> from ../../drivers/virtio/virtio_ring.c:19:
> ../../include/linux/types.h:13:2: warning: #warning "Attempt to use
> kernel headers from user space, see
> http://kernelnewbies.org/KernelHeaders"
> In file included from ../../include/linux/module.h:9:0,
> from ../../drivers/virtio/virtio_ring.c:24:
> ../../include/linux/list.h:24:42: warning: ‘struct list_head’ declared
> inside parameter list
> ../../include/linux/list.h:24:42: warning: its scope is only this
> definition or declaration, which is probably not what you want
> ../../include/linux/list.h: In function ‘INIT_LIST_HEAD’:
> ../../include/linux/list.h:26:6: error: dereferencing pointer to
> incomplete type
> ../../include/linux/list.h:27:6: error: dereferencing pointer to
> incomplete type
> ../../include/linux/list.h: At top level:
> ../../include/linux/list.h:39:17: warning: ‘struct list_head’ declared
> inside parameter list
>
> ...<snip>...
>
> I tried again to fix it further, without success.
> Has anyone succeeded compiling tools/virtio?
>
> By the way, my system is Ubuntu 11.10 with Kernel 3.2.
>
> Cheers,
> Dongsu
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: tools/virtio: Compile errors
2012-02-08 16:11 ` devendra.aaru
@ 2012-02-08 16:38 ` Dongsu Park
0 siblings, 0 replies; 11+ messages in thread
From: Dongsu Park @ 2012-02-08 16:38 UTC (permalink / raw)
To: devendra.aaru; +Cc: linux-kernel, Michael S. Tsirkin
On 08.02.2012 11:11, devendra.aaru wrote:
> On Wed, Feb 8, 2012 at 11:04 AM, Dongsu Park <advance38@gmail.com> wrote:
> > Hi,
> >
> > there are compile problems under tools/virtio.
> > If I simply run make,
> >
> > ~/linuxsrc/linux-3.2/tools/virtio $ make
> > gcc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
> > -fno-strict-overflow -MMD -c -o virtio_ring.o
> > ../../drivers/virtio/virtio_ring.c
> > ../../drivers/virtio/virtio_ring.c:24:26: fatal error: linux/module.h:
> > No such file or directory
> > compilation terminated.
> > make: *** [virtio_ring.o] Error 1
> >
> compile with make mod.
Yes, I know "make mod" is already working.
I'm also able to load the kernel module vhost_test.ko. That's fine.
But "make test" isn't still working.
How can I build virtio_test, the userspace test program?
Dongsu
> > Of course that's supposed to be a simple error in CFLAGS in Makefile,
> > so I tried it again modifying CFLAGS, from "-I ../../usr/include" to
> > "-I ../../include". But this time it's another compile error.
> >
> > ~/linuxsrc/linux-3.2/tools/virtio $ make
> > gcc -g -O2 -Wall -I. -I ../../include/ -Wno-pointer-sign
> > -fno-strict-overflow -MMD -c -o virtio_ring.o
> > ../../drivers/virtio/virtio_ring.c
> > In file included from ./linux/virtio.h:11:0,
> > from ../../drivers/virtio/virtio_ring.c:19:
> > ../../include/linux/types.h:13:2: warning: #warning "Attempt to use
> > kernel headers from user space, see
> > http://kernelnewbies.org/KernelHeaders"
> > In file included from ../../include/linux/module.h:9:0,
> > from ../../drivers/virtio/virtio_ring.c:24:
> > ../../include/linux/list.h:24:42: warning: ‘struct list_head’ declared
> > inside parameter list
> > ../../include/linux/list.h:24:42: warning: its scope is only this
> > definition or declaration, which is probably not what you want
> > ../../include/linux/list.h: In function ‘INIT_LIST_HEAD’:
> > ../../include/linux/list.h:26:6: error: dereferencing pointer to
> > incomplete type
> > ../../include/linux/list.h:27:6: error: dereferencing pointer to
> > incomplete type
> > ../../include/linux/list.h: At top level:
> > ../../include/linux/list.h:39:17: warning: ‘struct list_head’ declared
> > inside parameter list
> >
> > ...<snip>...
> >
> > I tried again to fix it further, without success.
> > Has anyone succeeded compiling tools/virtio?
> >
> > By the way, my system is Ubuntu 11.10 with Kernel 3.2.
> >
> > Cheers,
> > Dongsu
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: tools/virtio: Compile errors
2012-02-08 16:04 tools/virtio: Compile errors Dongsu Park
2012-02-08 16:11 ` devendra.aaru
@ 2012-02-08 16:47 ` Michael S. Tsirkin
2012-04-09 6:02 ` Zhi Yong Wu
2012-04-09 6:12 ` Zhi Yong Wu
1 sibling, 2 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2012-02-08 16:47 UTC (permalink / raw)
To: Dongsu Park; +Cc: linux-kernel
On Wed, Feb 08, 2012 at 05:04:05PM +0100, Dongsu Park wrote:
> Hi,
>
> there are compile problems under tools/virtio.
> If I simply run make,
>
> ~/linuxsrc/linux-3.2/tools/virtio $ make
> gcc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
> -fno-strict-overflow -MMD -c -o virtio_ring.o
> ../../drivers/virtio/virtio_ring.c
> ../../drivers/virtio/virtio_ring.c:24:26: fatal error: linux/module.h:
> No such file or directory
> compilation terminated.
> make: *** [virtio_ring.o] Error 1
> By the way, my system is Ubuntu 11.10 with Kernel 3.2.
>
> Cheers,
> Dongsu
This patch is missing - I'll put it upstream.
--->
tools/virtio: add module.h stub
make it build with linux 3.2
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
diff --git a/tools/virtio/linux/module.h b/tools/virtio/linux/module.h
new file mode 100644
index 0000000..96868eb
--- /dev/null
+++ b/tools/virtio/linux/module.h
@@ -0,0 +1,3 @@
+#ifndef LINUX_MODULE_H
+#define LINUX_MODULE_H
+#endif
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: tools/virtio: Compile errors
2012-02-08 16:47 ` Michael S. Tsirkin
@ 2012-04-09 6:02 ` Zhi Yong Wu
2012-04-09 7:33 ` Michael S. Tsirkin
2012-04-09 6:12 ` Zhi Yong Wu
1 sibling, 1 reply; 11+ messages in thread
From: Zhi Yong Wu @ 2012-04-09 6:02 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Dongsu Park, linux-kernel
On Thu, Feb 9, 2012 at 12:47 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Wed, Feb 08, 2012 at 05:04:05PM +0100, Dongsu Park wrote:
>> Hi,
>>
>> there are compile problems under tools/virtio.
>> If I simply run make,
>>
>> ~/linuxsrc/linux-3.2/tools/virtio $ make
>> gcc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
>> -fno-strict-overflow -MMD -c -o virtio_ring.o
>> ../../drivers/virtio/virtio_ring.c
>> ../../drivers/virtio/virtio_ring.c:24:26: fatal error: linux/module.h:
>> No such file or directory
>> compilation terminated.
>> make: *** [virtio_ring.o] Error 1
>
>
>> By the way, my system is Ubuntu 11.10 with Kernel 3.2.
>>
>> Cheers,
>> Dongsu
>
> This patch is missing - I'll put it upstream.
>
> --->
>
> tools/virtio: add module.h stub
>
> make it build with linux 3.2
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> diff --git a/tools/virtio/linux/module.h b/tools/virtio/linux/module.h
> new file mode 100644
> index 0000000..96868eb
> --- /dev/null
> +++ b/tools/virtio/linux/module.h
> @@ -0,0 +1,3 @@
> +#ifndef LINUX_MODULE_H
> +#define LINUX_MODULE_H
> +#endif
After the patch was applied in my env, i met another issue.
[root@f15 virtio]# make test
cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
-fno-strict-overflow -MMD -c -o virtio_ring.o
../../drivers/virtio/virtio_ring.c
../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_add_buf\u2019:
../../drivers/virtio/virtio_ring.c:277:2: warning: implicit
declaration of function \u2018wmb\u2019
[-Wimplicit-function-declaration]
../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_get_buf\u2019:
../../drivers/virtio/virtio_ring.c:437:2: warning: implicit
declaration of function \u2018rmb\u2019
[-Wimplicit-function-declaration]
cc virtio_test.o virtio_ring.o -o virtio_test
virtio_ring.o: In function `virtqueue_add_buf':
/home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:277:
undefined reference to `wmb'
virtio_ring.o: In function `virtqueue_get_buf':
/home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:437:
undefined reference to `rmb'
collect2: ld returned 1 exit status
make: *** [virtio_test] Error 1
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Regards,
Zhi Yong Wu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: tools/virtio: Compile errors
2012-02-08 16:47 ` Michael S. Tsirkin
2012-04-09 6:02 ` Zhi Yong Wu
@ 2012-04-09 6:12 ` Zhi Yong Wu
1 sibling, 0 replies; 11+ messages in thread
From: Zhi Yong Wu @ 2012-04-09 6:12 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Dongsu Park, linux-kernel
On Thu, Feb 9, 2012 at 12:47 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Wed, Feb 08, 2012 at 05:04:05PM +0100, Dongsu Park wrote:
>> Hi,
>>
>> there are compile problems under tools/virtio.
>> If I simply run make,
>>
>> ~/linuxsrc/linux-3.2/tools/virtio $ make
>> gcc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
>> -fno-strict-overflow -MMD -c -o virtio_ring.o
>> ../../drivers/virtio/virtio_ring.c
>> ../../drivers/virtio/virtio_ring.c:24:26: fatal error: linux/module.h:
>> No such file or directory
>> compilation terminated.
>> make: *** [virtio_ring.o] Error 1
>
>
>> By the way, my system is Ubuntu 11.10 with Kernel 3.2.
>>
>> Cheers,
>> Dongsu
>
> This patch is missing - I'll put it upstream.
>
> --->
>
> tools/virtio: add module.h stub
>
> make it build with linux 3.2
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> diff --git a/tools/virtio/linux/module.h b/tools/virtio/linux/module.h
> new file mode 100644
> index 0000000..96868eb
> --- /dev/null
> +++ b/tools/virtio/linux/module.h
> @@ -0,0 +1,3 @@
> +#ifndef LINUX_MODULE_H
> +#define LINUX_MODULE_H
> +#endif
I found that it is not only lack of this head file when i ran "make
test", but also depend on other head files.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Regards,
Zhi Yong Wu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: tools/virtio: Compile errors
2012-04-09 6:02 ` Zhi Yong Wu
@ 2012-04-09 7:33 ` Michael S. Tsirkin
2012-04-09 7:41 ` Zhi Yong Wu
0 siblings, 1 reply; 11+ messages in thread
From: Michael S. Tsirkin @ 2012-04-09 7:33 UTC (permalink / raw)
To: Zhi Yong Wu; +Cc: Dongsu Park, linux-kernel
On Mon, Apr 09, 2012 at 02:02:53PM +0800, Zhi Yong Wu wrote:
> On Thu, Feb 9, 2012 at 12:47 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> > On Wed, Feb 08, 2012 at 05:04:05PM +0100, Dongsu Park wrote:
> >> Hi,
> >>
> >> there are compile problems under tools/virtio.
> >> If I simply run make,
> >>
> >> ~/linuxsrc/linux-3.2/tools/virtio $ make
> >> gcc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
> >> -fno-strict-overflow -MMD -c -o virtio_ring.o
> >> ../../drivers/virtio/virtio_ring.c
> >> ../../drivers/virtio/virtio_ring.c:24:26: fatal error: linux/module.h:
> >> No such file or directory
> >> compilation terminated.
> >> make: *** [virtio_ring.o] Error 1
> >
> >
> >> By the way, my system is Ubuntu 11.10 with Kernel 3.2.
> >>
> >> Cheers,
> >> Dongsu
> >
> > This patch is missing - I'll put it upstream.
> >
> > --->
> >
> > tools/virtio: add module.h stub
> >
> > make it build with linux 3.2
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >
> > diff --git a/tools/virtio/linux/module.h b/tools/virtio/linux/module.h
> > new file mode 100644
> > index 0000000..96868eb
> > --- /dev/null
> > +++ b/tools/virtio/linux/module.h
> > @@ -0,0 +1,3 @@
> > +#ifndef LINUX_MODULE_H
> > +#define LINUX_MODULE_H
> > +#endif
> After the patch was applied in my env, i met another issue.
> [root@f15 virtio]# make test
> cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
> -fno-strict-overflow -MMD -c -o virtio_ring.o
> ../../drivers/virtio/virtio_ring.c
> ../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_add_buf\u2019:
> ../../drivers/virtio/virtio_ring.c:277:2: warning: implicit
> declaration of function \u2018wmb\u2019
> [-Wimplicit-function-declaration]
> ../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_get_buf\u2019:
> ../../drivers/virtio/virtio_ring.c:437:2: warning: implicit
> declaration of function \u2018rmb\u2019
> [-Wimplicit-function-declaration]
> cc virtio_test.o virtio_ring.o -o virtio_test
> virtio_ring.o: In function `virtqueue_add_buf':
> /home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:277:
> undefined reference to `wmb'
> virtio_ring.o: In function `virtqueue_get_buf':
> /home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:437:
> undefined reference to `rmb'
> collect2: ld returned 1 exit status
> make: *** [virtio_test] Error 1
On which kernel version does this trigger?
>
>
> --
> Regards,
>
> Zhi Yong Wu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: tools/virtio: Compile errors
2012-04-09 7:33 ` Michael S. Tsirkin
@ 2012-04-09 7:41 ` Zhi Yong Wu
2012-04-09 7:55 ` Michael S. Tsirkin
0 siblings, 1 reply; 11+ messages in thread
From: Zhi Yong Wu @ 2012-04-09 7:41 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Dongsu Park, linux-kernel
On Mon, Apr 9, 2012 at 3:33 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Mon, Apr 09, 2012 at 02:02:53PM +0800, Zhi Yong Wu wrote:
>> On Thu, Feb 9, 2012 at 12:47 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
>> > On Wed, Feb 08, 2012 at 05:04:05PM +0100, Dongsu Park wrote:
>> >> Hi,
>> >>
>> >> there are compile problems under tools/virtio.
>> >> If I simply run make,
>> >>
>> >> ~/linuxsrc/linux-3.2/tools/virtio $ make
>> >> gcc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
>> >> -fno-strict-overflow -MMD -c -o virtio_ring.o
>> >> ../../drivers/virtio/virtio_ring.c
>> >> ../../drivers/virtio/virtio_ring.c:24:26: fatal error: linux/module.h:
>> >> No such file or directory
>> >> compilation terminated.
>> >> make: *** [virtio_ring.o] Error 1
>> >
>> >
>> >> By the way, my system is Ubuntu 11.10 with Kernel 3.2.
>> >>
>> >> Cheers,
>> >> Dongsu
>> >
>> > This patch is missing - I'll put it upstream.
>> >
>> > --->
>> >
>> > tools/virtio: add module.h stub
>> >
>> > make it build with linux 3.2
>> >
>> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>> >
>> > diff --git a/tools/virtio/linux/module.h b/tools/virtio/linux/module.h
>> > new file mode 100644
>> > index 0000000..96868eb
>> > --- /dev/null
>> > +++ b/tools/virtio/linux/module.h
>> > @@ -0,0 +1,3 @@
>> > +#ifndef LINUX_MODULE_H
>> > +#define LINUX_MODULE_H
>> > +#endif
>> After the patch was applied in my env, i met another issue.
>> [root@f15 virtio]# make test
>> cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
>> -fno-strict-overflow -MMD -c -o virtio_ring.o
>> ../../drivers/virtio/virtio_ring.c
>> ../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_add_buf\u2019:
>> ../../drivers/virtio/virtio_ring.c:277:2: warning: implicit
>> declaration of function \u2018wmb\u2019
>> [-Wimplicit-function-declaration]
>> ../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_get_buf\u2019:
>> ../../drivers/virtio/virtio_ring.c:437:2: warning: implicit
>> declaration of function \u2018rmb\u2019
>> [-Wimplicit-function-declaration]
>> cc virtio_test.o virtio_ring.o -o virtio_test
>> virtio_ring.o: In function `virtqueue_add_buf':
>> /home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:277:
>> undefined reference to `wmb'
>> virtio_ring.o: In function `virtqueue_get_buf':
>> /home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:437:
>> undefined reference to `rmb'
>> collect2: ld returned 1 exit status
>> make: *** [virtio_test] Error 1
>
> On which kernel version does this trigger?
[root@f15 linux-2.6]# git log
commit e22057c8599373e5caef0bc42bdb95d2a361ab0d
Merge: 496b919 df7a3ee
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sat Mar 24 12:20:25 2012 -0700
Merge tag 'stable/for-linus-3.4-tag-two' of git://git.kernel.org/pub/scm/lin
Pull more xen updates from Konrad Rzeszutek Wilk:
"One tiny feature that accidentally got lost in the initial git pull:
* Add fast-EOI acking of interrupts (clear a bit instead of
hypercall)
And bug-fixes:
* Fix CPU bring-up code missing a call to notify other subsystems.
* Fix reading /sys/hypervisor even if PVonHVM drivers are not loaded.
* In Xen ACPI processor driver: remove too verbose WARN messages, fix
up the Kconfig dependency to be a module by default, and add
dependency on CPU_FREQ.
* Disable CPU frequency drivers from loading when booting under Xen
(as we want the Xen ACPI processor to be used instead).
* Cleanups in tmem code."
* tag 'stable/for-linus-3.4-tag-two' of git://git.kernel.org/pub/scm/linux/k
xen/acpi: Fix Kconfig dependency on CPU_FREQ
[root@f15 linux-2.6]# cd tools/virtio/
[root@f15 virtio]# ls
linux Makefile vhost_test virtio_test.c virtio_test.d virtio_test.o
[root@f15 virtio]# make test
cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
-fno-strict-overflow -MMD -c -o virtio_ring.o
../../drivers/virtio/virtio_ring.c
../../drivers/virtio/virtio_ring.c:25:27: fatal error:
linux/hrtimer.h: No such file or directory
compilation terminated.
make: *** [virtio_ring.o] Error 1
[root@f15 virtio]# touch linux/hrtimer.h
[root@f15 virtio]# vi linux/hrtimer.h
[root@f15 virtio]# make test
cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
-fno-strict-overflow -MMD -c -o virtio_ring.o
../../drivers/virtio/virtio_ring.c
../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_add_buf\u2019:
../../drivers/virtio/virtio_ring.c:277:2: warning: implicit
declaration of function \u2018wmb\u2019
[-Wimplicit-function-declaration]
../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_get_buf\u2019:
../../drivers/virtio/virtio_ring.c:437:2: warning: implicit
declaration of function \u2018rmb\u2019
[-Wimplicit-function-declaration]
cc virtio_test.o virtio_ring.o -o virtio_test
virtio_ring.o: In function `virtqueue_add_buf':
/home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:277:
undefined reference to `wmb'
virtio_ring.o: In function `virtqueue_get_buf':
/home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:437:
undefined reference to `rmb'
collect2: ld returned 1 exit status
make: *** [virtio_test] Error 1
[root@f15 virtio]#
>
>>
>>
>> --
>> Regards,
>>
>> Zhi Yong Wu
--
Regards,
Zhi Yong Wu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: tools/virtio: Compile errors
2012-04-09 7:41 ` Zhi Yong Wu
@ 2012-04-09 7:55 ` Michael S. Tsirkin
2012-04-09 8:49 ` Zhi Yong Wu
0 siblings, 1 reply; 11+ messages in thread
From: Michael S. Tsirkin @ 2012-04-09 7:55 UTC (permalink / raw)
To: Zhi Yong Wu; +Cc: Dongsu Park, linux-kernel
On Mon, Apr 09, 2012 at 03:41:36PM +0800, Zhi Yong Wu wrote:
> On Mon, Apr 9, 2012 at 3:33 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> > On Mon, Apr 09, 2012 at 02:02:53PM +0800, Zhi Yong Wu wrote:
> >> On Thu, Feb 9, 2012 at 12:47 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> >> > On Wed, Feb 08, 2012 at 05:04:05PM +0100, Dongsu Park wrote:
> >> >> Hi,
> >> >>
> >> >> there are compile problems under tools/virtio.
> >> >> If I simply run make,
> >> >>
> >> >> ~/linuxsrc/linux-3.2/tools/virtio $ make
> >> >> gcc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
> >> >> -fno-strict-overflow -MMD -c -o virtio_ring.o
> >> >> ../../drivers/virtio/virtio_ring.c
> >> >> ../../drivers/virtio/virtio_ring.c:24:26: fatal error: linux/module.h:
> >> >> No such file or directory
> >> >> compilation terminated.
> >> >> make: *** [virtio_ring.o] Error 1
> >> >
> >> >
> >> >> By the way, my system is Ubuntu 11.10 with Kernel 3.2.
> >> >>
> >> >> Cheers,
> >> >> Dongsu
> >> >
> >> > This patch is missing - I'll put it upstream.
> >> >
> >> > --->
> >> >
> >> > tools/virtio: add module.h stub
> >> >
> >> > make it build with linux 3.2
> >> >
> >> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >> >
> >> > diff --git a/tools/virtio/linux/module.h b/tools/virtio/linux/module.h
> >> > new file mode 100644
> >> > index 0000000..96868eb
> >> > --- /dev/null
> >> > +++ b/tools/virtio/linux/module.h
> >> > @@ -0,0 +1,3 @@
> >> > +#ifndef LINUX_MODULE_H
> >> > +#define LINUX_MODULE_H
> >> > +#endif
> >> After the patch was applied in my env, i met another issue.
> >> [root@f15 virtio]# make test
> >> cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
> >> -fno-strict-overflow -MMD -c -o virtio_ring.o
> >> ../../drivers/virtio/virtio_ring.c
> >> ../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_add_buf\u2019:
> >> ../../drivers/virtio/virtio_ring.c:277:2: warning: implicit
> >> declaration of function \u2018wmb\u2019
> >> [-Wimplicit-function-declaration]
> >> ../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_get_buf\u2019:
> >> ../../drivers/virtio/virtio_ring.c:437:2: warning: implicit
> >> declaration of function \u2018rmb\u2019
> >> [-Wimplicit-function-declaration]
> >> cc virtio_test.o virtio_ring.o -o virtio_test
> >> virtio_ring.o: In function `virtqueue_add_buf':
> >> /home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:277:
> >> undefined reference to `wmb'
> >> virtio_ring.o: In function `virtqueue_get_buf':
> >> /home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:437:
> >> undefined reference to `rmb'
> >> collect2: ld returned 1 exit status
> >> make: *** [virtio_test] Error 1
> >
> > On which kernel version does this trigger?
> [root@f15 linux-2.6]# git log
> commit e22057c8599373e5caef0bc42bdb95d2a361ab0d
> Merge: 496b919 df7a3ee
> Author: Linus Torvalds <torvalds@linux-foundation.org>
> Date: Sat Mar 24 12:20:25 2012 -0700
Update to 3.4-rc2 and most of the issues go away
(there's still a build breakage with a missing
flag to dev_cleanup, I'm fixing this up for now
you can just pass false).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: tools/virtio: Compile errors
2012-04-09 7:55 ` Michael S. Tsirkin
@ 2012-04-09 8:49 ` Zhi Yong Wu
2012-04-09 9:00 ` Michael S. Tsirkin
0 siblings, 1 reply; 11+ messages in thread
From: Zhi Yong Wu @ 2012-04-09 8:49 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Dongsu Park, linux-kernel
On Mon, Apr 9, 2012 at 3:55 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Mon, Apr 09, 2012 at 03:41:36PM +0800, Zhi Yong Wu wrote:
>> On Mon, Apr 9, 2012 at 3:33 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
>> > On Mon, Apr 09, 2012 at 02:02:53PM +0800, Zhi Yong Wu wrote:
>> >> On Thu, Feb 9, 2012 at 12:47 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
>> >> > On Wed, Feb 08, 2012 at 05:04:05PM +0100, Dongsu Park wrote:
>> >> >> Hi,
>> >> >>
>> >> >> there are compile problems under tools/virtio.
>> >> >> If I simply run make,
>> >> >>
>> >> >> ~/linuxsrc/linux-3.2/tools/virtio $ make
>> >> >> gcc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
>> >> >> -fno-strict-overflow -MMD -c -o virtio_ring.o
>> >> >> ../../drivers/virtio/virtio_ring.c
>> >> >> ../../drivers/virtio/virtio_ring.c:24:26: fatal error: linux/module.h:
>> >> >> No such file or directory
>> >> >> compilation terminated.
>> >> >> make: *** [virtio_ring.o] Error 1
>> >> >
>> >> >
>> >> >> By the way, my system is Ubuntu 11.10 with Kernel 3.2.
>> >> >>
>> >> >> Cheers,
>> >> >> Dongsu
>> >> >
>> >> > This patch is missing - I'll put it upstream.
>> >> >
>> >> > --->
>> >> >
>> >> > tools/virtio: add module.h stub
>> >> >
>> >> > make it build with linux 3.2
>> >> >
>> >> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>> >> >
>> >> > diff --git a/tools/virtio/linux/module.h b/tools/virtio/linux/module.h
>> >> > new file mode 100644
>> >> > index 0000000..96868eb
>> >> > --- /dev/null
>> >> > +++ b/tools/virtio/linux/module.h
>> >> > @@ -0,0 +1,3 @@
>> >> > +#ifndef LINUX_MODULE_H
>> >> > +#define LINUX_MODULE_H
>> >> > +#endif
>> >> After the patch was applied in my env, i met another issue.
>> >> [root@f15 virtio]# make test
>> >> cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
>> >> -fno-strict-overflow -MMD -c -o virtio_ring.o
>> >> ../../drivers/virtio/virtio_ring.c
>> >> ../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_add_buf\u2019:
>> >> ../../drivers/virtio/virtio_ring.c:277:2: warning: implicit
>> >> declaration of function \u2018wmb\u2019
>> >> [-Wimplicit-function-declaration]
>> >> ../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_get_buf\u2019:
>> >> ../../drivers/virtio/virtio_ring.c:437:2: warning: implicit
>> >> declaration of function \u2018rmb\u2019
>> >> [-Wimplicit-function-declaration]
>> >> cc virtio_test.o virtio_ring.o -o virtio_test
>> >> virtio_ring.o: In function `virtqueue_add_buf':
>> >> /home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:277:
>> >> undefined reference to `wmb'
>> >> virtio_ring.o: In function `virtqueue_get_buf':
>> >> /home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:437:
>> >> undefined reference to `rmb'
>> >> collect2: ld returned 1 exit status
>> >> make: *** [virtio_test] Error 1
>> >
>> > On which kernel version does this trigger?
>> [root@f15 linux-2.6]# git log
>> commit e22057c8599373e5caef0bc42bdb95d2a361ab0d
>> Merge: 496b919 df7a3ee
>> Author: Linus Torvalds <torvalds@linux-foundation.org>
>> Date: Sat Mar 24 12:20:25 2012 -0700
>
> Update to 3.4-rc2 and most of the issues go away
> (there's still a build breakage with a missing
> flag to dev_cleanup, I'm fixing this up for now
> you can just pass false).
thanks.
By the way, what does it mean as below?
[root@f15 virtio]# ./virtio_test
spurious wakeus: 0x4
[root@f15 virtio]# ./virtio_test -h
Usage: virtio_test [--help] [--no-indirect] [--no-event-idx]
spurious wakeus: 0x2
[root@f15 virtio]# ./virtio_test --no-indirect
spurious wakeus: 0x4
[root@f15 virtio]# ./virtio_test --no-event-idx
spurious wakeus: 0x7
[root@f15 virtio]# ./virtio_test
spurious wakeus: 0x5
[root@f15 virtio]# ./virtio_test
spurious wakeus: 0x2
[root@f15 virtio]# ./virtio_test
spurious wakeus: 0x3
[root@f15 virtio]# ./virtio_test
spurious wakeus: 0x5
[root@f15 virtio]# ./virtio_test
spurious wakeus: 0x4
>
--
Regards,
Zhi Yong Wu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: tools/virtio: Compile errors
2012-04-09 8:49 ` Zhi Yong Wu
@ 2012-04-09 9:00 ` Michael S. Tsirkin
0 siblings, 0 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2012-04-09 9:00 UTC (permalink / raw)
To: Zhi Yong Wu; +Cc: Dongsu Park, linux-kernel
On Mon, Apr 09, 2012 at 04:49:14PM +0800, Zhi Yong Wu wrote:
> On Mon, Apr 9, 2012 at 3:55 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> > On Mon, Apr 09, 2012 at 03:41:36PM +0800, Zhi Yong Wu wrote:
> >> On Mon, Apr 9, 2012 at 3:33 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> >> > On Mon, Apr 09, 2012 at 02:02:53PM +0800, Zhi Yong Wu wrote:
> >> >> On Thu, Feb 9, 2012 at 12:47 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> >> >> > On Wed, Feb 08, 2012 at 05:04:05PM +0100, Dongsu Park wrote:
> >> >> >> Hi,
> >> >> >>
> >> >> >> there are compile problems under tools/virtio.
> >> >> >> If I simply run make,
> >> >> >>
> >> >> >> ~/linuxsrc/linux-3.2/tools/virtio $ make
> >> >> >> gcc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
> >> >> >> -fno-strict-overflow -MMD -c -o virtio_ring.o
> >> >> >> ../../drivers/virtio/virtio_ring.c
> >> >> >> ../../drivers/virtio/virtio_ring.c:24:26: fatal error: linux/module.h:
> >> >> >> No such file or directory
> >> >> >> compilation terminated.
> >> >> >> make: *** [virtio_ring.o] Error 1
> >> >> >
> >> >> >
> >> >> >> By the way, my system is Ubuntu 11.10 with Kernel 3.2.
> >> >> >>
> >> >> >> Cheers,
> >> >> >> Dongsu
> >> >> >
> >> >> > This patch is missing - I'll put it upstream.
> >> >> >
> >> >> > --->
> >> >> >
> >> >> > tools/virtio: add module.h stub
> >> >> >
> >> >> > make it build with linux 3.2
> >> >> >
> >> >> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >> >> >
> >> >> > diff --git a/tools/virtio/linux/module.h b/tools/virtio/linux/module.h
> >> >> > new file mode 100644
> >> >> > index 0000000..96868eb
> >> >> > --- /dev/null
> >> >> > +++ b/tools/virtio/linux/module.h
> >> >> > @@ -0,0 +1,3 @@
> >> >> > +#ifndef LINUX_MODULE_H
> >> >> > +#define LINUX_MODULE_H
> >> >> > +#endif
> >> >> After the patch was applied in my env, i met another issue.
> >> >> [root@f15 virtio]# make test
> >> >> cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
> >> >> -fno-strict-overflow -MMD -c -o virtio_ring.o
> >> >> ../../drivers/virtio/virtio_ring.c
> >> >> ../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_add_buf\u2019:
> >> >> ../../drivers/virtio/virtio_ring.c:277:2: warning: implicit
> >> >> declaration of function \u2018wmb\u2019
> >> >> [-Wimplicit-function-declaration]
> >> >> ../../drivers/virtio/virtio_ring.c: In function \u2018virtqueue_get_buf\u2019:
> >> >> ../../drivers/virtio/virtio_ring.c:437:2: warning: implicit
> >> >> declaration of function \u2018rmb\u2019
> >> >> [-Wimplicit-function-declaration]
> >> >> cc virtio_test.o virtio_ring.o -o virtio_test
> >> >> virtio_ring.o: In function `virtqueue_add_buf':
> >> >> /home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:277:
> >> >> undefined reference to `wmb'
> >> >> virtio_ring.o: In function `virtqueue_get_buf':
> >> >> /home/zwu/work/kernel/vhost-scsi/tools/virtio/../../drivers/virtio/virtio_ring.c:437:
> >> >> undefined reference to `rmb'
> >> >> collect2: ld returned 1 exit status
> >> >> make: *** [virtio_test] Error 1
> >> >
> >> > On which kernel version does this trigger?
> >> [root@f15 linux-2.6]# git log
> >> commit e22057c8599373e5caef0bc42bdb95d2a361ab0d
> >> Merge: 496b919 df7a3ee
> >> Author: Linus Torvalds <torvalds@linux-foundation.org>
> >> Date: Sat Mar 24 12:20:25 2012 -0700
> >
> > Update to 3.4-rc2 and most of the issues go away
> > (there's still a build breakage with a missing
> > flag to dev_cleanup, I'm fixing this up for now
> > you can just pass false).
> thanks.
> By the way, what does it mean as below?
> [root@f15 virtio]# ./virtio_test
> spurious wakeus: 0x4
> [root@f15 virtio]# ./virtio_test -h
> Usage: virtio_test [--help] [--no-indirect] [--no-event-idx]
> spurious wakeus: 0x2
> [root@f15 virtio]# ./virtio_test --no-indirect
> spurious wakeus: 0x4
> [root@f15 virtio]# ./virtio_test --no-event-idx
> spurious wakeus: 0x7
> [root@f15 virtio]# ./virtio_test
> spurious wakeus: 0x5
> [root@f15 virtio]# ./virtio_test
> spurious wakeus: 0x2
> [root@f15 virtio]# ./virtio_test
> spurious wakeus: 0x3
> [root@f15 virtio]# ./virtio_test
> spurious wakeus: 0x5
> [root@f15 virtio]# ./virtio_test
> spurious wakeus: 0x4
What does 'spurious wakeups' mean?
What we detect here is a nested interrupt delivered
before the handler for the original one had a
chance to run.
>
>
>
>
> --
> Regards,
>
> Zhi Yong Wu
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-04-09 9:00 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-08 16:04 tools/virtio: Compile errors Dongsu Park
2012-02-08 16:11 ` devendra.aaru
2012-02-08 16:38 ` Dongsu Park
2012-02-08 16:47 ` Michael S. Tsirkin
2012-04-09 6:02 ` Zhi Yong Wu
2012-04-09 7:33 ` Michael S. Tsirkin
2012-04-09 7:41 ` Zhi Yong Wu
2012-04-09 7:55 ` Michael S. Tsirkin
2012-04-09 8:49 ` Zhi Yong Wu
2012-04-09 9:00 ` Michael S. Tsirkin
2012-04-09 6:12 ` Zhi Yong Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).