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

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git