Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 77415

Summary: math.h compile problem + 7.2
Product: [Retired] Red Hat Linux Reporter: Dan Bishop <dbishop>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i586   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-11-06 18:47:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dan Bishop 2002-11-06 18:47:45 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

Description of problem:
 I have been compiling a C program using the "gcc" available in this 
 version. I am trying to use the "log10" function normally part of the math.h 
library. The compiler does not balk at the "#include " line however it fails to 
recognize the function. The same was true of other math.h functions (exp and 
log). My compile command line is "gcc filename.c -o output_file". Is there a 
bug fix that I need for the libraries or something missing? Thanks.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create filename.c file with "#include <math.h>" and use log10 or log or exp 
function in the file (could be in main).
2.Attempt to compile "gcc filename.c -o target_name"

Actual Results:  If you don't use any math functions the library will load, but 
if you try to use "log10" or "log" or "exp" (and probably all the other math.h 
functions) it can't find them, even though it seems to find the library.

Expected Results:  Since library is loaded it should recognize these standard C 

Additional info:

Comment 1 Jakub Jelinek 2002-11-06 18:51:34 UTC
You need to add -lm to the command line.