Trouble pulling in libm

John Wood jwood at scisol.com
Fri Jan 14 05:43:51 UTC 2011


If I call round only in my driver I get the previous linker error.


If I add the following code to one of my application files.

  double test;
  double value = 0.5;

  test = round(value);

The linker error goes away.  Its seems like there is something going on calling a libm function in the rtems code and not calling it in the app.

I have to call the specific function and not just another libm function, if I replace the round in the above code with sqrt for example I get the linker error again.

I don’t have my hardware so I can't tell if the function is actually linking correctly.  I'll test this tomorrow.  Short term I can put the code in my app but ideally it belongs with the driver.


-----Original Message-----
From: Ralf Corsepius [mailto:ralf.corsepius at rtems.org] 
Sent: Friday, January 14, 2011 12:32 AM
To: John Wood
Cc: Andrei Chichak; Ralf Corsepius; RTEMS List
Subject: Re: Trouble pulling in libm

On 01/14/2011 06:17 AM, John Wood wrote:
> I assumed that and actually am pulling in several libraries successfully myself so I did not expect this issue.
> I am trying to refine things in terms of my issues.  I noticed on closer inspection that the math.h file inclusion does not appear quite right since it says the round function definition is implicitly defined.

To getting started, it would be sufficient to see the actual error message.

Ralf

PS.: I am asking, because I know about several issues with libm in 
rtems4.10's and rtems4.11's newlib, which some of which have been 
addressed, but have not yet been addressed in rtems4.9's newlib.

These issues typically show as link errors with the linker complaining 
about missing symbols from deep inside of newlib.





More information about the users mailing list