Closed Bug 522 Opened 26 years ago Closed 26 years ago

Missing includes and build problems on OSF1 4.0

Categories

(MozillaClassic Graveyard :: Berkeley DB, defect, P3)

1998-07-28
DEC
All

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: bob+mozilla, Assigned: briano)

Details

Created by Bob McElrath (mcelrath@isp.nwu.edu) on Saturday, August 8, 1998 8:26:05 AM PDT
Additional Details :
include/mcom_db.h needs system include endian.h, which is in
/usr/sys/include/arch/alpha.  Can be fixed by adding the
line:

OS_INCLUDES             = -I/usr/sys/include/arch/alpha

to config/OSF1.mk

also:

running gmake in the dbm/src directory (after fixing the
above problem):
cc -ieee_with_inexact -std1 -o OSF1V4.0_OPT.OBJ/h_page.o -c
-DXP_UNIX -O -Olimit 4000 -taso -D_ALPHA_ -DIS_64 -DOSF1
-DOSF1V4 -D_REENTRANT -DHAVE_LCHOWN -DNEED_CDEFS_H
-DNTOHL_ENDIAN_H -DNEED_IOCTL_H -DMACHINE_ENDIAN_H
-DHAVE_VA_LIST_STRUCT -DNEED_BYTE_ALIGNMENT -DMITSHM
-DNEED_REALPATH -DHAVE_WAITID -DNEED_H_ERRNO
-DNEED_SYS_TIME_H -DHAVE_SYSTEMINFO_H -DNEED_SYS_PARAM_H
-DHAVE_INT32_T -DODD_VA_START -DHAVE_REMAINDER
-DSW_THREADS   -UDEBUG -DNDEBUG -DTRIMMED -DNSPR20
-DNETSCAPE -DOSTYPE=\"OSF1V4\" -DMOZILLA_CLIENT -DEDITOR
-DMOZ_COMMUNICATOR_IIDS -DNO_SECURITY -DEDITOR -DEDITOR_UI
-DLAYERS -DUNIX_EMBED -DX_PLUGINS -DUNIX_LDAP -DNSPR -DMOCHA
-DUNIX_ASYNC_DNS -DDEVELOPER_DEBUG -DMEMMOVE
-D__DBINTERFACE_PRIVATE  -DNSPR20=1   -I../../include
-I/usr/sys/include/arch/alpha
-I../../dist/OSF1V4.0_OPT.OBJ/include -I../include
h_page.c
cc: Error: h_page.c, line 1160: In this statement,
"SIG_BLOCK" is not declared.
        (void)sigprocmask(SIG_BLOCK, &set, &oset);
--------------------------^
cc: Error: h_page.c, line 1171: In this statement,
"SIG_SETMASK" is not declared.
        (void)sigprocmask(SIG_SETMASK, &oset, (sigset_t
*)NULL);
--------------------------^
gmake: *** [OSF1V4.0_OPT.OBJ/h_page.o] Error 1

I can clearly see that signal.h is included, and that
SIG_BLOCK and SIG_SETMASK are defined.  I suspect something
odd is happening in the 1000-odd lines between #include
<signal.h> and the lines on which the error occurs.

running:
cpp h_page.c -I../../include -I/usr/sys/include/arch/alpha
-I../../dist/OSF1V4.0_OPT.OBJ/include -I../include | grep
SIG
gives:
        (void)sigprocmask(SIG_BLOCK, &set, &oset);
        (void)sigprocmask(SIG_SETMASK, &oset, (sigset_t
*)0L);
So clearly the pre-processor is failing.  (Fails for both
DEC's cpp and gcc -E version 2.7.2.3)
I've taken care of the mozilla/config/OSF1.mk change.  Our DEC machines
all have /usr/include/alpha linked to /usr/sys/include/arch/alpha, so
I hope that will work for you.  The rest of this bug (I think) belongs
to Lou.
I've taken care of the mozilla/config/OSF1.mk change.  Our DEC machines
all have /usr/include/alpha linked to /usr/sys/include/arch/alpha, so
I hope that will work for you.  The rest of this bug (I think) belongs
to Lou.
Assignee: montulli → dp
Was lou's bug, assigning to dp for lack of anyone better.
Setting all current Open Critical and Major to M3
Assignee: dp → spence
Status: ASSIGNED → NEW
OS: All
Assignee: spence → briano
brian is all over the build situation. also, since this bug is
pretty old, it might be INVALID ...
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
I think this is invalid now.  I still can't build successfully on
OSF/1 4.0D, but this problem doesn't seem to have anything to do
with the current incarnation of the Mozilla tree.

BTW: There is a (test) Tinderbox build for this platform running at:

http://cvs-mirror.mozilla.org/webtools/tinderbox/showbuilds.cgi?tree=MozillaTest

(if anyone cares....)
Status: RESOLVED → VERIFIED
Marking Verified/Invalid.
I'm sorely tempted to reopen this bug.  I experience it myself right now.
When I attempt to build dbm on OSF/1, I get the same error reported in
this bug, namely that SIG_BLOCK and SIG_SETMASK are not defined.
If someone can build mozilla's DBM on OSF1V4.0, I'd like to see
what their cc command looks like that builds h_page.c

The problem is that in DEC's <signal.h> file, these symbols are only
defined if _POSIX_C_SOURCE >= 1.  That symbols is not defined in our 
builds. Defining it causes many other things to break.  The "uint" type
ceases to be defined, for example.  

BTW, Netscape/iPlanet's copy of the dbm sources contain a hack which
works around the problem when OSF1V4D is defined by simply defining
the two missing symbols. That hack is not in the mozilla tree.
I can build iPlanet's copy of the dbm sources on OSF1, but not mozilla's copy.
Proposed patch to dbm/src/h_page.c follows.  
This is essentially the same hack now in iPlanet's dbm sources.
dbm builds for me on OSF1 with this patch.

===================================================================
RCS file: /cvsroot/mozilla/dbm/src/h_page.c,v
retrieving revision 3.13
diff -r3.13 h_page.c
109a110,119
> #if defined(OSF1V4D) && !defined(SIG_BLOCK)
> /* OSF1 V4.0D's signal.h only defines these symbols when _POSIX_C_SOURCE >= 1
>  * Defining _POSIX_C_SOURCE breaks lots of other stuff.
>  * Including ncompat.h causes multiply defined symbols.
>  * So, we define them here for OSF1, even though we'd rather not.
>  */
> #define SIG_BLOCK       1
> #define SIG_SETMASK     3
> #endif
> 
Nelson,

That's the wrong fix.  The problem is the
-I/usr/sys/include/arch/alpha compiler option.
That was an attempt to make #include <endian.h>
work on OSF1.  The correct way is to say
#include <machine/endian.h>, which has been
checked in mozilla/dbm/include/mcom_db.h.

Use this patch.
Index: mozilla/security/dbm/src/Makefile
===================================================================
RCS file: /cvsroot/mozilla/security/dbm/src/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile    2001/05/08 23:31:07     1.2
+++ Makefile    2001/06/06 05:55:29
@@ -66,10 +66,6 @@
 # (6) Execute "component" rules. (OPTIONAL)                           #
 #######################################################################

-ifeq ($(OS_CONFIG),OSF1V4.0D)
-INCLUDES       += -I/usr/sys/include/arch/alpha
-endif
-
 #######################################################################
 # (7) Execute "local" rules. (OPTIONAL).                              #
 #######################################################################
Thanks Wan-Teh,  I checked your change in on the trunk.
You need to log in before you can comment on or make changes to this bug.