Package Details: mingw-w64-libssh2 1.11.1-1

Git Clone URL: https://aur.archlinux.org/mingw-w64-libssh2.git (read-only, click to copy)
Package Base: mingw-w64-libssh2
Description: A library implementing the SSH2 protocol as defined by Internet Drafts (mingw-w64)
Upstream URL: http://www.libssh2.org
Licenses: BSD
Submitter: Schala
Maintainer: patlefort
Last Packager: patlefort
Votes: 12
Popularity: 0.000000
First Submitted: 2012-08-12 08:00 (UTC)
Last Updated: 2024-10-16 20:09 (UTC)

Latest Comments

patlefort commented on 2021-11-20 20:06 (UTC)

Libssh2Config-release.cmake should be fixed now.

bpierre commented on 2021-11-20 19:46 (UTC)

Some of the resulting libraries have the wrong name (liblibssh2.dll.a). It looks like the cmake directive set_target_properties(libssh2 PROPERTIES PREFIX "") is not honored when building with mingw... Here's a patch to fix things:

 PKGBUILD | 3 +++
 1 file changed, 3 insertions(+)

diff --git i/PKGBUILD w/PKGBUILD
index 03d350c..dbee58f 100644
--- i/PKGBUILD
+++ w/PKGBUILD
@@ -53,5 +53,8 @@ package() {
        DESTDIR="${pkgdir}" cmake --install "build-${_arch}"
        ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
        ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+       # Fix library name: `liblibssh2.dll.a` -> `libssh2.dll.a`
+       mv "$pkgdir"/usr/${_arch}/lib/{liblibssh2,libssh2}.dll.a
+       sed -i 's/liblibssh2/libssh2/g' "$pkgdir"/usr/${_arch}/lib/cmake/libssh2/Libssh2Config-release.cmake
    done
 }

patlefort commented on 2021-11-20 19:31 (UTC)

@mickael9 Thanks, should be fixed now. Seems like a cmake issue not respecting the PREFIX property for .dll.a files.

mickael9 commented on 2021-11-20 18:48 (UTC) (edited on 2021-11-20 18:49 (UTC) by mickael9)

Hi,

It seems that the switch to cmake causes build errors in mingw-w64-curl:

checking for in_addr_t... no
checking for in_addr_t equivalent... unknown
configure: error: Cannot find a type to use in place of in_addr_t

Looking at configure log we can see the reason the test fails:

configure:34782: i686-w64-mingw32-gcc -o conftest.exe -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection -Werror-implicit-function-declaration -Wno-system-headers -Wenum-conversion -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -I/usr/i686-w64-mingw32/include  -I/usr/i686-w64-mingw32/include  -I/usr/i686-w64-mingw32/include  -I/usr/i686-w64-mingw32/include  -Wl,-O1,--sort-common,--as-needed -fstack-protector  -L/usr/i686-w64-mingw32/lib  -L/usr/i686-w64-mingw32/lib  -L/usr/i686-w64-mingw32/lib  -L/usr/i686-w64-mingw32/lib  conftest.c -L/usr/i686-w64-mingw32/lib -lssh2 -lcrypt32  -lpsl  -ladvapi32 -lcrypt32 -lssl -lcrypto -lssl -lcrypto  -lgdi32 -lwldap32 -lz -lws2_32  >&5
/usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld: cannot find -lssh2

Which prompted me to inspect the contents of mingw-w64-libssh2 package:

$ pacman -Ql mingw-w64-libssh2|grep dll
mingw-w64-libssh2 /usr/i686-w64-mingw32/bin/libssh2.dll
mingw-w64-libssh2 /usr/i686-w64-mingw32/lib/liblibssh2.dll.a
mingw-w64-libssh2 /usr/x86_64-w64-mingw32/bin/libssh2.dll
mingw-w64-libssh2 /usr/x86_64-w64-mingw32/lib/liblibssh2.dll.a

As you can see the static libs seem to have a duplicate "lib" prefix (liblibssh2.dll.a)

To confirm this is the problem, I rolled back libssh2 to the previous version, and the contents are different (and curl builds fine):

$ pacman -Ql mingw-w64-libssh2|grep dll
mingw-w64-libssh2 /usr/i686-w64-mingw32/bin/libssh2-1.dll
mingw-w64-libssh2 /usr/i686-w64-mingw32/lib/libssh2.dll.a
mingw-w64-libssh2 /usr/x86_64-w64-mingw32/bin/libssh2-1.dll
mingw-w64-libssh2 /usr/x86_64-w64-mingw32/lib/libssh2.dll.a

xantares commented on 2013-11-06 16:21 (UTC)

hello, could you replace !libtool by staticlibs please ? xan.