Please login or register.

Login with username, password and session length
gfx gfx
1587 Posts in 527 Topics by 770 Members - Latest Member: ivanc August 09, 2022, 08:59:24 AM
gfx* Home | Help | Search | Login | Register | gfx
Absoft User Forum  |  Support  |  Linux  |  Static Compilation - Missing function

Author Topic: Static Compilation - Missing function  (Read 5245 times)


  • Newbie
  • *
  • Posts: 1
Static Compilation - Missing function
« on: September 27, 2010, 06:25:11 PM »
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.


  • Administrator
  • Sr. Member
  • *****
  • Posts: 329
Re: Static Compilation - Missing function
« Reply #1 on: September 28, 2010, 06:18:07 AM »
Can you provide a short example and the compile/link command you are using?

Absoft User Forum  |  Support  |  Linux  |  Static Compilation - Missing function

gfx gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!