[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem building go package: /usr/bin/ld: cannot find crt1.o: No suc
From: |
raingloom |
Subject: |
Re: problem building go package: /usr/bin/ld: cannot find crt1.o: No such file or directory |
Date: |
Fri, 21 May 2021 02:03:33 +0200 |
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