• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 776
  • Last Modified:

Can't compile Apache 2.2.2 on AIX

I am tyring to compile Apache 2.2.2 on AIX 5.3.  I have run configure.  Even though it finishes without errors I get the message that it can't find the library containing the function  'sqrt'.  Then when I try to compile the Apache source, I get an error that it can't find the function 'sqrt'.

Here is the error:

ld: 0711-317 ERROR: Undefined symbol: .sqrt
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

sqrt is in the libC library on this machine, and even though I add the -lC flag and -L/usr/local/lib, it still doesn't find this library.  

How do I have to run configure and make to get this to compile? Thanks!!!
0
mromeo
Asked:
mromeo
  • 9
  • 8
1 Solution
 
jkrCommented:
According to http://mail-archives.apache.org/mod_mbox/httpd-bugs/200404.mbox/%3C20040410120016.7076.qmail@nagoya.betaversion.org%3E

you should link with /usr/lib/libm.a for 'sqrt'. Try adding '-lm' to your compiler options.
0
 
mromeoAuthor Commented:
For some reason, this computer doesn't have libm on it.  I installed GCC 4.1.1.  There was no other compiler on this machine before I isntalled it.  There is also a sqrt function in libC, which I added to the link path, but it didn't help.  Should libm be part of gcc?
0
 
jkrCommented:
>>Should libm be part of gcc?

At least it is on all GCC installations I could check here.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
mromeoAuthor Commented:
On my other AIX box, it is in /usr/ccs/lib.  I don't have that directory on this machine.  
0
 
jkrCommented:
Hm, have you tried 'nm' on libC.a to verify that the symbol is there? Here it isn't (though I tried libc.a, since I don't have a libC.a)
0
 
mromeoAuthor Commented:
yup, I did   'nm libC.a | grep sqrt'   , and I get several definitions for it.  

sqrt(double)
sqrt(float)
sqrt()

Seems that this lib should work and my link line definitely has -lC on it, but it still doesn't link.  I would prefer to find libm since that is sqrt's "regular" home, but I don't know why my gcc doesn't have one.  The gcc install that I got was a pre-built version.  I didn't compile it myself since the machine didn't have a compiler.

0
 
jkrCommented:
Where did you get your binaries from? Try e.g. http://aixpdslib.seas.ucla.edu/packages/gcc.html which is listed on http://gcc.gnu.org/install/binaries.html
0
 
mromeoAuthor Commented:
That is where they came from. I don't see a libm.a in that gcc tar file.
0
 
jkrCommented:
>>On my other AIX box, it is in /usr/ccs/lib

Have you tried copying that one to your current machine?
0
 
mromeoAuthor Commented:
no because they are different OSs. One is AIX 4.3. and the other is AIX 5.3
0
 
jkrCommented:
If the GCC versions match, that should not matter. Hey, that lib contains math code, nothing OS specific ;o)
0
 
mromeoAuthor Commented:
But they are not the same.  One is gcc 3.3.4 and the other is gcc 4.1.1

Is there an AIX package that needs to be installed that contains these libraries?
0
 
jkrCommented:
I'd give that a try even if they don't match exactly. The worst thing could be that you'd have to delete that lib if it does not work.
0
 
mromeoAuthor Commented:
I'll give that a try, but I think I may need to have these two packages installed:

bos.adt.libm      --  Base Application Development
bos.adt.syscalls  -- System Calls Application

Do you know anything about these?
0
 
jkrCommented:
Nope, I am not really familiar with AIX in particular. Yet the first one seems to only have that name by coincidence.
0
 
mromeoAuthor Commented:
Well, I put the libm.a from the other machine onto this box, reran configure and make, and it all seemed to make.  Thanks for your help.

0
 
jkrCommented:
You're most welcome. Fortunately, the .lib formats don't change frequently.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 9
  • 8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now