public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* CMake support into libssh-0.8.7-1 is broken.
@ 2022-01-14 22:30 Carlo B.
  2022-01-15 13:19 ` Marco Atzeri
  0 siblings, 1 reply; 4+ messages in thread
From: Carlo B. @ 2022-01-14 22:30 UTC (permalink / raw)
  To: cygwin

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CMake support into libssh-0.8.7-1 is broken.
  2022-01-14 22:30 CMake support into libssh-0.8.7-1 is broken Carlo B.
@ 2022-01-15 13:19 ` Marco Atzeri
  2022-01-20 19:06   ` Marco Atzeri
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Atzeri @ 2022-01-15 13:19 UTC (permalink / raw)
  To: cygwin

On 14.01.2022 23:30, Carlo B. wrote:
> 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.
> 

noted

Regards
Marco


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CMake support into libssh-0.8.7-1 is broken.
  2022-01-15 13:19 ` Marco Atzeri
@ 2022-01-20 19:06   ` Marco Atzeri
  2022-01-21 20:22     ` Carlo B.
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Atzeri @ 2022-01-20 19:06 UTC (permalink / raw)
  To: cygwin

On 15.01.2022 14:19, Marco Atzeri wrote:
> On 14.01.2022 23:30, Carlo B. wrote:
>> 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)
>>
>>

>>
>> 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.
>>
> 
> noted
> 
> Regards
> Marco
> 

what´s happening if  you try to use libssh2 ?

Currently libssh is without maintainer and it is anyway obsolete
so probably you should build with libssh2

Regards
Marco







^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CMake support into libssh-0.8.7-1 is broken.
  2022-01-20 19:06   ` Marco Atzeri
@ 2022-01-21 20:22     ` Carlo B.
  0 siblings, 0 replies; 4+ messages in thread
From: Carlo B. @ 2022-01-21 20:22 UTC (permalink / raw)
  To: cygwin

Hello,

Il giorno gio 20 gen 2022 alle ore 20:07 Marco Atzeri
<marco.atzeri@gmail.com> ha scritto:
>
> On 15.01.2022 14:19, Marco Atzeri wrote:
> > On 14.01.2022 23:30, Carlo B. wrote:
> >> 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)
> >>
> >>
>
> >>
> >> 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.
> >>
> >
> > noted
> >
> > Regards
> > Marco
> >
>
> what´s happening if  you try to use libssh2 ?
>

Thank you for the reply.
Unfortunately, I doubt that it can be possible because libssh is
required for building Codelite for CYGWIN.
About the crash of CYGWIN GCC when building the latest source of
libssh, this is caused by the "-fstack-clash-protection" option.
However, according to this issue at bugzilla for GCC:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458

it should not be used when the target platform is Windows and derivates.

> Currently libssh is without maintainer and it is anyway obsolete
> so probably you should build with libssh2
>
This is a bad news actually, I mean the missing maintaner.

Sincerely.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-21 20:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 22:30 CMake support into libssh-0.8.7-1 is broken Carlo B.
2022-01-15 13:19 ` Marco Atzeri
2022-01-20 19:06   ` Marco Atzeri
2022-01-21 20:22     ` Carlo B.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).