How to install gcc and g++ 6 on cygwin which are not on the setup.exe

Csaba Raduly rcsaba@gmail.com
Sun May 19 08:37:00 GMT 2019


On Sun, May 19, 2019 at 4:57 AM Jack  wrote:
>
> On 5/18/19 9:24 PM, Jose Isaias Cabrera wrote:
> > How do I uninstall the installation that I created with the building of gcc6? I did a search on duckduckgo for,
> >
> > cygwin how to uninstall gcc after building it
> >
> > and found nothing that could help me.  Right now I have two installs of gcc: v7.4.and v6.4.0.

That is not necessarily a problem. "Hand-built" GCC usually gets
installed into /usr/local (so g++-6 is /usr/local/bin/g++), whereas
the built-in GCC is installed into /usr (so the default GCC 7.4 is
/usr/bin/g++). Unfortunately, whether one or the other is picked
depends on your PATH.

I tend to configure my hand-built GCC with --program-suffix= (e.g. GCC
6 with --program-suffix=-6, so the name of the compiler ends up being
g++-6).

> If you did "make install" then you can do "make uninstall" unless you
> deleted the build folder.  In that case, you just have to find all the
> pieces and manually delete them.

Unfortunately, gcc doesn't support "make uninstall". A workaround is
to make a fake install with "make install DESTDIR=/tmp/usr/local" and
then make a list of all the files under that directory, remove the
"/tmp" and delete the files based on the list, something like

find /tmp/usr/local -type f | perl -pwle 's!/tmp!!' | xargs rm

(disclaimer: untested)

This would leave empty directories behind.

Csaba
-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformat way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)

--
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