[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to build libssh


Hi,
you seems to have some non-standard OpenSSL version installed. There
is a patch (already part of master) that detects the FIPS_mode() macro
and gracefully falls back if not found:

https://gitlab.com/libssh/libssh-mirror/-/commit/0d4658740b4a7f94cdbbfaa6d4d7dbc047660d4c

If it will work for you, I will backport it to th 0.10.x branch for a
next release.

Jakub

On Sun, Jun 2, 2024 at 9:11 AM Mikael Petterson
<mikael.petterson@xxxxxxxxxxxx> wrote:
>
> Hi,
>
> I am trying to build libssh 0.10.6 from source.
>
> I am using:
>
> git clone https://git.libssh.org/projects/libssh.git && cd libssh && git checkout tags/libssh-0.10.6 && \
>
>       mkdir build && cd build && \
>
>       cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE="Release" -DWITH_ZLIB=ON -DWITH_GSSAPI=OFF -DWITH_NACL=OFF -DWITH_PCAP=OFF -DWITH_SERVER=OFF -DOPENSSL_ROOT_DIR=/usr/local/openssl .. && \
>
>       make -j2 && \
>
>       make install
>
>
>
>
>
> I get this error:
>
>
> 12.90 -- Build files have been written to: /opt/dev/libssh/build
>
> 13.02 Scanning dependencies of target ssh
>
> 13.06 [  1%] Building C object src/CMakeFiles/ssh.dir/agent.c.o
>
> 13.06 [  2%] Building C object src/CMakeFiles/ssh.dir/auth.c.o
>
> 13.44 [  3%] Building C object src/CMakeFiles/ssh.dir/base64.c.o
>
> 13.59 [  4%] Building C object src/CMakeFiles/ssh.dir/bignum.c.o
>
> 13.64 [  5%] Building C object src/CMakeFiles/ssh.dir/buffer.c.o
>
> 13.77 [  6%] Building C object src/CMakeFiles/ssh.dir/callbacks.c.o
>
> 13.97 [  7%] Building C object src/CMakeFiles/ssh.dir/channels.c.o
>
> 14.17 [  8%] Building C object src/CMakeFiles/ssh.dir/client.c.o
>
> 14.49 [  9%] Building C object src/CMakeFiles/ssh.dir/config.c.o
>
> 15.22 [ 10%] Building C object src/CMakeFiles/ssh.dir/connect.c.o
>
> 15.68 [ 11%] Building C object src/CMakeFiles/ssh.dir/connector.c.o
>
> 15.79 [ 12%] Building C object src/CMakeFiles/ssh.dir/crypto_common.c.o
>
> 15.98 [ 13%] Building C object src/CMakeFiles/ssh.dir/curve25519.c.o
>
> 16.01 [ 13%] Building C object src/CMakeFiles/ssh.dir/dh.c.o
>
> 16.32 [ 14%] Building C object src/CMakeFiles/ssh.dir/ecdh.c.o
>
> 16.41 [ 15%] Building C object src/CMakeFiles/ssh.dir/error.c.o
>
> 16.56 [ 16%] Building C object src/CMakeFiles/ssh.dir/getpass.c.o
>
> 16.65 [ 17%] Building C object src/CMakeFiles/ssh.dir/init.c.o
>
> 16.73 [ 18%] Building C object src/CMakeFiles/ssh.dir/kdf.c.o
>
> 16.83 [ 19%] Building C object src/CMakeFiles/ssh.dir/kex.c.o
>
> 16.96 In file included from /opt/dev/libssh/include/libssh/wrapper.h:28:0,
>
> 16.96                  from /opt/dev/libssh/include/libssh/crypto.h:36,
>
> 16.96                  from /opt/dev/libssh/include/libssh/dh.h:26,
>
> 16.96                  from /opt/dev/libssh/src/kex.c:34:
>
> 16.96 /opt/dev/libssh/src/kex.c: In function 'ssh_client_select_hostkeys':
>
> 16.96 /opt/dev/libssh/include/libssh/libcrypto.h:107:26: error: implicit declaration of function 'FIPS_mode' [-Werror=implicit-function-declaration]
>
> 16.96  #define ssh_fips_mode() (FIPS_mode() != 0)
>
> 16.96                           ^
>
> 16.96 /opt/dev/libssh/src/kex.c:680:13: note: in expansion of macro 'ssh_fips_mode'
>
> 16.96          if (ssh_fips_mode()) {
>
> 16.96              ^~~~~~~~~~~~~
>
> 16.98 [ 20%] Building C object src/CMakeFiles/ssh.dir/known_hosts.c.o
>
> 17.34 [ 21%] Building C object src/CMakeFiles/ssh.dir/knownhosts.c.o
>
> 17.35 cc1: some warnings being treated as errors
>
> 17.37 src/CMakeFiles/ssh.dir/build.make:518: recipe for target 'src/CMakeFiles/ssh.dir/kex.c.o' failed
>
> 17.37 make[2]: *** [src/CMakeFiles/ssh.dir/kex.c.o] Error 1
>
> 17.37 make[2]: *** Waiting for unfinished jobs....
>
> 17.59 CMakeFiles/Makefile2:203: recipe for target 'src/CMakeFiles/ssh.dir/all' failed
>
> 17.60 Makefile:151: recipe for target 'all' failed
>
> 17.60 make[1]: *** [src/CMakeFiles/ssh.dir/all] Error 2
>
> 17.60 make: *** [all] Error 2
>
>
>
>
>
> Any ideas?
>
>
>
> //mike


References:
Trying to build libsshMikael Petterson <mikael.petterson@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org