all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* gccgo package does not include gccgo binary
@ 2016-07-07 14:55 Alex Vong
  2016-07-09 18:23 ` Leo Famulari
  2016-07-09 22:09 ` Matthew Jordan
  0 siblings, 2 replies; 13+ messages in thread
From: Alex Vong @ 2016-07-07 14:55 UTC (permalink / raw)
  To: help-guix

Hi people,

It seems the gccgo package does not come with the gccgo binary. Is there
something I am missing here? I am installing the output 'out'.

Thanks,
Alex

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gccgo package does not include gccgo binary
  2016-07-07 14:55 gccgo package does not include gccgo binary Alex Vong
@ 2016-07-09 18:23 ` Leo Famulari
  2016-07-09 22:09 ` Matthew Jordan
  1 sibling, 0 replies; 13+ messages in thread
From: Leo Famulari @ 2016-07-09 18:23 UTC (permalink / raw)
  To: Alex Vong; +Cc: Andy Wingo, help-guix

On Thu, Jul 07, 2016 at 10:55:41PM +0800, Alex Vong wrote:
> It seems the gccgo package does not come with the gccgo binary. Is there
> something I am missing here? I am installing the output 'out'.

I'm forwarding this to the people who added the go-1.4 package, in case
they aren't subscribed to help-guix.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gccgo package does not include gccgo binary
  2016-07-07 14:55 gccgo package does not include gccgo binary Alex Vong
  2016-07-09 18:23 ` Leo Famulari
@ 2016-07-09 22:09 ` Matthew Jordan
  2016-07-10 15:29   ` Alex Vong
  1 sibling, 1 reply; 13+ messages in thread
From: Matthew Jordan @ 2016-07-09 22:09 UTC (permalink / raw)
  To: Alex Vong; +Cc: help-guix

Good Day Alex and everyone,

> It seems the gccgo package does not come with the gccgo binary. Is there
> something I am missing here? I am installing the output 'out'.

For gccgo-4.x and older releases there is no "go command".  Gccgo 4.x
and older are library implementations of the various versions of the
"The Go Programming Language Specification".

However as of gccgo 5.x this has changed. For gccgo 5.x the "gccgo"
command serves as a CLI interface to the library.

I hope this clarifies things, also see the links below for more
information.


References:

Setting up and using gccgo - The Go Programming Language
https://golang.org/doc/install/gccgo#Using_gccgo

Gccgo in GCC 4.7.1 - The Go Blog
https://blog.golang.org/gccgo-in-gcc-471

The Go Programming Language Specification - The Go Programming Language
https://golang.org/ref/spec

Sincerely,

----
Matthew Jordan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gccgo package does not include gccgo binary
  2016-07-09 22:09 ` Matthew Jordan
@ 2016-07-10 15:29   ` Alex Vong
  2016-07-10 17:16     ` Matthew Jordan
  0 siblings, 1 reply; 13+ messages in thread
From: Alex Vong @ 2016-07-10 15:29 UTC (permalink / raw)
  To: Matthew Jordan; +Cc: help-guix

Hello Mathew,

Thank your help, but I still cannot build hello-world...

Matthew Jordan <matthewjordandevops@yandex.com> writes:

> Good Day Alex and everyone,
>
>> It seems the gccgo package does not come with the gccgo binary. Is there
>> something I am missing here? I am installing the output 'out'.
>
> For gccgo-4.x and older releases there is no "go command".  Gccgo 4.x
> and older are library implementations of the various versions of the
> "The Go Programming Language Specification".
>
> However as of gccgo 5.x this has changed. For gccgo 5.x the "gccgo"
> command serves as a CLI interface to the library.
>
> I hope this clarifies things, also see the links below for more
> information.
>
>
> References:
>
> Setting up and using gccgo - The Go Programming Language
> https://golang.org/doc/install/gccgo#Using_gccgo
>
This page suggests me to use gccgo command, which doesn't work.
  $ gccgo -c hello.go
  ==> bash: gccgo: command not found

