|
Subject: |
More on building Epics on Solaris |
|
From: |
[email protected] (Nick Rees) |
|
Date: |
Tue, 9 May 95 12:37:36 HST |
More experiences with building Epics on Solaris....
I sent out a message about compiling Epics on Solaris in native mode a
few weeks ago. This is a few more experiences including some more of
the extensions, building on Solaris 2.4 (instead of 2.3) and a bit more
time thinking about it.
1. Redundant include files in base/include.
I have can't find any references to the following include files in the
base directory tree:
alarmString.h
ht2992.h
sydDefs.h
Should they be moved to the extensions tree, or deleted?
2. Library dependencies in extensions.
Currently, when a library is used by more than one extension, it
usually appears in the source tree of one extension or the other. This
can lead to it being impossible to have a clean build since you may not
have all the external files required to build the extension, but you
have enough to build the library you want.
I would suggest that any library that is used by more than one
extension be treated as a separate extension in its own right. This
would avoid the problem.
The case I encountered was the syd library. On Solaris 2.3 I didn't
have Motif, so I couldn't build libUnix, but needed syd for edd/dm.
3. Problem with blderrSymTbl
This turned out to be a known problem and it didn't work for Solaris
2.4. Janet has the fix provided by Andrew Johnson of RGO.
4. CMPLR = STRICT option
I have started building Solaris releases using the CMPLR=STRICT option
as default. This appears to work, so I would recommend it.
I started doing this is because of a feature of the Solaris compiler
which causes problems with the X libraries.
Basically, a a few of the Solaris X header files rely on __STDC__ being
defined to be non zero for ANSI compilers. One of the examples is in
Xmd.h:
#if __STDC__ && !defined(UNIXCPP)
#define _SIZEOF(x) sz_##x
#define SIZEOF(x) _SIZEOF(x)
#else
#define SIZEOF(x) sz_/**/x
#endif /* if ANSI C compiler else not */
However, the -Xa option of the Sun Solaris compiler sets __STDC__ to 0,
which results in the compiler including the wrong options with the
warning message:
"/usr/openwin/include/X11/Xmd.h", line 67: warning: comment does not concatenate tokens
I must admit that this problem doesn't cause any hard errors that I am
aware of, but I am also happier using the strict option, if I can get
away with it.
The only change that was required for base to compile with CMPLR=STRICT
is that the value SYSV has to be defined. This caused a problem in one
of the header files when compiling dct. I did this by changing the
reference to SVR4 in the CONFIG.Unix.solaris to a reference to SYSV.
i.e.:
OP_SYS_FLAGS = -DUNIX -DSYSV
I could not find any reference to SVR4 in the release and I often found
a reference to SYSV. I consider the original SVR4 reference to be an
error. I would be interested to hear from Andrew why he chose it - it
appears to be against convention.
As to the extensions, I have compiled ca, cau, libUnix, medm and opi.
Medm used the dummy XrtGraph stubs from Tony Cox.
The opi version was a version of opi Release 2 that I got directly from
Los Alamos. There were quite a number of changes and I suggest you get
the updated version from Bob.
For the other extensions the diffs from the file Janet provided with
beta 12 (extensions_04_13_95.Tar.Z) are:
===================================================================
RCS file: /usr/local/cvsroot/epics/extensions/src/ca/cafunc.c,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 cafunc.c
195c195
< #if defined(HP_UX)
---
> #if defined(HP_UX) || defined(SYSV)
===================================================================
RCS file: /usr/local/cvsroot/epics/extensions/src/medm/medm/displayList.h,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 displayList.h
72c72,76
< #include <strings.h>
---
> #ifdef SYSV
> # include <string.h>
> #else
> # include <strings.h>
> #endif
cvs diff: Diffing extensions/src/medm/xc
===================================================================
RCS file: /usr/local/cvsroot/epics/extensions/src/medm/xc/Matrix.c,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 Matrix.c
48c48
< #ifdef sun
---
> #ifdef sun && !defined(SYSV)
===================================================================
RCS file: /usr/local/cvsroot/epics/extensions/src/medm/xc/MeterP.h,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 MeterP.h
36a37,39
> #if !defined( M_PI )
> #define M_PI 3.14159265358979323846
> #endif
Nick Rees
Joint Astronomy Centre Ph: +1 (808) 961-3756
660 N. Aohoku Place Fax: +1 (808) 961-6516
Hilo, HI. 96720 Internet: [email protected]
- Navigate by Date:
- Prev:
Re: Recommended setting for XyCom 566 Analog input module? Andrew Johnson
- Next:
Re: Recommended setting for XyCom 566 Analog input module? 415
- Index:
1994
<1995>
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
- Navigate by Thread:
- Prev:
Re: Recommended setting for XyCom 566 Analog input module? 415
- Next:
subscribe Hide Mizuno
- Index:
1994
<1995>
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
|