Friday, September 7, 2012

/usr/bin/ld: cannot find -lm

I was updating some of my software to run on CentOS6 and I had an unexpected error:
/usr/bin/ld: cannot find -lm
collect2: ld returned 1 exit status

The tool I was building uses -static and it turns out that static libraries are no longer shipped in glibc-devel. They are in a new package called glibc-static.

yum install glibc-static
solved the problem. My program now compiles and thanks to puppet, glibc-static is now installed on all my systems.
package { 'glibc-static': ensure => present }

29 comments:

  1. John: You saved me. Omg, your explore program to get at the ext-3 files on my almost dead Seagate Drive were found today. All of it! You have no idea what you did. I have over three years worth of work that I would have lost. Seriously, I have been sick about it and up all night. I cannot thank you enough. I will go back to your website and pay you if you still frequent there. Unbelievable!

    ReplyDelete
  2. Took me all day to break into the Black Armor NAS 110. Was really thinking it was gone... and went to a site mentioning your explore..You made my day, sir. Tax returns, legal stuff, etc etc.

    ReplyDelete
  3. I got the same problem, so did as you mentioned. But I am getting

    Setting up Install Process
    No package glibc-static available.
    Nothing to do

    can you please guide me what to do ?

    ReplyDelete
  4. Thanks. I told Google search my problem, it showed me your post. A minute later, problem solved. :)

    ReplyDelete
  5. The information you shared is very helpful to us.
    bloxorz

    ReplyDelete
  6. Wooow! I'm impressed with your details. Click here

    ReplyDelete
  7. Dear admin really you are doing fantastic job by sharing this type of useful information with us.
    when i read your all post i think each and every post was so important so for that thank you so much and wish you all the best for upcoming post.
    visit my website: https://e-mcafee.com/install-mcafee-total-protection/

    ReplyDelete
  8. I like your post, and i visit all time on your website, this is very helpful information for any person,
    McAfee is one of the best Antivirus to keep your device safe and secure from malware and fake notifications
    You need to Install McAfee security Activate McAfee Activate Product Key

    ReplyDelete
  9. As the name proposes, the subsequent translation is the antonym of the primary understanding. You just need to close down the printer and complete every one of the links from the USB port. Remove patch message 0X97 error Epson printer Like the main understanding, you need to sit tight for a couple of moments and press the force catch of the Epson printer for at any rate one to two minutes. Simultaneously, you need to plug every one of the links to its underlying position. Presently, rehash the interaction, it implies you need to hold the force catch of the Epson printer briefly after the module cycle. Delivery the Epson printer power catch and start the printer to check if Epson printer mistake code 0x97 is settled. There is a most extreme possibility that your concern has been settled and you can print your significant records. In any case, on the off chance that you are confronting a similar Epson printer mistake code 0x97 then you need to follow the third translation. Brother printer not printing

    ReplyDelete
  10. There are numerous issues in the world today, one of which is the uneven representation of men and women. Many men throughout the world are dying as bachelors as a result of this worldwide issue. I was always frightened of such death, therefore I started actively looking for a female who would love me and make us happy. I refer to my partner as a russian mail order bride. It is because of individuals like him that I have a loving and nice family. I would suggest these services to everyone.

    ReplyDelete
  11. I am really glad to glance at this website posts which includes plenty of useful data, thanks for providing such information. 한국야동

    Also feel free to visit may web page check this link 야설

    ReplyDelete
  12. Thank you. I authentically greeting your way for writing an article. I safe as a majority loved it to my bookmark website sheet list and will checking rear quite than later. 야동

    Also feel free to visit may web page check this link 국산야동

    ReplyDelete
  13. This is a great post I seen because of offer it. It is truly what I needed to see seek in future you will proceed after sharing such a magnificent post. 국산야동

    Also feel free to visit may web page check this link 한국야동

    ReplyDelete
  14. Having read this I believed it was extremely enlightening. I appreciate you spending some time and effort to put this short article together. 한국야동

    Also feel free to visit may web page check this link 야동

    ReplyDelete
  15. Thank you posting this, it was a good article and really helped me with my software.
    www.excavationdoneright.com/excavation-companies-columbus-ohio

    ReplyDelete
  16. Great write-up, I’m normal visitor of one’s web site, maintain up the excellent operate, and It is going to be a regular visitor for a lengthy time.

    NHL하키분석
    NPB상대전적
    SBS프로야구

    ReplyDelete
  17. thank you willing to share! Greetings success of admin :) cetak cepat 24 jam jakarta timur wish you deign to visit my website, thank you

    ReplyDelete
  18. Glad to hear that you were able to solve the issue by installing glibc-static. This package contains the static version of the GNU C Library, which is required by some software programs that are compiled with the -static option. Without this package, the linker is unable to find the library (-lm) that is needed by your program to link statically.

    By using the "yum install glibc-static" command, you were able to install the missing package and enable static linking for your program. Additionally, by using Puppet to manage the package, you can ensure that all of your systems have the required package installed, which can help prevent similar issues in the future. www.bestcasepropertygroup.com/

    ReplyDelete
  19. I thought I was the only one having issues with it.

    High security fencing

    ReplyDelete
  20. Your insights were both informative and inspiring, and I found myself feeling energized and motivated after reading your post. Thank you for sharing your expertise with us. AI content creators

    ReplyDelete
  21. You installed the necessary static libraries, Among Us Online allowing your program to compile successfully with the -static flag.

    ReplyDelete