Bug 2144 - Samba 3.0.8/3.0.9 compile failure under Tru64 Unix 4.0g
Samba 3.0.8/3.0.9 compile failure under Tru64 Unix 4.0g
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
3.0.9
Alpha OSF/1
: P3 regression
: none
Assigned To: Tim Potter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-10 09:59 UTC by Scott McAskill
Modified: 2006-04-14 14:53 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott McAskill 2004-12-10 09:59:55 UTC
Samba 3.0.8/3.0.9 compile failure under Tru64 Unix 4.0g. Running make fails as 
follows for either Samba version:
.
.
.
----------------------------------------------------^
cc: Info: include/proto.h, line 6731: In this declaration, type "unsigned long l
ong" is a language extension. (longlongtype)
int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len);
-----------------------------------------------^
cc: Info: lib/util_file.c, line 171: In this declaration, type "unsigned long lo
ng" is a language extension. (longlongtype)
SMB_BIG_UINT getfilepwpos(void *vp)
^
cc: Info: lib/util_file.c, line 173: In this statement, type "unsigned long long
" is a language extension. (longlongtype)
        return (SMB_BIG_UINT)sys_ftell((FILE *)vp);
----------------^
cc: Info: lib/util_file.c, line 181: In this declaration, type "unsigned long lo
ng" is a language extension. (longlongtype)
BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok)
----------------------------^
cc: Error: lib/util_file.c, line 458: In this statement, "p" and "(-1)" cannot b
e compared for equality or inequality. (noequality)
        if (p == MAP_FAILED) {
------------^
*** Exit 1
Stop.
#
Comment 1 Peter Marquardt 2005-02-05 04:42:28 UTC
As far as I found out this bug was introduced first in 3.0.8 through switching
from Autoconf 2.53 to Autoconf 2.59. The later autoconf generates Makefiles for
Tru64 4.0[fg] which use "CC=cc -std1" instead of "CC=cc".

-std1 handles comparisms a little bit tougher (well too tough is this case) and
so samba stumbles over the definition of MAP_FAILED (-1L) in
/usr/sys/include/sys/mman.h . this "should" be defined to ((void *)-1L).
lib/util_file.c does this for you, but since it already has been defined in
.../sys/mman.h it ignored. The same problem appears in tdb/tdb.c

Since I dunno much about autoconf/configure (besides I hate it) I cannot supply
a proper patch to fix this, but I'm confident someone here will 8)

So to fix this, some developers should 

   * ignore the system supplied definition of MAP_FAILED
   * redefine MAP_FAILED to ((void *)-1L)

or patch lib/util_file.c and tdb/tdb.c to reflect this.


Comment 2 Gerald (Jerry) Carter 2006-04-14 14:53:24 UTC
Please retest against a current release and reopen if the issue is still present.