Friday, May 27, 2016

Return of the static

While working on some go code recently, I hit a problem which was a bit perplexing:

# command-line-arguments
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
/usr/lib/golang/pkg/tool/linux_amd64/6l: running gcc failed: unsuccessful exit status 0x100

After some consideration, and examination of the go command
go build -v -ldflags '-extldflags '\''-static'\'' -X github.com/xxxx/xxxx.buildVersion=1' -o pkg/xxxx-linux-amd64 main.go
I remembered a change to do with the packaging of static libraries, that is, they are not installed by default on RHEL/CentOS.
A simple
yum install glibc-static
was all that was required

18 comments:

  1. The article is interesting and useful. I tried it and found it really useful. Thank you very much. gmail login

    ReplyDelete
  2. Interesting facts and points cover in this blog post, these coding styles will help any software developer. Kanye West Jacket

    ReplyDelete
  3. Thank you for sharing information. Its very nice
    driversin.com

    ReplyDelete
  4. I wish I saw this information sooner
    - roll the ball -

    ReplyDelete
  5. get the new Apk version free download Read More

    ReplyDelete

  6. It's surprising you aren't more popular given that you definitely possess the gift.
    youcam makeup

    ReplyDelete
  7. Thanks for sharing this lovely happy article helix jump

    ReplyDelete
  8. I have a vast collection of funny wifi names see if i able to make you smile.

    kinemaster mod apk

    ReplyDelete
  9. Your topic is very great and useful for us…thank you
    five nights at freddy's

    ReplyDelete
  10. Just upload your media and click the "Add Text" button to insert your text overlay. You can use our straightforward drag and drop editor to place text exactly where you want to on top of your video. Perfect for watermarking video or adding the right captions!

    Kinemaster mod apk
    kinemaster for windows

    ReplyDelete
  11. A fun way of entertainment may be quite suitable for office workers or those who prefer simplicity. Bomb It or Bomberman like bomber friends mod apk

    ReplyDelete
  12. It’s great because of the knowledge you share with us, I will always follow your blog and will share your blog with my friends
    2 player games

    ReplyDelete
  13. Thanks for the article, but can I get free netflix acc with pass in a easy way? Like this site: netflix tricks free

    ReplyDelete