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

Duncan Roe droe@mintec.com.au
Thu Apr 11 05:11:00 GMT 2013


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 22100 bytes
Desc: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20130411/ee2fdf68/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: update-alternatives
Type: application/octet-stream
Size: 16046 bytes
Desc: update-alternatives
URL: <http://cygwin.com/pipermail/cygwin/attachments/20130411/ee2fdf68/attachment-0001.obj>
-------------- next part --------------
--
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


More information about the Cygwin mailing list