Also, you should probably report this to the IPC::SysV maintainer
–
bdonlanJun 22 '11 at 19:54

It seems that IPC::SharedMem->new() fails with an invalid argument because shmget() fails. The shmget definition is int shmget(key_t key, size_t size, int shmflg);, just as the new() constructor. Something goes wrong, maybe with the shmflg parameter... How old is your kernel? Have you tried to build on a more recent kernel?
–
Marco De LellisJun 22 '11 at 20:43