not sure if this is the correct forum but...

For all coding issues - MODers and programmers, HTML and more.

Moderators: Jeff250, fliptw

Post Reply
User avatar
Admiral LSD
DBB Admiral
DBB Admiral
Posts: 1240
Joined: Sun Nov 18, 2001 3:01 am
Location: Northam, W.A., Australia
Contact:

not sure if this is the correct forum but...

Post by Admiral LSD »

I'm having a little problem compiling the D1X source under Linux 2.6:

http://forums.gentoo.org/viewtopic.php?t=149616

Can anyone here shed some light on what might be wrong?
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Do you have the GGI sources? http://www.ggi-project.org/
User avatar
Admiral LSD
DBB Admiral
DBB Admiral
Posts: 1240
Joined: Sun Nov 18, 2001 3:01 am
Location: Northam, W.A., Australia
Contact:

Post by Admiral LSD »

OK, I installed those and after re-running make dep that cleared up the issue of it not being able to find the ggi headers it was after but now I get a whole new error message from around the same patch of code:

Code: Select all

/usr/include/ggi/input/xwin.h:35: error: syntax error before "gii_event"
and again, here's the bit of code I believe it's choking on:

Code: Select all

typedef int (gii_inputxwin_resizefunc)(void *arg, int w, int h, gii_event *ev);
Strange, I'm positive I didn't need the GGI stuff when I compiled this last time. Perhaps it was installed and I just didn't realise it.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Can you post more of the code from that header file? I don't feel like downloading the whole library. :)

Also, are there any other error messages generated by the compiler? Try commenting that line of the header file out and see if the syntax error disappears or just moves to a different line; if the error just moves around, line 35 isn't the problem, but something before it is.
User avatar
Admiral LSD
DBB Admiral
DBB Admiral
Posts: 1240
Joined: Sun Nov 18, 2001 3:01 am
Location: Northam, W.A., Australia
Contact:

Post by Admiral LSD »

Here is a link to the complete header file:

http://members.westnet.com.au/gweber/xwin.h
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Okay, I'm guessing that ggi_event isn't defined yet. Grep the files for the definition of ggi_event (grep "^typedef.*ggi_event" will probably work) and see if it is in a header file that #includes xwin.h.
User avatar
Admiral LSD
DBB Admiral
DBB Admiral
Posts: 1240
Joined: Sun Nov 18, 2001 3:01 am
Location: Northam, W.A., Australia
Contact:

Post by Admiral LSD »

gii_event is only called by one file in the entire source tree, arch/linux/ggi/event.c which includes xwin.h both explicitly toward the bottom and by including the event.h file that's pasted in the Gentoo thread. I've tried putting another #include line in there but it still bombs out.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Are you sure? gii_event is defined in ggi/events.h, and I did not find a single reference to this header file in either event.c or xwin.h that you posted here or event.h you posted at Gentoo.

Add the following line to event.h (the one on Gentoo), right below #ifdef GII_XWIN:

Code: Select all

#include <ggi/events.h>
User avatar
Admiral LSD
DBB Admiral
DBB Admiral
Posts: 1240
Joined: Sun Nov 18, 2001 3:01 am
Location: Northam, W.A., Australia
Contact:

Post by Admiral LSD »

Actually I wasn't. I searched through the entire source tree for gii_event as you suggested and only came up with the two references in event.c. In any case, adding that include line let it complete that part of the compile only to have it fail right after it. It's spews out a whole heap of messages relating to joystick support but I couldn't find anything in the defines.mak file that let you enable/disable it. Now I'm positive ixion had a similar problem with it a while back but I can't for the life of find the thread it was in to see how he fixed it, it must have gotten lost when the board was upgraded to phpbb.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Check ./configure --help for an option.

Also, can you post the error output here?
User avatar
Admiral LSD
DBB Admiral
DBB Admiral
Posts: 1240
Joined: Sun Nov 18, 2001 3:01 am
Location: Northam, W.A., Australia
Contact:

Post by Admiral LSD »

The D1X source doesn't have a configure script, just a file called defines.mak where you set all your options and nothing there looks like it relates to joystick support. Originally I thought it was an issue with SDL as that was the problem ixion was having but after I took the time to have a look at the error message properly it looks more like an incompatibility with the 2.6 kernel headers I'm using:

