libm log function: always unreferenced
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eglibc (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
For this simple code:
#include <math.h>
int main(void)
{
log(0.0);
return 0;
}
when compiled with `gcc -lm foo.c`, you would always get the following error message:
/tmp/ccTTLEYA.o: In function `main':
foo.c:(.text+0x9): undefined reference to `log'
collect2: error: ld returned 1 exit status
which doesn't make sense.
I tried the same code to be compiled with `clang -lm foo.c`, which compiles successfully.
Also, I tried the same code on a RHEL 6 machine with gcc, which compiles successfully.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: libc6-dev 2.19-0ubuntu6
ProcVersionSign
Uname: Linux 3.13.0-29-generic x86_64
NonfreeKernelMo
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Jun 9 00:28:33 2014
InstallationDate: Installed on 2014-05-27 (12 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
SourcePackage: eglibc
UpgradeStatus: No upgrade log present (probably fresh install)
Invalid. Ignore it.