Hello,
I'm trying to get vdr-1.4.0 built on Ubuntu. I'm using the source from the apt repository (apt-get source vdr).
I'm getting this:
root@media:~/vdr-1.4.0# make g++ -fPIC -g -O2 -Wall -Woverloaded-virtual -c -DREMOTE_KBD -DLIRC_DEVICE="/dev/lircd" -DRCU_DEVICE="/dev/ttyS1" -D_GNU_SOURCE -DVIDEODIR="/video" -DPLUGINDIR="./PLUGINS/lib" thread.c thread.c:319: error: 'gettid' has not been declared thread.c:321: error: expected constructor, destructor, or type conversion before 'tThreadId' make: *** [thread.o] Error 1 root@media:~/vdr-1.4.0#
If I comment out the line: _syscall0(pid_t, gettid)
And change the gettid() call just below it into: return syscall(224);
Then it builds, and seems to work fine. Clearly I'm just missing a gettid definition, but does anyone know which Debian/Ubuntu package (they're basically the same) it's in? I have linux-kernel-headers 2.6.17-5.16 installed, I'm not sure where else to look.
thanks!
On Tue, 2006-08-15 at 03:18 +0100, Chris Elsworth wrote:
Hello,
I'm trying to get vdr-1.4.0 built on Ubuntu. I'm using the source from the apt repository (apt-get source vdr).
I'm getting this:
root@media:~/vdr-1.4.0# make g++ -fPIC -g -O2 -Wall -Woverloaded-virtual -c -DREMOTE_KBD -DLIRC_DEVICE="/dev/lircd" -DRCU_DEVICE="/dev/ttyS1" -D_GNU_SOURCE -DVIDEODIR="/video" -DPLUGINDIR="./PLUGINS/lib" thread.c thread.c:319: error: 'gettid' has not been declared thread.c:321: error: expected constructor, destructor, or type conversion before 'tThreadId' make: *** [thread.o] Error 1 root@media:~/vdr-1.4.0#
If I comment out the line: _syscall0(pid_t, gettid)
And change the gettid() call just below it into: return syscall(224);
Then it builds, and seems to work fine. Clearly I'm just missing a gettid definition, but does anyone know which Debian/Ubuntu package (they're basically the same) it's in? I have linux-kernel-headers 2.6.17-5.16 installed, I'm not sure where else to look.
On my Ubuntu System (Dapper with Ubuntu Kernel 2.6.15-26-686), the macro _syscall0 is defined in /usr/include/asm-i386/unistd.h and /usr/include/asm-x86_64/unistd.h. It comes with linux-kernel-headers package.
On Tue, Aug 15, 2006 at 12:31:43PM +0200, Jens Auer wrote:
Clearly I'm just missing a gettid definition, but does anyone know which Debian/Ubuntu package (they're basically the same) it's in? I have linux-kernel-headers 2.6.17-5.16 installed, I'm not sure where else to look.
On my Ubuntu System (Dapper with Ubuntu Kernel 2.6.15-26-686), the macro _syscall0 is defined in /usr/include/asm-i386/unistd.h and /usr/include/asm-x86_64/unistd.h. It comes with linux-kernel-headers package.
Hello Jens,
Thanks for your reply. That's left me more baffled:
root@media:~# grep -r syscall0 /usr/include/* root@media:~# grep -r gettid /usr/include/* /usr/include/asm-i386/unistd.h:#define __NR_gettid 224 /usr/include/asm-x86_64/unistd.h:#define __NR_gettid 186 /usr/include/asm-x86_64/unistd.h:__SYSCALL(__NR_gettid, sys_gettid) /usr/include/bits/syscall.h:#define SYS_gettid __NR_gettid /usr/include/directfb/direct/system.h:pid_t direct_gettid(); root@media:~#
What do you get for those commands?
On Tue, 2006-08-15 at 13:31 +0100, Chris Elsworth wrote:
root@media:~# grep -r syscall0 /usr/include/* root@media:~# grep -r gettid /usr/include/* /usr/include/asm-i386/unistd.h:#define __NR_gettid 224 /usr/include/asm-x86_64/unistd.h:#define __NR_gettid 186 /usr/include/asm-x86_64/unistd.h:__SYSCALL(__NR_gettid, sys_gettid) /usr/include/bits/syscall.h:#define SYS_gettid __NR_gettid /usr/include/directfb/direct/system.h:pid_t direct_gettid(); root@media:~#
What do you get for those commands?
I get: grep -r syscall0 /usr/include/* /usr/include/asm-i386/unistd.h:#define _syscall0(type,name) \ /usr/include/asm-x86_64/unistd.h:#define _syscall0(type,name) \ grep: warning: /usr/include/lua50/lua: recursive directory loop
grep -r gettid /usr/include/* /usr/include/asm-i386/unistd.h:#define __NR_gettid 224 /usr/include/asm-x86_64/ia32_unistd.h:#define __NR_ia32_gettid 224 /usr/include/asm-x86_64/unistd.h:#define __NR_gettid 186 /usr/include/asm-x86_64/unistd.h:__SYSCALL(__NR_gettid, sys_gettid) /usr/include/bits/syscall.h:#define SYS_gettid __NR_gettid /usr/include/fpvm3_watcom.h:*$pragma aux pvmfgettid "!_" grep: warning: /usr/include/lua50/lua: recursive directory loop
/usr/include/pvm3.h:int pvm_gettid __ProtoGlarp__(( char *, int )); /usr/include/valgrind/pub_tool_libcproc.h:extern Int VG_(gettid) ( void );
The gettid function is not defined in any header, if it interpret the source correctly. The _syscall0-macro expands to a function definition pid_t gettid(void).
On Tue, 2006-08-15 at 14:52 +0200, Jens Auer wrote:
The gettid function is not defined in any header, if it interpret the source correctly. The _syscall0-macro expands to a function definition pid_t gettid(void).
_syscallX are not available for userspace in recent kernel headers (since April), this causes VDR compilation failures also with the current Fedora Core 6 test versions. More info: http://tinyurl.com/qaydh , http://lkml.org/lkml/2006/6/4/128
The attached patch appears to work for me, and from a bit of Googling I get the impression that it should probably work with all kernel header sets since 2.4.20.
On Fri, Aug 18, 2006 at 12:15:49PM +0300, Ville Skytt? wrote:
On Tue, 2006-08-15 at 14:52 +0200, Jens Auer wrote:
_syscallX are not available for userspace in recent kernel headers (since April), this causes VDR compilation failures also with the current Fedora Core 6 test versions. More info: http://tinyurl.com/qaydh , http://lkml.org/lkml/2006/6/4/128
The attached patch appears to work for me, and from a bit of Googling I get the impression that it should probably work with all kernel header sets since 2.4.20.
--- thread.c~ 2006-06-02 16:51:39.000000000 +0300 +++ thread.c 2006-08-18 01:26:24.000000000 +0300 @@ -318,7 +318,5 @@
-_syscall0(pid_t, gettid)
tThreadId cThread::ThreadId(void) {
- return gettid();
- return syscall(__NR_gettid);
}
This works for me on Ubuntu, and is pretty much what I'd tried except I used 224 instead of __NR_gettid. Can this be merged into vdr, Klaus?
Chris Elsworth wrote:
On Fri, Aug 18, 2006 at 12:15:49PM +0300, Ville Skytt? wrote:
On Tue, 2006-08-15 at 14:52 +0200, Jens Auer wrote:
_syscallX are not available for userspace in recent kernel headers (since April), this causes VDR compilation failures also with the current Fedora Core 6 test versions. More info: http://tinyurl.com/qaydh , http://lkml.org/lkml/2006/6/4/128
The attached patch appears to work for me, and from a bit of Googling I get the impression that it should probably work with all kernel header sets since 2.4.20.
--- thread.c~ 2006-06-02 16:51:39.000000000 +0300 +++ thread.c 2006-08-18 01:26:24.000000000 +0300 @@ -318,7 +318,5 @@
-_syscall0(pid_t, gettid)
tThreadId cThread::ThreadId(void) {
- return gettid();
- return syscall(__NR_gettid);
}
This works for me on Ubuntu, and is pretty much what I'd tried except I used 224 instead of __NR_gettid. Can this be merged into vdr, Klaus?
It already is in maintenance patch 1.4.1-5.
Klaus
Hi C
* Chris Elsworth (chris@shagged.org) wrote:
I'm trying to get vdr-1.4.0 built on Ubuntu. I'm using the source from the apt repository (apt-get source vdr).
Not sure how much they differ, but I'm rebuilding packages from www.e-tobi.net and they seem to build ok. I'd guess that something about edgy's toolchain has changed enough that the packages won't build on dapper, or they're just broken atm ;)
Cheers,