Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28441 Discussions

linking error when building shared library

may_ka
Beginner
1,249 Views

Hi,

compiling my library with

ifort -O3 -mkl=sequential -warn nounused -warn declarations -fPIC -c *.f90

and subsequently linking with

ifort -shared -Wl,-soname,tmp.so -o tmp.so *.o

yields

ld: tmp.so: version node not found for symbol mod_Test_20160424_single@sort._
ld: failed to set dynamic section sizes: Bad value

The Subroutine "sort" is located in a submodule SubMod_Test_20160424_Single_Sort.f90 of which parent module is Mod_Test_20160424_Single.f90.

Any idea what the problem is??

Thanks

Karl

0 Kudos
7 Replies
may_ka
Beginner
1,249 Views

And here the minimal example:

Module Mod_A
  Interface
    Module Subroutine SubA(a,b)
      Integer*8, Intent(In) :: a,b
    End Subroutine
  End Interface
End Module Mod_A
Submodule(Mod_A) SubMod_A
contains
  Module Procedure SubA
    Implicit None
    write(*,*) a,b
  End Procedure
End Submodule SubMod_A

compiled with

ifort -c -fPIC Mod_A.f90
ifort -c -fPIC SubMod_A.f90

and linked with

ifort -shared -o tmp.so *.o

yields

ld: tmp.so: version node not found for symbol mod_a@submod_a._
ld: failed to set dynamic section sizes: Bad value

 

0 Kudos
Kevin_D_Intel
Employee
1,249 Views

Perfect! Thank you. I don't believe we've seen this error before. We've received other recent reports of linking issues involving submodules on Linux related to our decoration's use of @ but I don't know whether that is at play here. We'll investigate, stay tuned.

0 Kudos
Kevin_D_Intel
Employee
1,249 Views

This is related to an earlier case (here) found to be caused by the use of ‘@’ within our submodule name decoration. While not shown in the post, the test case provided for the earlier report produces the identical error to what you showed. I also confirmed your test case does successfully link using an internal development compiler containing the fix for the earlier reported case. The associated fix uses a period (.) in place of the ‘@’.

Unfortunately there is not a convenient work around. The fix is expected to be in our upcoming PSXE 2016 Update 4 in the coming month.

(Internal tracking id: DPD200413624)

(Resolution Update on 06/02/2017): This defect is fixed in the Intel® Parallel Studio XE 2017 Update 4 release (ifort Version 17.0.4.196 Build 20170411 - PSXE 2017.2.056 / CnL 2017.4.196 - Linux)

0 Kudos
may_ka
Beginner
1,249 Views

Hi,

thanks. I urgently need that update. I have moved almost completely to submodule structure.

Cheers

0 Kudos
may_ka
Beginner
1,249 Views

Hi Intel,

I just tried to do the above example. It's still the same bug. I have now ifort 17 runnig which I expected to include all the bug fixes from update 4. Is this not the case???

0 Kudos
Steven_L_Intel1
Employee
1,249 Views

It's not the case - there are some bug fixes that went into 16.0.4 that weren't in 17.0.0 (but will be in 17.0.1.) Version 17 "froze" in July.

0 Kudos
Kevin_D_Intel
Employee
1,249 Views

This defect is fixed in the Intel® Parallel Studio XE 2017 Update 4 release (ifort Version 17.0.4.196 Build 20170411)

0 Kudos
Reply