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

60 comments:

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

    ReplyDelete
    Replies
    1. IEEE Final Year Project centers make amazing deep learning final year projects ideas for final year students Final Year Projects for CSE to training and develop their deep learning experience and talents.

      IEEE Final Year projects Project Centers in India are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation.

      corporate training in chennai corporate training in chennai

      corporate training companies in india corporate training companies in india

      corporate training companies in chennai corporate training companies in chennai

      I have read your blog its very attractive and impressive. I like it your blog. Digital Marketing Company in Chennai

      Delete
  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
  14. Thanks a lot for the post. It has helped me get some nice ideas. I hope I will see some really good result soon.

    gmail sign up
    hotmail email login


    ReplyDelete
  15. If you wan to download Powerdirector Pro Mod Apk then just follow the link you will get the premium apk for free

    ReplyDelete
  16. download Gsm aladdin latest version follow the link

    ReplyDelete
  17. If you are looking for best video editor for android then today i will share with you 100% working inshot pro apk just click here to download paid version

    ReplyDelete
  18. Sociology Coursework Writing Services has become a significant challenge owing to the complexity of Sociology Assignment Writing Services and in other cases lack of time and knowledge needed to prepare Sociology Research Paper Writing Services.

    ReplyDelete
  19. Wow!! Thanks for sharing such a informative post, it is really helpful for me. If you have many any type of printer issues or printer setup problem then visit our official website or call our toll free number we are their for you at anytime.
    hp 123 com

    ReplyDelete
  20. It is important for biology coursework writing service students to seek Biology Essay Writing Services from a reputable biology research paper service provider for their biology assignment writing services.

    ReplyDelete
  21. Assignment Help UAE is one where the pool of knowledge is spread all through the world. in this each and every piece of topics are discussed by our experts in full attention.
    mba essay help

    ReplyDelete
  22. VivaVideo PRO is one of the best professional video editor & photo slideshow maker apps to make awesome videos!
    read more read more

    ReplyDelete
  23. Thank you for sharing valuable information. Nice post. I enjoyed reading this post.
    someone still unable to resolve their problem may prefer that site too.
    Can I Fix HP Color LaserJet Pro mfp m281fdw Printer is not Printing
    Connect Brother Printer to Wifi

    ReplyDelete
  24. Among other courses, tourism writing services has become popular since students seek Tourism & Leisure Writing Services and tourism assignment writing services.

    ReplyDelete
  25. Great Post !! Thanks for sharing this information.
    Reaching Email Support expert is easy now.

    At&t Email Helpline Number
    Email Helpline Number
    At&t mail Helpline Number

    ReplyDelete
  26. hello recently i find a pro version of kinemaster that has all premium feature are unlocked for free download click here

    ReplyDelete
  27. Open apk file

    https://openapkfile.xyz

    ReplyDelete
  28. Get the best Economics Assignment Help online at Fullassignment.com . We have the best writers for 100% plagiarism free Assignment Help .
    For more info please visit our website: https://www.fullassignment.com/
    WhatsApp : +1-6692714848

    ReplyDelete
  29. I understand what you were feeling. Putting so much effort into something you did, only to realize it was messed up and made to appear a failure by A SINGLE LINE OF CODE. This was also an issue when we were setting up https://www.towtruckipswich.com/

    ReplyDelete
  30. Seeking psychology research writing services are very common nowadays since there are very many students in need of Psychology Coursework Writing Services and psychology assignment writing services.

    ReplyDelete
  31. It is important for business management assignment help seekers to find the best Business Management Writing Services from a reputable business management paper writing service provider for their custom business management essay services.

    ReplyDelete
  32. This comment has been removed by the author.

    ReplyDelete
  33. Thank you so much for ding the impressive job here, everyone will surely like your post.sarms vs legal steroids

    ReplyDelete
  34. Are you looking for latest viva video pro apk?
    Then visit the Vivavideo pro apk now and Download vivavideo pro apk. Thanks

    ReplyDelete
  35. Good to read your blog again, it's been months for me. I need this article to finish my college assignment. Thank you. HP Error Code B0605

    ReplyDelete
  36. Norton is one of the trendiest antiviruses everywhere throughout the world.Best

    solution for saving your time.Go to norton.
    www.norton.com/setup
    norton.com/setup
    norton setup

    ReplyDelete
  37. Hello this site is very good and responsive,for hosting for the purpose of getting

    informative stuff.thank you.
    www.Webroot.com/safe
    Webroot.com/safe
    webroot/safe

    ReplyDelete
  38. Norton is one of the trendiest antiviruses everywhere throughout the world.Best

    solution for saving your time.Go to norton.
    www.Webroot.com/safe
    Webroot.com/safe
    webroot/safe

    ReplyDelete
  39. This is a really useful blog. I really enjoyed reading this blog. It was explained and structured with perfection.www.webroot.com/safe

    ReplyDelete