Samba pre-2.0.7 snapshot available.

Don Badrak dbadrak at tco.census.gov
Mon Jan 31 16:45:43 GMT 2000


On Sun, 30 Jan 2000 jeremy at valinux.com wrote:

> > I have trouble executing from IRIX 6.5.6f R4400.
> > 
> > compiling with no errors (a few warnings though) with gcc 2.8.1 and
> > gmake 3.76.
> > 
> > excepts from log.smb:
> > 
> > [2000/01/29 09:02:36, 0] locking/shmem_sysv.c:sysv_shm_open(593)
> >   ERROR semctl: can't IPC_STAT. Error was Bad address
> > [2000/01/29 09:02:36, 0] locking/locking.c:locking_init(174)
> >   ERROR: Failed to initialise share modes
> > [2000/01/29 09:02:36, 0] locking/shmem_sysv.c:sysv_shm_open(593)
> >   ERROR semctl: can't IPC_STAT. Error was Bad address
> > [2000/01/29 09:02:36, 0] locking/locking.c:locking_init(174)
> >   ERROR: Failed to initialise share modes
> 
> This is not specific to 2.0.7pre1. This is actually a known
> problem with gcc strcture passing conventions and IRIX 6.5.x.
> 
> Either compile with the SGI compiler or change includes/config.h
> to use MMAP rather than SYSV shared memory and it should work fine.
> 
> Bug Herb if you want the full details on this (I'm emailing from
> my crappy laptop on the road at the moment :-).


During my compiles of previous versions (2.0.5a and earliers), I put in a
quick hack for this.

A known problem with gcc on IRIX is in passing structures by value using
n32 objects (gcc 2.8 and later).  The alignment is wrong.  It should be
left aligned but ends up right aligned.

I use something like this (wherever the struct semun is used, in the
semaphore stuff):

 #ifdef USE_SYSV_IPC
+#ifdef SGI_SEMUN_HACK
+union semun_hack {
+        int val;
+        struct semid_ds *buf;
+        unsigned short *array;
+       char __dummy[5];
+};
+#define semun semun_hack
+#endif

The __dummy[5] forces the alignment left.  I then defined
-DSGI_SEMUMN_HACK.  A better name I suppose would be -DSGI_GCC_HACK_ALIGN,
but it works for me.

In 2.0.5a, this was in locking/shmem_sysv.c and locking/sysv_ipc.c.  I
haven't build 2.0.6 or 2.0.7pre1.

Might it be possible to add this to the autoconf?

Don
-- 
Don Badrak <dbadrak at census.gov>              301.457.8263 work
Telecommunications Office                    301.457.4438 fax
U.S. Bureau of the Census
Suitland MD, USA



More information about the samba-ntdom mailing list