Subject: selection of compiler not quite correct on Solaris
To: None <tech-pkg@NetBSD.org>
From: Klaus Heinz <k.heinz.dez.fuenf@onlinehome.de>
List: tech-pkg
Date: 12/13/2005 03:21:05
Hi,

I just installed Sun Studio 11 and due to an older version I chose to
install it in /opt/studio11.

Afterwards I decided to deinstall the older version in order to avoid
any possible ambiguity. This revealed a flaw in the selection process
for the compiler.

There is no documentation how to choose one of several installed
versions of Sun compilers or how to tell pkgsrc about an unusual
installation path for the compiler. The makefile fragment
mk/compiler/sunpro.mk uses the variable SUNWSPROBASE with a default
of /opt/SUNWspro which always worked for me in the past. Today it could
not work and although my PATH included /opt/studio11/SUNWspro/bin and
I had PKGSRC_COMPILER=sunpro in mk.conf, pkgsrc came to the conclusion
I wanted to use gcc which ultimately failed because gcc could not be
found.

I propose we add an appropriate paragraph to the documentation:

  In case you have installed the Sun compiler in a directory other than
  the defautlt /opt/SUNWspro or if you want to choose between different
  installed versions you must set SUNWSPROBASE=/some/path/SUNWspro,
  including /some/path/SUNWspro/bin in your PATH variable is not
  sufficient.

At the moment, the documentation is split between
bootstrap/README.Solaris and doc/pkgsrc.txt. Any objections to merge
README.Solaris into the pkgsrc guide?

ciao
     Klaus