[help] trying to use gccgo but missing something

223 views
Skip to first unread message

anthony Place

unread,
Jun 3, 2019, 11:47:40 AM6/3/19
to golang-nuts
i hoped adding -compiler gccgo to go build would just work but...

> gccgo: exec: "gccgo": executable file not found in $PATH

i have gcc (8.3) repo. package (solus 5) installed and the docs with it say it supports go, and there doesn't seem to be anything else about gccgo in the repo. so not really sure where to even look next.


Ian Lance Taylor

unread,
Jun 3, 2019, 3:44:07 PM6/3/19
to anthony Place, golang-nuts
What does "which gccgo" print? If it doesn't print anything then
either you don't have gccgo installed or it's not on your PATH. Note
that many distros package gccgo separately from the main gcc package.

Ian

anthony Place

unread,
Jun 3, 2019, 3:53:24 PM6/3/19
to golang-nuts
> What does "which gccgo" print?

which: no gccgo in (/sbin:/bin:/usr/sbin:/usr/bin:/snap/bin)

i was wondering if i had to add something to the path, or that it wasn't being packaged, but..

* gcc doc says go supported.
* if i search the fs for gccgo i get all sorts of hits.





Ian Lance Taylor

unread,
Jun 3, 2019, 3:58:48 PM6/3/19
to anthony Place, golang-nuts
On Mon, Jun 3, 2019 at 12:54 PM anthony Place <psi....@gmail.com> wrote:
>
> > What does "which gccgo" print?
>
> which: no gccgo in (/sbin:/bin:/usr/sbin:/usr/bin:/snap/bin)
>
> i was wondering if i had to add something to the path, or that it wasn't being packaged, but..
>
> * gcc doc says go supported.

Yes, Go is supported, but that doesn't mean that installing your
distro's gcc package installed gccgo.

> * if i search the fs for gccgo i get all sorts of hits.

Is one of those an executable named "gccgo"?

Ian

anthony Place

unread,
Jun 3, 2019, 4:59:30 PM6/3/19
to golang-nuts
there is a 100 or so containing gccgo; '.go','.a','.c', batch and '.html' but no executable (other than the batch files)

i was previously hopeful about one called 'gccgo_install.html', but it was about compilation and then assumed the executable existed.

it seems something was not set to make to 'executable'? there isn't any reference to it in the package listing.

my interest was not major.

i had originally thought to use go in a container, and compile stuff, but solus had good support for all i needed, so i didn't bother.

many thanks for the help.





Ian Lance Taylor

unread,
Jun 3, 2019, 7:00:48 PM6/3/19
to anthony Place, golang-nuts
Most likely your distro has a different package that contains the
gccgo executable, and you'll need to install that one separately.

For example, if you are using Debian, you would have to install the
gccgo package as well as the gcc package.

Ian
Reply all
Reply to author
Forward
0 new messages