This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc 3.0.1 does not work on Solaris 8/sparc


On Thu, Sep 06, 2001 at 08:29:14PM -0700, Mark Mitchell wrote:
> > For the one in /usr/ucb, the order of the flags becomes important.
> >
> > /usr/bin/ln -s -f /usr/bin somelink  (works)
> > /usr/bin/ln -f -s /usr/bin somelink  (works)
> > /usr/ucb/ln -s -f /usr/bin somelink  (does not work)
> > /usr/ucb/ln -f -s /usr/bin somelink  (works)
> 
> OK.  That suggests that writing `$(LN_S) -f' anywhere is probably
> a mistake; we need an autoconf test to get us an LN_SF that works.

I don't think so. The problem is if the link *already* exists. If it
does, ln will fail, regardless of whether or not ln is in /usr/bin,
/usr/xpg4/bin, or /usr/ucb, and regardless of the order. Hence, the rm
before the ln.

I just tried the following on Solaris 8/SPARC:
  $ touch /tmp/a
  $ /bin/ln -s -f /tmp/a /tmp/b
  $ ls -ld /tmp/b
  lrwxrwxrwx   1 china    china          6 Sep  6 23:23 /tmp/b -> /tmp/a
  $ /bin/ln -s -f /tmp/a /tmp/b
  ln: cannot create /tmp/b: File exists
  $ /usr/ucb/ln -f -s /tmp/a /tmp/b
  ln: /tmp/b: File exists
  $ /usr/xpg4/bin/ln -s -f /tmp/a /tmp/b
  ln: cannot create /tmp/b: File exists

Try this with GNU ln and it works:
  $ gln -s -f /tmp/a /tmp/b
  $ ls -ld /tmp/b
  lrwxrwxrwx   1 china    china          6 Sep  6 23:23 /tmp/b -> /tmp/a

I think someone will only see this failure if they are installing gcc
on top of another installation. I compiled 3.0 and 3.0.1 into a
*separate* --prefix and did not see any error from make install.

-- 
albert chin (china@thewrittenword.com)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]