Subject: Re: mingw32 cross

Re: mingw32 cross

From: salsa lover <gougolith_at_gmail.com>
Date: Wed, 13 Jan 2010 09:58:10 -0800

Here is the output, also remember i'm not using the debian repo mingw32
setup, but this one:

http://www.nongnu.org/mingw-cross-env/#introduction

alian_at_alian-laptop:~/Desktop/Temp/mingw-cross-env-2.10/Temp/libssh2-1.2.2$
./configure --host=i686-pc-mingw32 --build=i686-pc-linux-gnu
--with-libgcrypt-prefix=/home/alian/Desktop/Temp/mingw-cross-env-2.10/usr/i686-pc-mingw32/
checking whether to enable maintainer-specific portions of Makefiles... no
checking for sed... /bin/sed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for i686-pc-mingw32-strip... i686-pc-mingw32-strip
checking libssh2 version... 1.2.2
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-mingw32
configure: autobuild project... libssh2
configure: autobuild revision... 1.2.2
configure: autobuild hostname... alian-laptop
configure: autobuild timestamp... 20100113-095330
checking for style of include used by make... GNU
checking for i686-pc-mingw32-gcc... i686-pc-mingw32-gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i686-pc-mingw32-gcc accepts -g... yes
checking for i686-pc-mingw32-gcc option to accept ISO C89... none needed
checking dependency style of i686-pc-mingw32-gcc... gcc3
checking how to run the C preprocessor... i686-pc-mingw32-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for long long... yes
checking if _REENTRANT is already defined... no
checking if _REENTRANT is actually needed... no
checking if _REENTRANT is onwards defined... no
checking for library containing socket... no
checking for library containing inet_addr... no
checking for i686-pc-mingw32-gcc... (cached) i686-pc-mingw32-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether i686-pc-mingw32-gcc accepts -g... (cached) yes
checking for i686-pc-mingw32-gcc option to accept ISO C89... (cached) none
needed
checking dependency style of i686-pc-mingw32-gcc... (cached) gcc3
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for sshd... /usr/sbin/sshd
checking for i686-pc-mingw32-as... i686-pc-mingw32-as
checking for i686-pc-mingw32-dlltool... i686-pc-mingw32-dlltool
checking for i686-pc-mingw32-objdump... i686-pc-mingw32-objdump
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by i686-pc-mingw32-gcc...
/home/alian/Desktop/Temp/mingw-cross-env-2.10/usr/i686-pc-mingw32/bin/ld
checking if the linker
(/home/alian/Desktop/Temp/mingw-cross-env-2.10/usr/i686-pc-mingw32/bin/ld)
is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)...
/home/alian/Desktop/Temp/mingw-cross-env-2.10/usr/bin/i686-pc-mingw32-nm -B
checking the name lister
(/home/alian/Desktop/Temp/mingw-cross-env-2.10/usr/bin/i686-pc-mingw32-nm
-B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for
/home/alian/Desktop/Temp/mingw-cross-env-2.10/usr/i686-pc-mingw32/bin/ld
option to reload object files... -r
checking for i686-pc-mingw32-objdump... (cached) i686-pc-mingw32-objdump
checking how to recognize dependent libraries... file_magic ^x86 archive
import|^x86 DLL
checking for i686-pc-mingw32-ar... i686-pc-mingw32-ar
checking for i686-pc-mingw32-strip... (cached) i686-pc-mingw32-strip
checking for i686-pc-mingw32-ranlib... i686-pc-mingw32-ranlib
checking command to parse
/home/alian/Desktop/Temp/mingw-cross-env-2.10/usr/bin/i686-pc-mingw32-nm -B
output from i686-pc-mingw32-gcc object... ok
checking for dlfcn.h... no
checking for objdir... .libs
checking if i686-pc-mingw32-gcc supports -fno-rtti -fno-exceptions... no
checking for i686-pc-mingw32-gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if i686-pc-mingw32-gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if i686-pc-mingw32-gcc static flag -static works... yes
checking if i686-pc-mingw32-gcc supports -c -o file.o... yes
checking if i686-pc-mingw32-gcc supports -c -o file.o... (cached) yes
checking whether the i686-pc-mingw32-gcc linker
(/home/alian/Desktop/Temp/mingw-cross-env-2.10/usr/i686-pc-mingw32/bin/ld)
supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether byte ordering is bigendian... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... unknown
checking for _LARGE_FILES value needed for large files... unknown
checking for ld used by GCC...
/home/alian/Desktop/Temp/mingw-cross-env-2.10/usr/i686-pc-mingw32/bin/ld
checking if the linker
(/home/alian/Desktop/Temp/mingw-cross-env-2.10/usr/i686-pc-mingw32/bin/ld)
is GNU ld... yes
checking for shared library run path origin... done
checking for libssl... yes
checking how to link with libssl... -lssl -lcrypto
checking for libz... yes
checking how to link with libz... -lz
checking whether to enable pedantic and debug compiler options... no
checking whether to enable hidden symbols in the library... no
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking sys/uio.h usability... no
checking sys/uio.h presence... no
checking for sys/uio.h... no
checking sys/select.h usability... no
checking sys/select.h presence... no
checking for sys/select.h... no
checking sys/socket.h usability... no
checking sys/socket.h presence... no
checking for sys/socket.h... no
checking sys/ioctl.h usability... no
checking sys/ioctl.h presence... no
checking for sys/ioctl.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking arpa/inet.h usability... no
checking arpa/inet.h presence... no
checking for arpa/inet.h... no
checking netinet/in.h usability... no
checking netinet/in.h presence... no
checking for netinet/in.h... no
checking windows.h usability... yes
checking windows.h presence... yes
checking for windows.h... yes
checking winsock2.h usability... yes
checking winsock2.h presence... yes
checking for winsock2.h... yes
checking ws2tcpip.h usability... yes
checking ws2tcpip.h presence... yes
checking for ws2tcpip.h... yes
checking for poll... no
checking for gettimeofday... yes
checking for select... no
checking for strtoll... yes
checking for select in ws2_32... yes
checking for working alloca.h... no
checking for alloca... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking non-blocking sockets style... ioctlsocket
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating example/Makefile
config.status: creating example/simple/Makefile
config.status: creating docs/Makefile
config.status: creating libssh2.pc
config.status: creating src/libssh2_config.h
config.status: src/libssh2_config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
alian_at_alian-laptop:~/Desktop/Temp/mingw-cross-env-2.10/Temp/libssh2-1.2.2$
make
Making all in src
make[1]: Entering directory
`/home/alian/Desktop/Temp/mingw-cross-env-2.10/Temp/libssh2-1.2.2/src'
make all-am
make[2]: Entering directory
`/home/alian/Desktop/Temp/mingw-cross-env-2.10/Temp/libssh2-1.2.2/src'
make[2]: Leaving directory
`/home/alian/Desktop/Temp/mingw-cross-env-2.10/Temp/libssh2-1.2.2/src'
make[1]: Leaving directory
`/home/alian/Desktop/Temp/mingw-cross-env-2.10/Temp/libssh2-1.2.2/src'
Making all in example
make[1]: Entering directory
`/home/alian/Desktop/Temp/mingw-cross-env-2.10/Temp/libssh2-1.2.2/example'
Making all in simple
make[2]: Entering directory
`/home/alian/Desktop/Temp/mingw-cross-env-2.10/Temp/libssh2-1.2.2/example/simple'
/bin/bash ../../libtool --tag=CC --mode=link i686-pc-mingw32-gcc
-DLIBSSH2_WIN32 -DWINSOCK_VERSION=0x0200 -o ssh2.exe ssh2.o ../../src/
libssh2.la -lws2_32
libtool: link: i686-pc-mingw32-gcc -DLIBSSH2_WIN32 -DWINSOCK_VERSION=0x0200
-o .libs/ssh2.exe ssh2.o ../../src/.libs/libssh2.a -lssl -lcrypto -lz
-lws2_32
ssh2.o:ssh2.c:(.text+0x17c): undefined reference to
`__imp__libssh2_session_init_ex'
ssh2.o:ssh2.c:(.text+0x193): undefined reference to
`__imp__libssh2_session_startup'
ssh2.o:ssh2.c:(.text+0x1de): undefined reference to
`__imp__libssh2_hostkey_hash'
ssh2.o:ssh2.c:(.text+0x250): undefined reference to
`__imp__libssh2_userauth_list'
ssh2.o:ssh2.c:(.text+0x39e): undefined reference to
`__imp__libssh2_userauth_password_ex'
ssh2.o:ssh2.c:(.text+0x3fe): undefined reference to
`__imp__libssh2_userauth_keyboard_interactive_ex'
ssh2.o:ssh2.c:(.text+0x474): undefined reference to
`__imp__libssh2_userauth_publickey_fromfile_ex'
ssh2.o:ssh2.c:(.text+0x4e5): undefined reference to
`__imp__libssh2_channel_open_ex'
ssh2.o:ssh2.c:(.text+0x548): undefined reference to
`__imp__libssh2_channel_setenv_ex'
ssh2.o:ssh2.c:(.text+0x595): undefined reference to
`__imp__libssh2_channel_request_pty_ex'
ssh2.o:ssh2.c:(.text+0x5f0): undefined reference to
`__imp__libssh2_channel_process_startup'
ssh2.o:ssh2.c:(.text+0x631): undefined reference to
`__imp__libssh2_channel_free'
ssh2.o:ssh2.c:(.text+0x65d): undefined reference to
`__imp__libssh2_session_disconnect_ex'
ssh2.o:ssh2.c:(.text+0x66a): undefined reference to
`__imp__libssh2_session_free'
collect2: ld returned 1 exit status
make[2]: *** [ssh2.exe] Error 1
make[2]: Leaving directory
`/home/alian/Desktop/Temp/mingw-cross-env-2.10/Temp/libssh2-1.2.2/example/simple'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/alian/Desktop/Temp/mingw-cross-env-2.10/Temp/libssh2-1.2.2/example'
make: *** [all-recursive] Error 1

On Wed, Jan 13, 2010 at 1:31 AM, Simon Josefsson <simon_at_josefsson.org>wrote:

> salsa lover <gougolith_at_gmail.com> writes:
>
> > I'm using a custom built mingw32 environment under my homedir, (not from
> > repository).
> > I've already copied those files from libssh2 binary build into lib and
> > include. So as for cross compiling
> > libssh2 i've given up. I'm trying to integrate the cross compiler with
> > codeblocks now.
>
> I'm cross compiling libssh2 using MinGW/Wine from debian, in fact all
> the Windows binaries on http://josefsson.org/gnutls4win/ are generated
> that way. There shouldn't be any major problems doing this. What
> errors did you get? I am aware that libssh2 in git doesn't currently
> cross-compile well, but that's a separate issue.
>
> /Simon
>
> > On Tue, Jan 12, 2010 at 5:53 PM, Peter Stuge <peter_at_stuge.se> wrote:
> >
> >> salsa lover wrote:
> >> > Since i dont wanna a create issues by just copying over the
> >> > precompiled libssh2 win32 binaries over my existing deps since i
> >> > already have those nicely compiled, is there a quick fix here?
> >>
> >> Find libssh2.a (it should be in src/.libs/) and copy it to your mingw
> >> lib directory. Copy libssh2.h libssh2_sftp.h and libssh2_publickey.h
> >> to the include directory.
> >>
> >> For my mingw32 cross toolchain built with Gentoo crossdev that means
> >> /usr/i686-mingw32/usr/lib/ and /usr/i686-mingw32/usr/include/ but I
> >> don't know which paths debian uses.
> >>
> >>
> >> > the libs are built ok but not the examples.
> >>
> >> Please show us the error messages that you get.
> >>
> >>
> >> //Peter
> >> _______________________________________________
> >> libssh2-devel
> http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
> >>
> > _______________________________________________
> > libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-01-13