> Gccgo in GCC 4.7.1 - The Go Blog
> https://blog.golang.org/gccgo-in-gcc-471
>
This page suggests a new command:
  $ go build -compiler gccgo myprog
  ==> go build command-line-arguments: gccgo: exec: "gccgo": executable file not found in $PATH

> The Go Programming Language Specification - The Go Programming Language
> https://golang.org/ref/spec
>
> Sincerely,
>
> ----
> Matthew Jordan

Also, in this page,
https://gcc.gnu.org/onlinedocs/gcc-4.7.4/gccgo/Invoking-gccgo.html#Invoking-gccgo,
it said, 'The gccgo command is a frontend to gcc and supports many of
the same options'. Does this mean there is some kind of gccgo command
even for gcc 4.7? Am I missing something here?

Thanks,
Alex

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gccgo package does not include gccgo binary
  2016-07-10 15:29   ` Alex Vong
@ 2016-07-10 17:16     ` Matthew Jordan
  2016-07-12  1:20       ` Alex Vong
  0 siblings, 1 reply; 13+ messages in thread
From: Matthew Jordan @ 2016-07-10 17:16 UTC (permalink / raw)
  To: Alex Vong; +Cc: help-guix

Good Day Alex and everyone,

>
> Thank your help, but I still cannot build hello-world...
>

If all you want to do is compile some hello world code,

$ guix package -i go@1.4

And use the "go" command

I'll will be adding the 1.5 and 1.6 versions soon.

> Also, in this page,
> https://gcc.gnu.org/onlinedocs/gcc-4.7.4/gccgo/Invoking-gccgo.html#Invoking-gccgo,
> it said, 'The gccgo command is a frontend to gcc and supports many of
> the same options'. Does this mean there is some kind of gccgo command
> even for gcc 4.7? Am I missing something here?

Simply put, if you need a go compiler you will have to use gccgo@5.X or
newer or use go@1.4 or newer.

Cheers,

----
Matthew Jordan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gccgo package does not include gccgo binary
  2016-07-10 17:16     ` Matthew Jordan
@ 2016-07-12  1:20       ` Alex Vong
  2016-07-12  9:38         ` Matthew Jordan
  2016-07-12 13:23         ` Ludovic Courtès
  0 siblings, 2 replies; 13+ messages in thread
From: Alex Vong @ 2016-07-12  1:20 UTC (permalink / raw)
  To: Matthew Jordan; +Cc: help-guix

Hi guix,

Matthew Jordan <matthewjordandevops@yandex.com> writes:

> Good Day Alex and everyone,
>
>>
>> Thank your help, but I still cannot build hello-world...
>>
>
> If all you want to do is compile some hello world code,
>
> $ guix package -i go@1.4
>
> And use the "go" command
>
Actually, I am trying to link object file compile with gcc with go
object file. I was thinking using gccgo would make things simplier since
the backend is the same. Anyway, I follows your suggestion to use 'go'
command instead and find this guide
<https://stackoverflow.com/questions/16747021/how-do-you-statically-link-a-c-library-in-go-using-cgo>
on SO. The answer written by Didier basically works for me, except that
'//#include <toto.h>' has to be replaced by '//#include <toto.h>' to get
the code compiled. Have a good day :)

> I'll will be adding the 1.5 and 1.6 versions soon.
>
>> Also, in this page,
>> https://gcc.gnu.org/onlinedocs/gcc-4.7.4/gccgo/Invoking-gccgo.html#Invoking-gccgo,
>> it said, 'The gccgo command is a frontend to gcc and supports many of
>> the same options'. Does this mean there is some kind of gccgo command
>> even for gcc 4.7? Am I missing something here?
>
> Simply put, if you need a go compiler you will have to use gccgo@5.X or
> newer or use go@1.4 or newer.
>
> Cheers,
>
> ----
> Matthew Jordan

Btw, does anyone have problem cloning github repo? I get the SSL
verfication problem mentioned earlier. However, I have already installed
nss-certs and include the following line in .bashrc:
  GIT_SSL_CAINFO="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
  export GIT_SSL_CAINFO

Any ideas?

Thanks,
Alex

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gccgo package does not include gccgo binary
  2016-07-12  1:20       ` Alex Vong
