undefined symbol __preinit_array_end

I have build a dynamique library with pfg90, PyMt3d.so.
This library is use in a program in python langage.
I occure a problem with the run with the message follow :

from PyMt3d import *
ImportError: /codes/alliance/alliances_current_tma/build/lib/PyMt3d.so: undefined symbol: __preinit_array_end

than you

Hi Libellule,

I’m not sure where this symbol is defined, it’s not a PGI library routine, so I don’t know which library you are missing. One idea is to try the command ‘ldd PyMt3d.so’ to see what depenancies your shared object has. You may simply not have a dependent library’s path set in your LD_LIBRARY_PATH environment variable and the Python call to dlopen can’t find the library.

Another thing you could try is to use pgf90 to create your shared object. From your previous post, I see you calling ld directly. This is generally not the prefered method since you may have incorrect flags and/or missing libraries. Please refer to section 8.2 of the PGI User’s Guide for more information on creating shared objects.

  • Mat