Dave Korn wrote: > LOLWUT? It turns out something has gone horribly wrong in the alternatives > department now: > > $ gcc > bash: gcc: command not found > > $ gcc.exe > bash: gcc.exe: command not found > > $ file /bin/gcc.exe > /bin/gcc.exe: broken symbolic link to `/etc/alternatives/gcc' > > $ ls /etc/alternatives/gcc -la > lrwxrwxrwx 1 DKAdmin None 3 Apr 6 04:29 /etc/alternatives/gcc -> ??/ > > $ /usr/sbin/alternatives.exe --help > > $ echo $? > 128 > > $ > > And, right; alternatives.exe needs the ctype_ptr import. And I'll bet that > p7zip doesn't use any ctype functions. It looks like if you want to revert > back across the change, you need to revert any/all of these as well: > > cygwin > m4 > alternatives
Actually, from Corinna's reply, it appears that, in addition to reverting *alternatives* because of the dependence that the new -10 package has on the the cygwin-1.7.0-45 ctype export, you may also need to revert any package that USES alternatives (or, at least, run /usr/sbin/alternatives to recreate the symlinks using the "old" method) alternatives, when it is installed or reinstalled, does not create any symlinks. It's only when it is /used/ that that happens. Now, if you upgrade (say) gcc4 while you have cygwin-1.7.0-45 installed, then that process has two parts: 1) uninstall the old version This will run '/usr/sbin/alternatives --remove' on the version of gcc that your are upgrading. Assuming your gcc system was already set to have gcc4 as the default (as I suspect DK's system is), then this has the effect of recreating all of the symlinks in /etc/alternatives to point to the gcc3 versions. Since you have cygwin-1.7.0-45, these (now) become UTF16 symlinks. 2) install the new version This will run '/usr/sbin/alternatives --add' on the new gcc4. However, because the current "priority" of gcc4 under alternatives is below gcc3, nothing will change, until you... 3) manually run '/usr/sbin/alternatives' to reset (in DK's likely case) gcc to be gcc4. Again, this will re-create the symlinks in /etc/alternatives to point at gcc4 (and, again, because you have cygwin-1.7.0-45 installed, these will be UTF16 symlinks. My suggestion with regards to this, and rolling back across the -45/-44 ABI break, is to manually execute all of: /etc/preremove/gcc.sh.done /etc/preremove/gcc-g77.sh.done /etc/preremove/gcc-g++.sh.done ( and others, depending on what components of gcc3 you have installed ) /etc/preremove/gcc4.sh.done /etc/preremove/gcc4-g77.sh.done /etc/preremove/gcc4-g++.sh.done ( and others, depending on what components of gcc4 you have installed ) Then, roll back both alternatives and cygwin (and vim, and...). Next, manaully execute all of: /etc/postinstall/gcc.sh.done /etc/postinstall/gcc-g77.sh.done /etc/postinstall/gcc-g++.sh.done ( and others, depending on what components of gcc3 you have installed ) /etc/postinstall/gcc4.sh.done /etc/postinstall/gcc4-g77.sh.done /etc/postinstall/gcc4-g++.sh.done ( and others, depending on what components of gcc4 you have installed ) And finally, (if you're DK), /usr/sbin/alternatives --set "gcc" "/usr/bin/gcc-4.exe" /usr/sbin/alternatives --set "g++" "/usr/bin/g++-4.exe" /usr/sbin/alternatives --set "g77" "/usr/bin/g77-4.exe" ( and others, depending on what components of gcc4 you wish to have be the default ) > diffstat > vim > xxd > So, IIUC, alternatives-1.3.30c-10 isn't *itself* actually broken, right? -- Chuck -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/