Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8647621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:06:50+00:00 2026-06-12T13:06:50+00:00

I can ssh to my schools Ubuntu 11.04 server where I have to submit

  • 0

I can ssh to my schools Ubuntu 11.04 server where I have to submit my code and this links fine:

ME@SCHOOL:~/309/project2$ make
gcc -lm treesort.c -o treesort
ME@SCHOOL:~/309/project2$

My local machine is running Ubuntu 12.04 and here is the compiler output for the same code, but using the NetBeans makefile:

gcc -lm    -o dist/Release/GNU-Linux-x86/treesort build/Release/GNU-Linux-x86/sortFns.o build/Release/GNU-Linux-x86/treesort.o  
build/Release/GNU-Linux-x86/treesort.o: In function `processargs':
treesort.c:(.text+0x144): undefined reference to `log'
collect2: ld returned 1 exit status

Using the command line on my local machine with the same code and makefile from the first example:

ME@MYCOMPUTER:~/Documents/CSCI/309/project2$ make
gcc -lm treesort.c -o treesort
/tmp/ccY5GqF1.o: In function `processargs':
treesort.c:(.text+0x2b5): undefined reference to `log'
collect2: ld returned 1 exit status
make: *** [all] Error 1
ME@MYCOMPUTER:~/Documents/CSCI/309/project2$

This is really quite irritating, and I can’t figure out why it works on the server and not on my local machine. I found this question, but it didn’t help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:06:52+00:00Added an answer on June 12, 2026 at 1:06 pm

    Put -lm at the end of the link line. The order of sources,objects and (archive) libraries on the link line matters, and yours is wrong.

    If putting -lm at the end of the link line doesn’t help, you have some bogus library called libm.{a,so} somewhere on your system, and you should figure out where it came from, and get rid of it.

    You cam find out which libm your linker is finding with gcc -Wl,-t ...

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a server that I can ssh into but that's it. Otherwise it
I have a git repository on my server i can ssh over port 443.
I have code on a compute node of a cluster. I can't ssh directly
I have set a node app up on my server and i can ssh
I am using ssh tools to make a ssh connection to a school server,
I have mongodb running on a remote server. I can ssh to the remote
I have a public/private key pair set up so I can ssh to a
I frequently need to ssh into a server, but I can't ssh into it
How can you make SSH read the password from stdin, which it doesn't do
Can Maven copy local file to a remote server using SSH? I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.