This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

1.7.15 gcc post-install fails "altdir /etc/alternatives invalid"


Fresh install on this system.
Installer reports errors: on checking setup.log.full I see errors like

2013/04/11 11:07:36 running: C:\cygwin\bin\bash.exe --norc --noprofile
"/etc/postinstall/gcc4-fortran.sh"
altdir /etc/alternatives invalid
2013/04/11 11:07:36 abnormal exit: exit code=2
2013/04/11 11:07:36 running: C:\cygwin\bin\bash.exe --norc --noprofile
"/etc/postinstall/automake.sh"
altdir /etc/alternatives invalid

The error "altdir /etc/alternatives invalid" comes from the
"alternatives" command.
I get it when /etc/alternatives is empty or when it has valid symbolic
links.
The Fortran script:

12:14:12$ cat /etc/postinstall/gcc4-fortran.sh
/usr/sbin/update-alternatives \
    --install "/usr/bin/gfortran.exe" "gfortran"
"/usr/bin/gfortran-4.exe" 40 \
  --slave "/usr/bin/i686-pc-cygwin-gfortran.exe"
"i686-pc-cygwin-gfortran" "/usr/bin/i686-pc-cygwin-gfortran-4.exe" \
  --slave "/usr/share/man/man1/gfortran.1.gz" "gfortran.1.gz"
"/usr/share/man/man1/gfortran-4.1.gz" \



WORK AROUND
usr/sbin/update-alternatives was a symlink to usr/sbin/alternatives.exe.
I found the original update-alternatives Perl script and installed that.
Then I re-ran the post update scripts by hand (and renamed them .done by
hand).

Unfortunately the next install resets update-alternatives to be a
symlink, so this always has to be a manual process.

I guess you have the source for alternatives.exe on your site somewhere
- I couldn't find it on the Web.

Cheers ... Duncan.

Attachment: cygcheck.out
Description: cygcheck.out

Attachment: update-alternatives
Description: update-alternatives

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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