Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Intel Customer Support will be observing the Martin Luther King holiday on Monday, Jan. 17, and will return on Tues. Jan. 18.
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

linking error when building shared library

may_ka
Beginner
242 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
242 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

 

Kevin_D_Intel
Employee
242 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.

Kevin_D_Intel
Employee
242 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)

may_ka
Beginner
242 Views

Hi,

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

Cheers

may_ka
Beginner
242 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???

Steven_L_Intel1
Employee
242 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.

Kevin_D_Intel
Employee
242 Views

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

Reply