combining dwarf failed: unknown load command 0x80000034 solution in GoLang

  sonic0002        2021-11-25 07:11:28       8,803        1    

In case there is below error encountered while running some go program:

combining dwarf failed: unknown load command 0x80000034

This may be due to that you are running go 1.16 on a Mac M! machine. If you go to check go version, it may tell you that you are running an arm version of go.

go version go1.16.10 darwin/arm64

In such cases, you can try below methods to workaround the issue.

Try to upgrade the go version to 1.17 and run the code again. If this is not an option for you because you have to stick to go 1.16 for some reason, you may try to install an amd version of go 1.16. This should work per what we have tested.

If you still have issue with above, please share any other solution in case you solved it. 

GO 1.16  0X80000034 

       

  RELATED


No related articles

  1 COMMENT


Sushant [Reply]@ 2024-03-14 05:57:59

update flag CGO_ENABLED="0" in go env using below command

go env -w CGO_ENABLED="0"

it must be 1 right now and in Mac M1 this creates issue while compiling both go and c binaries together, disabling this flag makes it such that build is now done ignoring any external C libraries which will succeed.



  RANDOM FUN

Basic Human Needs 2.0