Hi,

I think what you are seeing is basically a consequence of building an older
version of gollvm -- the version you are building doesn't include newer bug
fixes in the gofrontend version of the go command.  The fix you need is in
a gofrontend commit ( c948c2d770122932a05b62f653efa2c51f72d3ae ) that dates
to fall of 2020. The older version of gofrontend you are picking up doesn't
include this fix.

Not sure if there is an easy workaround here-- when building older versions
of the tools you have to be prepared for this sort of thing. I am sure that
there are LLVM bugs fixed in version 11 that are still present in V10, for
example.

Thanks, Than


On Wed, May 5, 2021 at 8:13 AM Khanh TN <tnkha...@gmail.com> wrote:

> Hi, I'm building a tool to analyze the LLVM bitcode of some Go code with
> gollvm.
> We are currently running LLVM10. We will migrate to LLVM11/12 but not sure
> when.
> I followed Than's instruction to build LLVM10-compatible gollvm from
> https://groups.google.com/g/golang-nuts/c/dMZ7vk_Rjzw/m/b1zYDOxLAAAJ
>
> It worked out great until recently. Code that imports
> golang.org/x/sys/unix will cause errors when "go build". I looked around
> and found out the error message is the same as in
> https://github.com/mainflux/coap-cli/issues/3 to the line number of
> gccgo.go.
>
> A suggested fix is getting CGO_ENABLED=1 but "go env" shows CGO_ENABLED=1
> and "set CGO_ENABLED=1" does not help.
>
> The latest gollvm commit works fine though but it requires LLVM13.
>
> Is there any known fix or workaround for my situation? Should I set
> CGO_ENABLED somewhere else?
>
> Thanks,
> Khanh
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/a92eb44d-73c6-43dd-9f1a-551b06589a78n%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/a92eb44d-73c6-43dd-9f1a-551b06589a78n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CA%2BUr55EWG28J6g73LrK5jWON7cNDwYrSo36LYpuXm4wGovncMA%40mail.gmail.com.

Reply via email to