← Back to team overview

kicad-developers team mailing list archive

Interesting DLL Hell with SSL

 

Just thought I'd share this anomaly/DLL hell in case anyone had any
insights into what the actual cause is.

I noticed that if I entered the closed environment I use for the local
install of KiCad and run one of the KiCad python scripts from the command
line, _pcbnew.pyd would fail to load with a rather odd message.

After some investigation I found the attached behaviour. Python loads (with
LoadLibrary()) _pcbnew.pyd which is now dependant on libeay32.dll which is
part of the OpenSSL library, and as is shown in the log it finds it, in the
32-bit support layer SysWOW64! Quite why it's there is anybody's guess.
Worse still, it depends on MSVCR90.dll, so this is also loaded. It soon all
falls apart after that.

There is a solution in putting the DLLs in the same folder as this search
path wins. I don't understand where the SysWOW64 search path comes from, a
typical MS magical rule no-doubt.

The Microsoft information doesn't appear to offer much help on the matter.
libeay32.dll is not in the known DLL list:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx

In PCBNEW it's not a problem because the correct libeay32.dll is loaded
because it's in the same directory as PCBNEW - so when python needs it, it
doesn't need to be re-loaded.

Bazaar!

Best Regards,

Brian.

Attachment: pcbnew_pyd_load_wrong_ssl.jpg
Description: JPEG image


Follow ups