Code: Select all

In file included from /usr/include/linux/sched.h:18,
                 from /usr/include/linux/module.h:10,
                 from ../../arch/linux/include/joystick.h:11,
                 from joystick.c:3:
/usr/include/asm/semaphore.h:45: error: syntax error before "wait_queue_head_t"
/usr/include/asm/semaphore.h: In function `sema_init':
/usr/include/asm/semaphore.h:79: error: dereferencing pointer to incomplete type/usr/include/asm/semaphore.h:80: error: dereferencing pointer to incomplete type/usr/include/asm/semaphore.h:81: error: dereferencing pointer to incomplete type/usr/include/asm/semaphore.h: In function `down':
/usr/include/asm/semaphore.h:127: error: dereferencing pointer to incomplete type
/usr/include/asm/semaphore.h: In function `down_interruptible':
/usr/include/asm/semaphore.h:154: error: dereferencing pointer to incomplete type
/usr/include/asm/semaphore.h: In function `down_trylock':
/usr/include/asm/semaphore.h:182: error: dereferencing pointer to incomplete type
/usr/include/asm/semaphore.h: In function `up':
/usr/include/asm/semaphore.h:209: error: dereferencing pointer to incomplete type
In file included from /usr/include/linux/sched.h:21,
                 from /usr/include/linux/module.h:10,
                 from ../../arch/linux/include/joystick.h:11,
                 from joystick.c:3:
/usr/include/asm/mmu.h: At top level:
/usr/include/asm/mmu.h:13: error: field `sem' has incomplete type
In file included from /usr/include/asm/siginfo.h:4,
                 from /usr/include/linux/signal.h:7,
                 from /usr/include/linux/sched.h:25,
                 from /usr/include/linux/module.h:10,
                 from ../../arch/linux/include/joystick.h:11,
                 from joystick.c:3:
/usr/include/asm-generic/siginfo.h:72: error: syntax error before "clock_t"
/usr/include/asm-generic/siginfo.h:89: error: syntax error before '}' token
/usr/include/asm-generic/siginfo.h:90: error: syntax error before '}' token
In file included from /usr/include/linux/sched.h:29,
                 from /usr/include/linux/module.h:10,
                 from ../../arch/linux/include/joystick.h:11,
                 from joystick.c:3:
/usr/include/linux/completion.h:15: error: syntax error before "wait_queue_head_t"
/usr/include/linux/completion.h: In function `init_completion':
/usr/include/linux/completion.h:26: error: dereferencing pointer to incomplete type
/usr/include/linux/completion.h:27: error: dereferencing pointer to incomplete type
In file included from /usr/include/linux/sched.h:30,
                 from /usr/include/linux/module.h:10,
                 from ../../arch/linux/include/joystick.h:11,
                 from joystick.c:3:
/usr/include/linux/pid.h: At top level:
/usr/include/linux/pid.h:18: error: field `task_list' has incomplete type
/usr/include/linux/pid.h:19: error: field `hash_chain' has incomplete type
/usr/include/linux/pid.h:24: error: field `pid_chain' has incomplete type
In file included from /usr/include/linux/sched.h:102,
                 from /usr/include/linux/module.h:10,
                 from ../../arch/linux/include/joystick.h:11,
                 from joystick.c:3:
/usr/include/linux/timer.h:11: error: field `entry' has incomplete type
In file included from ../../arch/linux/include/joystick.h:11,
                 from joystick.c:3:
/usr/include/linux/module.h:214: error: field `list' has incomplete type
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Yeah, the problem probably doesn't lie with D1x if it's complaining about the source code for semaphores. Would you be adverse to compiling a 2.4 kernel for playing D1x?
User avatar
Admiral LSD
DBB Admiral
DBB Admiral
Posts: 1240
Joined: Sun Nov 18, 2001 3:01 am
Location: Northam, W.A., Australia
Contact:

Post by Admiral LSD »

I can't really use a 2.4 kernel anymore as it'll break my NPTL enabled glibc but thankfully it's not the kernel that's causing the problems it's the kernel headers in /usr/include/linux. I might just be able to get away with unmerging the 2.6 set, merging some 2.4 ones in temporarily and compiling d1x before putting the 2.6 headers back without disturbing glibc. I might try that later.
Post Reply