http://www.perlmonks.org?node_id=978172


in reply to Tkx and PERL_DL_NONLAZY

My guess is that 2 libraries in your chain have the same symbol and a dlopen is called with something like LT_GROUP or LT_GLOBAL. When running with PERL_DL_NONLAZY the undefined symbol is resolved correctly but without it, the undefined symbol is resolved in another library and it probably takes different arguments. I've seen this before. It is hard to debug.

When I first hit this it was with unixODBC and some ODBC drivers when we put together Why do I get "SQLSetConnectOption err=-2" errors in my Perl scripts.

Replies are listed 'Best First'.
Re^2: Tkx and PERL_DL_NONLAZY
by Anonymous Monk on Jun 25, 2012 at 12:48 UTC

    Hmm, kinda hard to believe, IIRC even win32 won't look for symbols in a different dll/so

    If you can trigger it, strace ought to help -- also lsof -p, or ldd /objdump

      Read dlopen man page and look at LT_GROUP, LT_GLOBAL etc. Those flags change the way symbols are resolved. As you can change the way symbols are resolved if you have 2 symbols with the same name you can pick the wrong one e.g., symbols can be resolved downwards or from the top. I've seen it happen.

      See Why do I get "SQLSetConnectOption err=-2" errors in my Perl scripts for an example.