Bug #69

{i386,amd64,sparc,sparcv9}_LINT should point to /opt/sunstudio12.1

Added by Mike Gerdts over 3 years ago. Updated over 3 years ago.

Status:Rejected Start date:2010-08-21
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:- Spent time: -
Target version:-
Difficulty:Medium Tags:needs-triage

Description

The typical instructions that are found for building ON call for manual tweaking of {opensolaris,illumos}.sh to add i386_LINT and amd64_LINT definitions to point to the place where OpenSolaris IPS installs Studio 12.1.

A small tweak to Makefile.master should make this unnecessary.

lint.patch (1.7 kB) Mike Gerdts, 08/21/2010 07:49 pm

History

Updated by Rich Lowe over 3 years ago

The big problem here is that opensolaris has never had the concept of SPRO_ROOT, and opensolaris.sh has
historically set it incorrectly, and then overriden it with SPRO_VROOT anyway.

The annoyance here is that if you use an absolute path, it's totally impossible to customize. would setting SPRO_ROOT in illumos.sh to /opt (which is wrong), be a better fix, given that for any other use, it's overriden by SPRO_VROOT?

(I can't say I care much either way, I'm just hoping to not need an absolute path)

Updated by Garrett D'Amore over 3 years ago

Hmm... if you download the specific Studio 12u1 bits that are delivered for ON (which include patches), they install as a tarball, and you don't have to hack the installation directory. In fact, this is what I've done.

So I'm not sure this is precisely a bug.

Updated by Mike Gerdts over 3 years ago

The tarball that you refer to has Studio 12u1 + patches. The instructions say to untar that in /opt/SUNWspro.

$ /opt/SUNWspro/bin/cc -V
cc: Sun C 5.9 SunOS_i386 Patch 124868-10 2009/04/30
usage: cc [ options] files. Use 'cc -flags' for details

The version of lint that is required comes from Studio 12.1, which is delivered through IPS.

$ /opt/sunstudio12.1/bin/cc -V
cc: Sun C 5.10 SunOS_i386 2009/06/03
usage: cc [ options] files. Use 'cc -flags' for details

$ pkg search -l path:/opt/sunstudio12.1
INDEX ACTION VALUE PACKAGE
path dir opt/sunstudio12.1 pkg:/developer/

The Makefile.master assumes that $(SPRO_ROOT)/sunstudio12.1/bin/lint (i.e. /opt/SUNWspro/sunstudio12.1/bin/lint) exists, even though the most commonly published & referenced instructions do not cause that path to exist.

Updated by Garrett D'Amore over 3 years ago

  • Status changed from New to Rejected

So this is not a bug.

You untar the patched tarball in /opt/SUNWspro, and the links are correct. I'm rejecting this bug.

Updated by Jeppe Toustrup over 3 years ago

I would still call this a bug, since you have to overrule the path to lint or do some other change on your system, in order for the correct lint binary to be found. Why not change the defaults to create less work for people trying to build illumos?

If you follow the instructions available, where you untar sun studio 12 + patches in /opt/SUNWspro, and install the sunstudio12u1 package, then you will still have to overrule the i386_LINT and amd64_LINT variables, which I would consider a bug.

I see the following solutions to this:
  1. Change the sunstudio12u1 package to be installed at /opt/SUNWspro/sunstudio12.1.
  2. Change documentation to instruct you to make a symlink at /opt/SUNWspro/sunstudio12.1 which points to /opt/sunstudio12.1.
  3. Update the makefile to look in /opt/sunstudio12.1 for the lint binary by default.

I prefer option #3, since it would probably be the least work, and would set the default correct for everybody who simply follows the documentation on how to set up a build environment.

Updated by Rich Lowe over 3 years ago

Jeppe,

Updating illumos.sh to set the _LINT variables would be better, forcing it in the Makefile means studio has a to be in a given, fixed path, in a way that can't be overridden.

I agree this is a bug, but lack permission to de-reject it.

However, the instructions telling you to use the sunstudio12u1 package are incorrect, there is a patched tarball of that, also. (its existence doesn't change the nature of this being a bug, though.)

Also available in: Atom PDF