X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D2A063858411
Authentication-Results: sourceware.org;
 dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:from:date:message-id:subject:to
 :content-transfer-encoding;
 bh=UXJH25wF7RzZpUa+nAv83gabtf0S6U+bUQVp273ZvzE=;
 b=GhLm06r0WAMmCD2d6zLgE7G3YTg6xSfF0pOQA6Gfut8uROQ3dAAnSEMV0Hugq1cVmM
 Y+gVy+CRSkAJw3Xw3Lz7/ATKtQGn5efOGOe2SqVFST1CGsEP4NCCl1KCw5kgTbQqwx5r
 bOKHKpsOTwHZb/+I0QsP+KkCHlTBaCfNM6sXLGSVE+5lWjLgzvB64x44IgluJVl4/DrK
 bgxd6adxPwN6EWQOYCiilfuq9xVS2AqCcbX0SSKTf1TRU4RivlYqdIWLM3bCBZ0nyqi1
 0+KoZdcUtnfq9KcsdKYmic+F4OE6GWmlDnFLZo5Fe3xLuNd24UVXRIwXM74nkRc9YkNk
 Qozw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to
 :content-transfer-encoding;
 bh=UXJH25wF7RzZpUa+nAv83gabtf0S6U+bUQVp273ZvzE=;
 b=mBFMjS43fm1ijlMGzSgZIL6gcyDCQZSPmdqPooBj5OsOZqMMXXLz1Rk2z7YMG7AoBr
 2M8vzrxhNPSeto+er1v4s9zQJi17NDkYnGpdG9vjoTf9sOYOpFAl7TFvF7ib4azV1Ylf
 Fh7HeCRasFRuAqOhHsSlqwzBUJbGeLnr9xMx7q2et9P67tKWn1sI7odHHygecKNHb3YW
 G0PZntKpohr7CHQHa9DspydX5a16HXiLBa613IryG0zY0MvyFH/5TKmgIIQ01bf3eBgZ
 i/p6/0JsP9F8X9KhhElPW9Gm2G3k5s0swcDehFfa8CixBLyr6tKEZgzCMM0akr5gZWWK
 tgqg==
X-Gm-Message-State: AOAM533btPnni6EwBcE4vJ6tcbMt/c7rWvvKE5YziXGWsfOWJ03a4F+i
 ruAO8JmzD6kEMuEdUp4TNW8Yd6Qy7LUrTiOlEcTtdYi2WLw=
X-Google-Smtp-Source: ABdhPJzermm5TPDb+aXaEiNAShwsyF3JnpIJNsB/UjU6xihin0JbmYHsZsw5eJ+uKrZST316c0N76kP0hw0IP0quVjA=
X-Received: by 2002:a17:907:6287:: with SMTP id
 nd7mr8607966ejc.152.1642199428657; 
 Fri, 14 Jan 2022 14:30:28 -0800 (PST)
MIME-Version: 1.0
From: "Carlo B." <carlo.bramini@gmail.com>
Date: Fri, 14 Jan 2022 23:30:19 +0100
Message-ID: <CADt9577Ypepv3S25SnPTeGx+MeX2fn=72VY1ejqPx_ASqb99Hw@mail.gmail.com>
Subject: CMake support into libssh-0.8.7-1 is broken.
To: cygwin@cygwin.com
X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
 SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 20EMVZC2019591

Hello,
I discovered that CMake support into current libssh-0.8.7-1 is broken.
After you installed the development package, you just need to add this
line into a dummy CMakeLists.txt:


find_package(libssh)


and into the console you will read:


CMake Error at /usr/lib/cmake/libssh/libssh-config.cmake:21 (message):
  File or directory /usr/lib/cygssh.dll referenced by variable
  LIBSSH_LIBRARIES does not exist !


The error is correct because, if you open
/usr/lib/cmake/libssh/libssh-config.cmake, you will see this code:


if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/CMakeCache.txt")
    # In tree build
    set_and_check(LIBSSH_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/include")
    set_and_check(LIBSSH_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/lib/cygssh.dll")
else()
    set_and_check(LIBSSH_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include")
    set_and_check(LIBSSH_LIBRARIES "${PACKAGE_PREFIX_DIR}/lib/cygssh.dll")
endif()


which is wrong since the right value for LIBSSH_LIBRARIES should be
"${PACKAGE_PREFIX_DIR}/bin/cygssh-4.dll" or
"${CMAKE_CURRENT_LIST_DIR}/bin/cygssh-4.dll".
After that, I downloaded the latest stable libssh-0.9.6, I tried to
build it but it crashes with an internal GCC error at compile time:


during RTL pass: final
/home/Carlo/libssh-0.9.6/src/sftp.c: In function ‘sftp_packet_read’:
/home/Carlo/libssh-0.9.6/src/sftp.c:549:1: internal compiler error: in
i386_pe_seh_unwind_emit, at config/i386/winnt.c:1275
  549 | }
      | ^


So, I downloaded the latest sources from the repository: GCC still
emits an internal compiler error, but only when building the examples.
So I configured with -DWITH_EXAMPLES=OFF and I got the base library
compiled.
Here, I verified that the macros for CMake are generated correctly
with the right names and paths.

Is it possible to fix or update this package?
Thank you very much for your time.

Sincerely.

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

