Unoffical empeg BBS

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

Topic Options
#134250 - 10/01/2003 10:12 problem compiling when using shm_open()
skibum
enthusiast

Registered: 27/03/2002
Posts: 248
Loc: Swindon, UK
I'm trying to write a program for my empeg. So I installed Mark Lord's prebuilt cross compiler. All worked fine.

My problem is trying to compile a program that uses shm_open(). I'm using gcc pshm.c -o pshm -lrt (as I would for i386).

The errors I'm getting are as if I've not specified the -lrt :-

$ gcc pshm.c -o pshm -lrt
pshm.c: In function `main':
pshm.c:24: warning: comparison between pointer and integer
/tmp/ccUpLN92.o: In function `main':
/tmp/ccUpLN92.o(.text+0x20): undefined reference to `shm_open'
/tmp/ccUpLN92.o(.text+0xcc): undefined reference to `shm_unlink'
collect2: ld returned 1 exit status

So I'm assuming that its not in librt for the arm version?

Anyone got any pointers? or just it just not exist on the empeg version of linux? (if so, back to ipcsysV)
_________________________
Andy MK2a 60GB Amber 040103916 32mb/Light Kit MK2a 50GB Amber 030102560 32mb

Top
#134251 - 10/01/2003 11:08 Re: problem compiling when using shm_open() [Re: skibum]
pim
addict

Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
I believe both the standard and hijack kernels are built without shared memory support.

You would have to compile your own kernel to get it in.

Pim

Top
#134252 - 10/01/2003 11:26 Re: problem compiling when using shm_open() [Re: pim]
skibum
enthusiast

Registered: 27/03/2002
Posts: 248
Loc: Swindon, UK
thanks for that Pim.

That said, I did really want to use posix shared memory and the fact I couldn't compile it just confused me.

As posix shared memory just uses mmap() which is supported seems odd I can't compile my little program.

Maybe I just need a newer librt.so?

I did a little sysV shared memory test and that failed as expected.


Edited by skibum (10/01/2003 11:32)
_________________________
Andy MK2a 60GB Amber 040103916 32mb/Light Kit MK2a 50GB Amber 030102560 32mb

Top
#134253 - 13/01/2003 17:15 Re: problem compiling when using shm_open() [Re: pim]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Yeah. SysV IPC is turned off in the stock and hijack kernels.
The libraries on your system for some reason doesn't have shm_open and shm_close. No idea why. I've not tried to use SHM on the Empeg.

- Trevor

Top