Subject: bug#78029: closed (Re: bug#78029: libssh-0.11.1 fails to cross compile)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 24 Apr 2025 09:22:05 +0000

Your bug report

#78029: libssh-0.11.1 fails to cross compile

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
78029: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78029
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#78029: libssh-0.11.1 fails to cross compile
From: Ludovic Courtès <[email-masked]>
To: yelninei--- via Bug reports for GNU Guix <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Thu, 24 Apr 2025 11:21:04 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

yelninei--- via Bug reports for GNU Guix <[email-masked]> writes:

> Since commit b12d44dd5e35ac236bf3fbb5619b9c8c2f42c902 turned on tests
> and switchted to gexps the package no longer cross compiles, which is
> a dependency of guile-ssh (and guix).
>
> When cross compiling to a 32bit target (tested with i586-pc-gnu)
> something goes wrong ungexp-splicing the extra CFLAGS and the literal
> list procedure is inserted for the cflags:

Fixed:

  93f61013db gnu: libssh: Restore support for cross-compilation.
  f88be0a5b3 gnu: libssh: Fix #:configure-flags for cross-compilation to 32-bit.

Someday we’ll get childhurd support for more than two days in a row.
:-)

Thanks,
Ludo’.

Subject: libssh-0.11.1 fails to cross compile
From: [email-masked]
To: [email-masked]
Date: Thu, 24 Apr 2025 09:21:17 +0200 (CEST)
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Since commit b12d44dd5e35ac236bf3fbb5619b9c8c2f42c902 turned on tests and switchted to gexps the package no longer cross compiles, which is a dependency of guile-ssh (and guix).

When cross compiling to a 32bit target (tested with i586-pc-gnu) something goes wrong ungexp-splicing the extra CFLAGS and the literal list procedure is inserted for the cflags:

starting phase `configure'
source directory: "/tmp/guix-build-libssh-0.11.1.drv-0/libssh-0.11.1" (relative from build: "../libssh-0.11.1")
build directory: "/tmp/guix-build-libssh-0.11.1.drv-0/build"
running 'cmake' with arguments ("../libssh-0.11.1" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_INSTALL_PREFIX=/gnu/store/q1zi25van8xrzmi7gmj28rw8q9cwx7s1-libssh-0.11.1" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" "-DCMAKE_INSTALL_RPATH=/gnu/store/q1zi25van8xrzmi7gmj28rw8q9cwx7s1-libssh-0.11.1/lib" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DCMAKE_C_COMPILER=i586-pc-gnu-gcc" "-DCMAKE_CXX_COMPILER=i586-pc-gnu-g++" "-DCMAKE_SYSTEM_NAME=GNU" "-DWITH_GCRYPT=ON" "-DUNIT_TESTING=ON" #<procedure list _> "-DCMAKE_C_FLAGS=-g -O2 -Wno-incompatible-pointer-types")
error: in phase 'configure': uncaught exception:
wrong-type-arg #f "Wrong type (expecting ~A): ~S" ("string" #<procedure list _>) (#<procedure list _>) 

Even a 64bit target (tested with aarch64-linux-gnu) fails because it cant find cmocka but i assume the tests can not be run when cross compiling anyway?
CMake Error at /gnu/store/mnmn1rcllrimsyr9k8r9i00jqfmcrflk-cmake-minimal-cross-3.24.2/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find CMocka (missing: CMOCKA_LIBRARIES CMOCKA_INCLUDE_DIR)
Call Stack (most recent call first):
  /gnu/store/mnmn1rcllrimsyr9k8r9i00jqfmcrflk-cmake-minimal-cross-3.24.2/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindCMocka.cmake:63 (find_package_handle_standard_args)
  CMakeLists.txt:59 (find_package)

There is also a deperecation warning for the gcrypt backend

-- Found GCrypt: /gnu/store/r02yh1bm9gbm2klmmvqy483v50rmnsw8-libgcrypt-1.11.0/include (found suitable version "1.11.0", minimum required is "1.5.0") 
CMake Warning at CMakeLists.txt:51 (message):
  libgcrypt cryptographic backend is deprecated and will be removed in future
  releases.

Thanks.