Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#63773 - 27/01/2002 20:08 Cross compiler header problem
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Can someone point out what I'm missing here? I'm using mlord's pre-compiled tool-chain. I have the following program (this is the whole thing):
#include <asm/semaphore.h>

main(){}
and when I compile it, I get the following errors (these are just the first of many)
In reply to:

compiler error][root@linuxbox source]# gcc z.c
In file included from z.c:1:
/usr/local/armtools-empeg/lib/gcc-lib/arm-empeg-linux/2.95.3/../../../../arm-empeg-linux/include/asm/semaphore.h:17: parse error before `wait_queue_head_t'
/usr/local/armtools-empeg/lib/gcc-lib/arm-empeg-linux/2.95.3/../../../../arm-empeg-linux/include/asm/semaphore.h:17: warning: no semicolon at end of struct or union
/usr/local/armtools-empeg/lib/gcc-lib/arm-empeg-linux/2.95.3/../../../../arm-empeg-linux/include/asm/semaphore.h: In function `sema_init':
/usr/local/armtools-empeg/lib/gcc-lib/arm-empeg-linux/2.95.3/../../../../arm-empeg-linux/include/asm/semaphore.h:46: dereferencing pointer to incomplete type




(using code blocks makes the errors too long)
_________________________
--The Amigo

Top
#63774 - 27/01/2002 20:16 Re: Cross compiler header problem [Re: TheAmigo]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
That would tend to mean that wait_queue_head_t wasn't defined, but it's defined in <linux/wait.h>, which is included from <asm/semaphore.h>. Odd. Maybe you can make sure that <linux/wait.h> exists and has that definition in it?
_________________________
Bitt Faulk

Top
#63775 - 27/01/2002 20:55 Re: Cross compiler header problem [Re: TheAmigo]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Nevermind, figured it out. I had to define __KERNEL__ for the necessary section of code to be included.

_________________________
--The Amigo

Top
#63776 - 28/01/2002 07:26 Re: Cross compiler header problem [Re: TheAmigo]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14479
Loc: Canada
Funny.. my toolchain does NOT have a command called "gcc" in it.

Or perhaps you've added aliases/symlinks or just renamed things. If not, then you're using the wrong compiler.

Cheers

Top
#63777 - 28/01/2002 20:20 Re: Cross compiler header problem [Re: mlord]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Yeah, I symlinked it because my fingers are too used to typing gcc
_________________________
--The Amigo

Top
#63778 - 28/01/2002 21:23 Re: Cross compiler header problem [Re: TheAmigo]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14479
Loc: Canada
Okay. Just be careful that this isn't the source of your woes..

When building binaries like this, I sometimes create symlinks for EVERYTHING in the ?????/bin directory, and dump it at the head of the PATH.

Cheers

Top
#63779 - 29/01/2002 17:48 Re: Cross compiler header problem [Re: mlord]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Yep, I made symlinks for all of 'em. I have an alias called "empeg" that prepends the armtools bin dir to my path. I have another alias called "tivo" that prepends my ppc toolchain's bin dir to my path. Having them as aliases, by default "gcc" runs my native compiler.

Right now, what I'm interested in doing is setting up a working IrCOMM connection to the empeg. I've got IrCOMM set up on my Win98 box through an external IR dongle. I can run a terminal program to COM4 (the virtual com port provided by my Windows IrCOMM driver) and point the dongle at the empeg (currently about 4 inches away). But I still have some work to do on the empeg side. Do you have IrCOMM support already compiled into hijack or do I need to compile my own modules and load them? I noticed that I don't have a /proc/modules so I can't tell what modules are loaded.
_________________________
--The Amigo

Top
#63780 - 29/01/2002 19:18 Re: Cross compiler header problem [Re: TheAmigo]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14479
Loc: Canada
No irda in hijack.

No modules support in the kernel.

Cheers

Top