@ 2016-07-12  9:38         ` Matthew Jordan
  2016-07-12 11:05           ` Alex Vong
  2016-07-12 13:23         ` Ludovic Courtès
  1 sibling, 1 reply; 13+ messages in thread
From: Matthew Jordan @ 2016-07-12  9:38 UTC (permalink / raw)
  To: Alex Vong; +Cc: help-guix


> Actually, I am trying to link object file compile with gcc with go
> object file. I was thinking using gccgo would make things simplier since
> the backend is the same. Anyway, I follows your suggestion to use 'go'
> command instead and find this guide
> <https://stackoverflow.com/questions/16747021/how-do-you-statically-link-a-c-library-in-go-using-cgo>
> on SO. The answer written by Didier basically works for me, except that
> '//#include <toto.h>' has to be replaced by '//#include <toto.h>' to get
> the code compiled. Have a good day :)

No problem, and you are welcome.

> Btw, does anyone have problem cloning github repo? I get the SSL
> verfication problem mentioned earlier. However, I have already installed
> nss-certs and include the following line in .bashrc:
>   GIT_SSL_CAINFO="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
>   export GIT_SSL_CAINFO
>
> Any ideas?

Add nss-certs to your system config.

$ $EDITOR /etc/config.scm
$ guix system reconfigure /etc/config.scm

That solved my SSL issues.

Cheers,

---
Matthew Jordan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gccgo package does not include gccgo binary
  2016-07-12  9:38         ` Matthew Jordan
@ 2016-07-12 11:05           ` Alex Vong
  2016-07-12 12:35             ` Leo Famulari
  0 siblings, 1 reply; 13+ messages in thread
From: Alex Vong @ 2016-07-12 11:05 UTC (permalink / raw)
  To: Matthew Jordan; +Cc: help-guix

Matthew Jordan <matthewjordandevops@yandex.com> writes:

> Add nss-certs to your system config.
>
> $ $EDITOR /etc/config.scm
> $ guix system reconfigure /etc/config.scm
>
> That solved my SSL issues.
>
I forget to tell that I am not using Guix SD but using Guix on top of
Debian. Do you have any recommendation on this?

> Cheers,
>
> ---
> Matthew Jordan

