Solaris/SparcWorks 1.5.2 build

john.osullivan at chase.com.bbs john.osullivan at chase.com.bbs
Thu Jul 13 08:20:04 EDT 2000


I did a build and install of Python 1.5.2 on my Solaris box
recently. I'm running Solaris 2.6 on an Ultra 5, with
SparcWorks 4.2 C and C++ compilers. I ran across some
gotchas which I thought I'd document. Others, who like
me are working in a corporate environment where gcc
and gmake aren't available, may find them handy. If you're
trying to build with SparcWorks C/C++ and Solaris
make you may well run into gotchas 1 to 3. Number
4 is a really bizarre one which is quite improbable -
I wrote it down 'cos I enjoy winkling out a good bug...

JOS 2000-07-13 (john.osullivan at chase.com)


1. Run configure to build without gcc and with support for
threading...

./configure --without-gcc --with-thread

2. Make sure your path picks up the SparcWorks C and C++
compilers first, before /usr/ucb. My SparcWorks is in
/dvl/sw/SUNWspro_4.2/bin. If you pick up /usr/ucb/cc first
you will get something like...

{dvcls105_le0:38} ./configure --without-gcc --with-thread
loading cache ./config.cache
checking MACHDEP... sunos5
checking CCC...
checking for --without-gcc... yes
checking for gcc... (cached) cc
checking whether the C compiler (cc  ) works... no
configure: error: installation or configuration problem: C compiler
cannot create executables.

If you get this you can check whether the problem is caused by
/usr/ucb/cc like so...

{dvcls105_le0:34} cc
/usr/ucb/cc:  language optional software package not installed
{dvcls105_le0:35} ls -l /usr/ucb/cc
-r-xr-xr-x   1 bin      bin         3084 Jul 16  1997 /usr/ucb/cc

3. Make sure that DEFS includes -D_REENTRANT -mt in the
Makefiles...

DEFS=           -DHAVE_CONFIG_H -D_REENTRANT -mt

You need this for multithreading - which you will need
if you want to run, for instance, Zope.

4. Look out for Solaris make's implicit rules kicking in. The
implicit rules live in /usr/share/lib/make/make.rules. They
can cause the invocation of, among other things, sccs and
yacc. I experienced a particularly bizarre interaction
since I had a PROJECTDIR environment var set. sccs looks
for an SCCS subdirectory below the dir pointed to by
PROJECTDIR, and mine just happened to have an old
history file called s.parser.y, which got recovered
by an implicit rule in /usr/share/lib/make/make.rules
and passed through yacc to overwrite parser.c. The output
below was generated by 'make -d'. The "parser.y" prefixing
the C compiler error reports was caused by a preprocessor
directive in parser.y and the generated parser.c

 -O -I./../Include -I.. -DHAVE_CONFIG_H -D_REENTRANT -mt  -c  node.c
   Building pgen because it is out of date relative to node.o
      Sccs getting parser.y because s. file is younger than source file
sccs  get -s parser.y -Gparser.y
     Building parser.c using suffix rule for .y.c because it is out of
date relative to parser.y
yacc  parser.y
mv y.tab.c parser.c
    Building parser.o because it is out of date relative to parser.c
    Building parser.o using suffix rule for .c.o because it is out of
date relative to parser.c
cc -O -I./../Include -I.. -DHAVE_CONFIG_H -D_REENTRANT -mt  -c  parser.c
"parser.y", line 12: cannot find include file: <cmacros.h>
"parser.y", line 26: undefined or not a type: cmd_descriptor
"parser.y", line 26: syntax error before or at: *
"parser.y", line 26: warning: old-style declaration or incorrect type
for: cursource
"parser.y", line 27: undefined or not a type: cList
"parser.y", line 27: syntax error before or at: *
"parser.y", line 27: warning: old-style declaration or incorrect type
for: curargs




Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list