unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* problem building go package: /usr/bin/ld: cannot find crt1.o: No such file or directory
       [not found] <749706961.2393567.1621506455551.ref@mail.yahoo.com>
@ 2021-05-20 10:27 ` vapnik spaknik
  2021-05-21  0:03   ` raingloom
  0 siblings, 1 reply; 2+ messages in thread
From: vapnik spaknik @ 2021-05-20 10:27 UTC (permalink / raw)
  To: help-guix

Hi,
    I'm running guix on Ubuntu, and have installed go via guix.
I tried installing a github go package using the following command:

> go get -u github.com/chzyer/readline

but got this error: "fatal error: linux/errno.h: No such file or directory"

I fixed that problem by doing: 

> export CGO_CPPFLAGS="-I/usr/include"

However, now I get the following error: "/usr/bin/ld: cannot find crt1.o: No such file or directory"
crt1.o can be found on my system in /usr/lib/x86_64-linux-gnu
so I tried doing this: 

> export CGO_LDFLAGS="-rpath /usr/lib/x86_64-linux-gnu -L /usr/lib/x86_64-linux-gnu"

but that didn't fix the problem, I still got the same error.
I also tried this:

> export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu"

but again, same error.

Can anyone help?


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

* Re: problem building go package: /usr/bin/ld: cannot find crt1.o: No such file or directory
  2021-05-20 10:27 ` problem building go package: /usr/bin/ld: cannot find crt1.o: No such file or directory vapnik spaknik
@ 2021-05-21  0:03   ` raingloom
  0 siblings, 0 replies; 2+ messages in thread
From: raingloom @ 2021-05-21  0:03 UTC (permalink / raw)
  To: vapnik spaknik; +Cc: help-guix

On Thu, 20 May 2021 10:27:35 +0000 (UTC)
vapnik spaknik <vapniks@yahoo.com> wrote:

> Hi,
>     I'm running guix on Ubuntu, and have installed go via guix.
> I tried installing a github go package using the following command:
> 
> > go get -u github.com/chzyer/readline  
> 
> but got this error: "fatal error: linux/errno.h: No such file or
> directory"
> 
> I fixed that problem by doing: 
> 
> > export CGO_CPPFLAGS="-I/usr/include"  
> 
> However, now I get the following error: "/usr/bin/ld: cannot find
> crt1.o: No such file or directory" crt1.o can be found on my system
> in /usr/lib/x86_64-linux-gnu so I tried doing this: 
> 
> > export CGO_LDFLAGS="-rpath /usr/lib/x86_64-linux-gnu -L
> > /usr/lib/x86_64-linux-gnu"  
> 
> but that didn't fix the problem, I still got the same error.
> I also tried this:
> 
> > export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu"  
> 
> but again, same error.
> 
> Can anyone help?
> 

This worked for me:
guix environment --ad-hoc go gcc-toolchain -- \
go get -u github.com/chzyer/readline


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

end of thread, other threads:[~2021-05-21  0:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <749706961.2393567.1621506455551.ref@mail.yahoo.com>
2021-05-20 10:27 ` problem building go package: /usr/bin/ld: cannot find crt1.o: No such file or directory vapnik spaknik
2021-05-21  0:03   ` raingloom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).