Thanks,
Alex

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gccgo package does not include gccgo binary
  2016-07-12 11:05           ` Alex Vong
@ 2016-07-12 12:35             ` Leo Famulari
  2016-07-12 14:13               ` Alex Vong
  0 siblings, 1 reply; 13+ messages in thread
From: Leo Famulari @ 2016-07-12 12:35 UTC (permalink / raw)
  To: Alex Vong; +Cc: help-guix

On Tue, Jul 12, 2016 at 07:05:24PM +0800, Alex Vong wrote:
> I forget to tell that I am not using Guix SD but using Guix on top of
> Debian. Do you have any recommendation on this?

This works for me in my login shell profile:

if [ -d /etc/ssl/certs ]; then
        export SSL_CERT_DIR=/etc/ssl/certs
        export SSL_CERT_FILE=$SSL_CERT_DIR/ca-certificates.crt
        export GIT_SSL_CAINFO=$SSL_CERT_FILE
fi

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gccgo package does not include gccgo binary
  2016-07-12  1:20       ` Alex Vong
  2016-07-12  9:38         ` Matthew Jordan
@ 2016-07-12 13:23         ` Ludovic Courtès
  2016-07-13 14:41           ` git ca cert problems Alex Vong
  1 sibling, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2016-07-12 13:23 UTC (permalink / raw)
  To: Alex Vong; +Cc: help-guix

Hello,

Alex Vong <alexvong1995@gmail.com> skribis:

> Btw, does anyone have problem cloning github repo? I get the SSL
> verfication problem mentioned earlier. However, I have already installed
> nss-certs and include the following line in .bashrc:
>   GIT_SSL_CAINFO="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
>   export GIT_SSL_CAINFO
>
> Any ideas?

It works for me (on GuixSD, but that shouldn’t make a difference.)

What does “wc -l $GIT_SSL_CAINFO” say?

From a quick look, Git honors a bunch of additional environment
variables in this area:

--8<---------------cut here---------------start------------->8---
$ ltrace -f -e getenv sh -c 'git clone https://github.com/elm-lang/elm-compiler' 2>&1 |grep SSL
[pid 21398] sh->getenv("GIT_SSL_NO_VERIFY")      = nil
[pid 21398] sh->getenv("GIT_SSL_CERT")           = nil
[pid 21398] sh->getenv("GIT_SSL_KEY")            = nil
[pid 21398] sh->getenv("GIT_SSL_CAPATH")         = nil
[pid 21398] sh->getenv("GIT_SSL_CAINFO")         = "/etc/ssl/certs/ca-certificates.c"...
[pid 21398] sh->getenv("GIT_SSL_CERT_PASSWORD_PROTECTED") = nil
[pid 21398] sh->getenv("GIT_SSL_VERSION")        = nil
[pid 21398] sh->getenv("GIT_SSL_CIPHER_LIST")    = nil
--8<---------------cut here---------------end--------------->8---

Could it be that one of these is shadowing GIT_SSL_CAINFO?

There’s also ‘http.sslCAInfo’ and similar (see git-config(1)).

HTH,
Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gccgo package does not include gccgo binary
  2016-07-12 12:35             ` Leo Famulari
@ 2016-07-12 14:13               ` Alex Vong
  0 siblings, 0 replies; 13+ messages in thread
From: Alex Vong @ 2016-07-12 14:13 UTC (permalink / raw)
  To: Leo Famulari; +Cc: help-guix

Leo Famulari <leo@famulari.name> writes:

> On Tue, Jul 12, 2016 at 07:05:24PM +0800, Alex Vong wrote:
>> I forget to tell that I am not using Guix SD but using Guix on top of
>> Debian. Do you have any recommendation on this?
>
> This works for me in my login shell profile:
>
> if [ -d /etc/ssl/certs ]; then
>         export SSL_CERT_DIR=/etc/ssl/certs
>         export SSL_CERT_FILE=$SSL_CERT_DIR/ca-certificates.crt
>         export GIT_SSL_CAINFO=$SSL_CERT_FILE
> fi

It turns out Guix profile already exported this environment variable for
me, so exporting it before sourcing Guix profile has no effect at all.


Eventually, I get this working with certificates from Debian,


GUIX_PROFILE="$HOME/.guix-profile" \
            . "$HOME/.guix-profile/etc/profile"

GIT_SSL_CAINFO="/etc/ssl/certs/ca-certificates.crt"
export GIT_SSL_CAINFO


But why are the certificates from nss-certs not usable?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: git ca cert problems
  2016-07-12 13:23         ` Ludovic Courtès
