in reply to Making Net::SSH2

Hi,

As I understand from ActiveState, the underlying reason is that the .exe uses Windows (8.1) dynamic loading for any dependent libraries.

I have no idea whether that's correct.
A bit more info on what's happening there might help.

You could also try:
ppm install http://www.sisyphusion.tk/ppm/Net-SSH2.ppd --force

That should install a Net-SSH2-0.53 that was built against static libs. It also installs a couple of dll's that need to be loaded at runtime, and it might be that those 2 dll's need to be explicitly loaded into the app. (You should find them in your $Config{sitebin}.)

As to the actual error that's killing your build it seems that both your perl and your mingw have decided to independently prototype a function named "mkstemp".
None of my mingw versions of stdlib.h contain such a function, but your mingw stdlib.h apparently does. (I don't have a mingw.org build of 4.8.1.)

I don't know how one is supposed to correctly deal with this, but both versions take a char* arg and return an int.
I would therefore try commenting out the prototype in either stdlib.h or win32.h, then run 'dmake', and then reinstate the removed the prototype after the build has finished.

This is a problem that should arise for every perl extension that you attempt to build, and has nothing particularly to do with Net::SSH2.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Making Net::SSH2
by martydavis (Initiate) on Feb 10, 2015 at 12:55 UTC

    Ever so grateful for your suggestions. I tried the statically compiled version with ppm as well as editing stdlib.h. The ppm method worked fine up to using the wrapped exe - same problem. The script runs fine but dies on connect. (works fine in Komodo!) Also, your suggestion fixed the dmake error but, alas, same problem with the PerlApp exe. Maybe static recompiling isn't the solution here. Any other ideas?

      The script runs fine but dies on connect.

      The error messages might be useful - depending upon what they are (if they exist ;-)

      If you're not getting any useful error messages && you're building libssh2 by running Configure in the msys shell, it might be helpful to have a debug build of the library - which you can get by providing the --enable-debug option to Configure.

      Cheers,
      Rob