I am trying to do a static compilation of code for distribution across other machines. The code compiles and runs without the static option, but when the static option is invoked the following error message is returned:
/opt/absoft10.0/lib/libmv.a(vacos.o): In function `__vacos':
vacos.c:(.text+0x112): undefined reference to `sqrt'
collect2: ld returned 1 exit status
link failed.
The flags I am using are -N26 -N109 -O3 -static and I have tried linking in the following libraries: libm.a, libmv.a, libaf77math.a, libU77.a, libV77.a. All but the first are libraries from the Absoft distribution while libm.a is the usual math library.
Any thoughts on where the sqrt function may have disappeared to? I should note that the fortran DSQRT function is called frequently elsewhere in the code and this function does appear to be found. I also tried using the -f option to see if -N109 was the problem with the identical result.