@ 2016-07-13 14:41           ` Alex Vong
  2016-07-13 21:11             ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Alex Vong @ 2016-07-13 14:41 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

Hi,

I change the title to a better one.

ludo@gnu.org (Ludovic Courtès) writes:

> Hello,
>
> It works for me (on GuixSD, but that shouldn’t make a difference.)
>
> What does “wc -l $GIT_SSL_CAINFO” say?
>
The output I get without setting any environment variable is the
following:

alexvong1995@debian:~$ ltrace -f -e getenv bash -c 'git clone https://github.com/elm-lang/elm-compiler' 2>&1 |grep SSL
[pid 6906] sh->getenv("GIT_SSL_NO_VERIFY")       = nil
[pid 6906] sh->getenv("GIT_SSL_CERT")            = nil
[pid 6906] sh->getenv("GIT_SSL_KEY")             = nil
[pid 6906] sh->getenv("GIT_SSL_CAPATH")          = nil
[pid 6906] sh->getenv("GIT_SSL_CAINFO")          = "/home/alexvong1995/.guix-profile"...
[pid 6906] sh->getenv("GIT_SSL_CERT_PASSWORD_PROTECTED") = nil
[pid 6906] sh->getenv("GIT_SSL_VERSION")         = nil
[pid 6906] sh->getenv("GIT_SSL_CIPHER_LIST")     = nil
fatal: unable to access 'https://github.com/elm-lang/elm-compiler/': Problem with the SSL CA cert (path? access rights?)


Printing the environemt variable GIT_SSL_NO_VERIFY gives:

alexvong1995@debian:~$ echo $GIT_SSL_CAINFO
/home/alexvong1995/.guix-profile/etc/ssl/certs/ca-certificates.crt:/home/alexvong1995/.guix-profile/etc/ssl/certs/ca-certificates.crt


Is the problem related to having more than one ca cert files?

> From a quick look, Git honors a bunch of additional environment
> variables in this area:
>
> $ ltrace -f -e getenv sh -c 'git clone https://github.com/elm-lang/elm-compiler' 2>&1 |grep SSL
> [pid 21398] sh->getenv("GIT_SSL_NO_VERIFY")      = nil
> [pid 21398] sh->getenv("GIT_SSL_CERT")           = nil
> [pid 21398] sh->getenv("GIT_SSL_KEY")            = nil
> [pid 21398] sh->getenv("GIT_SSL_CAPATH")         = nil
> [pid 21398] sh->getenv("GIT_SSL_CAINFO")         = "/etc/ssl/certs/ca-certificates.c"...
> [pid 21398] sh->getenv("GIT_SSL_CERT_PASSWORD_PROTECTED") = nil
> [pid 21398] sh->getenv("GIT_SSL_VERSION")        = nil
> [pid 21398] sh->getenv("GIT_SSL_CIPHER_LIST")    = nil
>
> Could it be that one of these is shadowing GIT_SSL_CAINFO?
>
> There’s also ‘http.sslCAInfo’ and similar (see git-config(1)).
>
> HTH,
> Ludo’.

Thanks,
Alex

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: git ca cert problems
  2016-07-13 14:41           ` git ca cert problems Alex Vong
@ 2016-07-13 21:11             ` Ludovic Courtès
  0 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2016-07-13 21:11 UTC (permalink / raw)
  To: Alex Vong; +Cc: help-guix

Hi,

Alex Vong <alexvong1995@gmail.com> skribis:

> [pid 6906] sh->getenv("GIT_SSL_CAINFO")          = "/home/alexvong1995/.guix-profile"...

[...]

> alexvong1995@debian:~$ echo $GIT_SSL_CAINFO
> /home/alexvong1995/.guix-profile/etc/ssl/certs/ca-certificates.crt:/home/alexvong1995/.guix-profile/etc/ssl/certs/ca-certificates.crt

This seems wrong; it should be exactly
"$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt".

HTH!

Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-07-13 21:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07 14:55 gccgo package does not include gccgo binary Alex Vong
2016-07-09 18:23 ` Leo Famulari
2016-07-09 22:09 ` Matthew Jordan
2016-07-10 15:29   ` Alex Vong
2016-07-10 17:16     ` Matthew Jordan
2016-07-12  1:20       ` Alex Vong
2016-07-12  9:38         ` Matthew Jordan
2016-07-12 11:05           ` Alex Vong
2016-07-12 12:35             ` Leo Famulari
2016-07-12 14:13               ` Alex Vong
2016-07-12 13:23         ` Ludovic Courtès
2016-07-13 14:41           ` git ca cert problems Alex Vong
2016-07-13 21:11             ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.