Subject: 'hostname' and installing gcc3-c-3.3.3 on Solaris 9
To: Ralf-P. Weinmann <email@example.com>
From: John D. Baker <firstname.lastname@example.org>
Date: 03/04/2004 13:00:14
On Thu, 4 Mar 2004, Ralf-P. Weinmann wrote:
> Help heard.
> The error message may look slightly misleading. What you are being told is
> *NOT* that the system cannot find /usr/bin/env but that something incorrect
> is passed to /usr/bin/env. Have a look at the post-install-script target in
> mk/bsd.pkg.install.mk in your pkgsrc tree. From the above it looks like that
> is where your install is failing.
> Try setting your PKG_DEBUG_LEVEL to 2 in mk.conf to see what commands are
> executed or if you're machocistic, truss -t open,exec -f make install to
> see what's going on ;)
I had already tried again before this message came, but if something
goes awry again, I shall defintely make use of your suggestions.
Shortly after my initial attempts to install gcc3-3.3.3, I started having
other widespread problems with the machine. They were now familiar, as I
have had to deal with them before...
My workstation had had it's name changed to '-s'!
It seems that somewhere in the install scripts, 'hostname -s' is invoked.
While this is perfectly acceptable on NetBSD (and presumably other *BSDs
and on linux), it is quite disastrous on Solaris. Solaris' hostname
(/usr/bin/hostname) has no options and any argument given is presumed to
be the _new name_ of the machine if the user is root.
So, after I authenticate as root to install gcc-c-3.3.3, it at some
point ran 'hostname -s', changing the machine's name to '-s'. Then all
manner of things start to break--primarily that I lost access to my own
display, and any automounted filesystems that timed out could no-longer
I put a quickie wrapper around /usr/bin/hostname to strip out any '-s'
option and cause it to return what was expected. I have since built
and successfully installed gcc-c-3.3.3 using the older gcc-3.3 that was
in pkgsrc about a month ago. Since then, I've used the just-installed
gcc-c-3.3.3 to build the c++ and f77 compilers. It's now starting on
the java compiler (which I wasn't able to build when 3.3.2 was the
current lang/gcc3 version).
There are several other packages in 'pkgsrc' which have potentially
catasrophic effects on Solaris systems due to their usage of
'hostname -s' in their install sections, but I don't recall now which
John D. Baker, KN5UKS NetBSD Darwin/MacOS X
jdbaker(at)mylinuxisp(dot)com OpenBSD FreeBSD
BSD -- It just sits there and _works_!