pkgsrc-Users archive

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

Disabling example in security/libssh



Is it ok if I commit the following patch to disable compiling the
example code in security/libssh? Building the example fails for me and
it affects no files in the binary package.

This is NetBSD 8.1/amd64 in pkg_comp1 chroot with pkgsrc-2020Q1.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/security/libssh/Makefile,v
retrieving revision 1.36
diff -u -r1.36 Makefile
--- Makefile	26 Jan 2020 17:32:04 -0000	1.36
+++ Makefile	8 Apr 2020 08:44:03 -0000
@@ -24,6 +24,7 @@
 CONFIGURE_DIRS=		${WRKDIR}/build
 CMAKE_ARG_PATH=		${WRKSRC}
 CMAKE_ARGS+=		-DUNIT_TESTING=ON
+CMAKE_ARGS+=		-DWITH_EXAMPLES=OFF
 
 LDFLAGS.SunOS+=		-lnsl -lsocket
 
It seems some header declaring/defining send() recv() shutdown() SHUT_RD
etc is missing somehow. Rather than fixing the example it seems easier
to just disable it.

Scanning dependencies of target samplesftp
[ 62%] Built target samplesshd-cb
[ 62%] Building C object examples/CMakeFiles/samplesftp.dir/samplesftp.c.o
[ 63%] Linking C executable proxy
[ 63%] Building C object examples/CMakeFiles/samplesftp.dir/authentication.c.o
[ 63%] Building C object examples/CMakeFiles/scp_download.dir/connect_ssh.c.o
[ 64%] Linking C executable scp_download
[ 64%] Built target proxy
Scanning dependencies of target sshd_direct-tcpip
Scanning dependencies of target samplesshd-kbdint
[ 64%] Building C object examples/CMakeFiles/samplesftp.dir/knownhosts.c.o
[ 65%] Building C object examples/CMakeFiles/sshd_direct-tcpip.dir/sshd_direct-tcpip.c.o
[ 65%] Building C object examples/CMakeFiles/samplesshd-kbdint.dir/samplesshd-kbdint.c.o
[ 65%] Built target scp_download
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c: In function 'my_channel_data_function':
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c:283:13: error: implicit declaration of function 'send'; did you mean 'srand'? [-Werror=implicit-function-declaration]
         i = send(*event_fd_data->p_fd, data, len, 0);
             ^~~~
             srand
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c: In function 'my_fd_data_function':
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c:350:11: error: implicit declaration of function 'recv'; did you mean 'execv'? [-Werror=implicit-function-declaration]
     len = recv(*event_fd_data->p_fd, buf, sizeof(buf), 0);
           ^~~~
           execv
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c:382:9: error: implicit declaration of function 'shutdown'; did you mean 'chown'? [-Werror=implicit-function-declaration]
         shutdown(*event_fd_data->p_fd, SHUT_RD);
         ^~~~~~~~
         chown
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c:382:40: error: 'SHUT_RD' undeclared (first use in this function)
         shutdown(*event_fd_data->p_fd, SHUT_RD);
                                        ^~~~~~~
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c:382:40: note: each undeclared identifier is reported only once for each function it appears in
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c: In function 'open_tcp_socket':
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c:391:24: error: storage size of 'sin' isn't known
     struct sockaddr_in sin;
                        ^~~
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c:397:19: error: implicit declaration of function 'socket'; did you mean 'setkey'? [-Werror=implicit-function-declaration]
     forwardsock = socket(AF_INET, SOCK_STREAM, 0);
                   ^~~~~~
                   setkey
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c:397:26: error: 'AF_INET' undeclared (first use in this function)
     forwardsock = socket(AF_INET, SOCK_STREAM, 0);
                          ^~~~~~~
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c:397:35: error: 'SOCK_STREAM' undeclared (first use in this function)
     forwardsock = socket(AF_INET, SOCK_STREAM, 0);
                                   ^~~~~~~~~~~
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c:420:9: error: implicit declaration of function 'connect'; did you mean 'cgetnext'? [-Werror=implicit-function-declaration]
     if (connect(forwardsock, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
         ^~~~~~~
         cgetnext
/pkg_comp/obj/pkgsrc/security/libssh/default/libssh-0.9.3/examples/sshd_direct-tcpip.c:391:24: warning: unused variable 'sin' [-Wunused-variable]
     struct sockaddr_in sin;
                        ^~~
cc1: some warnings being treated as errors
--- examples/CMakeFiles/sshd_direct-tcpip.dir/sshd_direct-tcpip.c.o ---
*** [examples/CMakeFiles/sshd_direct-tcpip.dir/sshd_direct-tcpip.c.o] Error code 1

make[2]: stopped in /pkg_comp/obj/pkgsrc/security/libssh/default/build
1 error

-Olaf.
-- 
Olaf 'Rhialto' Seibert -- rhialto at falu dot nl
___  Anyone who is capable of getting themselves made President should on
\X/  no account be allowed to do the job.       --Douglas Adams, "THGTTG"

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index