----- Original Message ----- From: "Richie" <listm...@triad.rr.com>
Here are some notes so far (and failures).  On Solaris I had to build
shared libs to avoid this issue, but shared seems to be more problematic
though.   Are you using gcc 4.5 and source versions of these packages
comparable to what I'm attempting to compile?

I've successfully used both 3.4.5 and 4.6.0  - 4.5 should be fine.

As regards my version of MSYS:

$ uname -a
MINGW32_NT-6.0 DESKTOP2 1.0.11(0.46/3/2) 2007-07-29 17:16 i686 unknown

The libssh2 failure in your attachment arises because libssh2.a has been statically built (probably because openssl is static, as you suspected) but then the process still goes looking for dynamic symbols (the '_imp__' prefix).

Usually there's a message about this in the build output (before the library gets built).

I don't have a dynamic build of openssl, though I think I've probably tried in the past. I'll give it another go later today and see if I can get anywhere. I'm fairly sure you'll need a dynamic openssl to build a dynamic libssh2. (The Strawberry build of openssl may be usable here if all else fails.)

If you decide that a static build of libssh2 will suffice, first run 'make distclean', then :

##############################
In the configure script, change:

case "$host" in
   *-mingw*)
   CFLAGS="$CFLAGS -DLIBSSH2_WIN32 -DWINSOCK_VERSION=0x0200"
   LIBS="$LIBS -lws2_32"
   ;;

to:

case "$host" in
   *-mingw*)
   CFLAGS="$CFLAGS -DWINSOCK_VERSION=0x0200"
   LIBS="$LIBS -lws2_32 -lgdi32"
   ;;

##############################

(That is, remove the '-DLIBSSH2_WIN32' and add the '-lgdi32'.)

Then (obviously) re-run ./configure with the static and shared args reversed , 'make', 'make check' and 'make install'.

Attached is the Net::SSH2 Makefile.PL that I then use to build the module against the static libssh2 library. It contains some hard coded paths (to msys headers and libraries) which may well be the same as on your machine .... or might not. Modify those as needed and you should be right.

(It would, of course, be good to be able to also build a libssh2 *dll* - so I'll put a bit of effort into that as time permits. I expect that the reason I don't already have one somewhere is that I didn't succeed in building openssl shared libs.)

Cheers,
Rob

Attachment: Makefile.PL
Description: Binary data

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to