NetBSD Problem Report #54694

From www@netbsd.org  Tue Nov 12 08:11:12 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2865E7A187
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 12 Nov 2019 08:11:12 +0000 (UTC)
Message-Id: <20191112081110.EF9257A26E@mollari.NetBSD.org>
Date: Tue, 12 Nov 2019 08:11:10 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: security/libssh does not build on Solaris
X-Send-Pr-Version: www-1.0

>Number:         54694
>Category:       pkg
>Synopsis:       security/libssh does not build on Solaris
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    is
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 12 08:15:00 +0000 2019
>Closed-Date:    Thu Nov 28 09:26:56 +0000 2019
>Last-Modified:  Thu Nov 28 11:35:00 +0000 2019
>Originator:     Joern Clausen
>Release:        
>Organization:
Bielefeld University
>Environment:
>Description:
Compiling security/libssh lately fails with

[ 63%] Linking C executable keygen
[ 63%] Built target keygen
Scanning dependencies of target sshd_direct-tcpip
[ 64%] Building C object examples/CMakeFiles/sshd_direct-tcpip.dir/sshd_direct-tcpip.c.o
[ 64%] Linking C executable sshd_direct-tcpip
Undefined                       first referenced
 symbol                             in file
recv                                CMakeFiles/sshd_direct-tcpip.dir/sshd_direct-tcpip.c.o  (symbol belongs to implicit dependency /lib/amd64/libsocket.so.1)
send                                CMakeFiles/sshd_direct-tcpip.dir/sshd_direct-tcpip.c.o  (symbol belongs to implicit dependency /lib/amd64/libsocket.so.1)
gethostbyname                       CMakeFiles/sshd_direct-tcpip.dir/sshd_direct-tcpip.c.o  (symbol belongs to implicit dependency /lib/amd64/libnsl.so.1)
socket                              CMakeFiles/sshd_direct-tcpip.dir/sshd_direct-tcpip.c.o  (symbol belongs to implicit dependency /lib/amd64/libsocket.so.1)
connect                             CMakeFiles/sshd_direct-tcpip.dir/sshd_direct-tcpip.c.o  (symbol belongs to implicit dependency /lib/amd64/libsocket.so.1)
shutdown                            CMakeFiles/sshd_direct-tcpip.dir/sshd_direct-tcpip.c.o  (symbol belongs to implicit dependency /lib/amd64/libsocket.so.1)
ld: fatal: symbol referencing errors

>How-To-Repeat:

>Fix:
A workaround is to add "-lsocket -lnsl" to

work/build/examples/CMakeFiles/sshd_direct-tcpip.dir/link.txt

As I don't know how to influence the cmake build process to do this automatically (as it does for some link.txt files in other subdirectories), I'll leave a proper patch to someone with more insight.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->is
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Wed, 20 Nov 2019 09:43:09 +0000
Responsible-Changed-Why:
Over to maintainer.


From: =?UTF-8?Q?Clausen=2c_J=c3=b6rn?= <joern.clausen@uni-bielefeld.de>
To: <gnats-bugs@netbsd.org>
Cc: 
Subject: Re: pkg/54694: security/libssh does not build on Solaris
Date: Wed, 27 Nov 2019 11:27:38 +0100

 Okay, cmake is not as stupid as I expected:

 --- Makefile    2019/11/27 10:23:51     1.1
 +++ Makefile    2019/11/27 10:24:17
 @@ -25,6 +25,8 @@
   CMAKE_ARG_PATH=                ${WRKSRC}
   CMAKE_ARGS+=           -DUNIT_TESTING=ON

 +LDFLAGS.SunOS+=-lnsl -lsocket
 +
   BUILDLINK_TRANSFORM+=  rm:-Werror=strict-overflow

   .include "options.mk"


 fixes the build for me.

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 BITS - Bielefelder IT-Servicezentrum
 https://www.uni-bielefeld.de/bits

State-Changed-From-To: open->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Thu, 28 Nov 2019 09:26:56 +0000
State-Changed-Why:
Patch committed, thanks!

Joern: did you file a bug report upstream? If not, please do :)


From: "Benny Siegert" <bsiegert@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54694 CVS commit: pkgsrc/security/libssh
Date: Thu, 28 Nov 2019 09:25:52 +0000

 Module Name:	pkgsrc
 Committed By:	bsiegert
 Date:		Thu Nov 28 09:25:52 UTC 2019

 Modified Files:
 	pkgsrc/security/libssh: Makefile

 Log Message:
 libssh: fix build on Solaris.

 From Joern Clausen in PR pkg/54694.


 To generate a diff of this commit:
 cvs rdiff -u -r1.32 -r1.33 pkgsrc/security/libssh/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: =?UTF-8?Q?Clausen=2c_J=c3=b6rn?= <joern.clausen@uni-bielefeld.de>
To: <gnats-bugs@netbsd.org>, <is@netbsd.org>, <pkgsrc-bugs@netbsd.org>,
	<gnats-admin@netbsd.org>, <bsiegert@netbsd.org>
Cc: 
Subject: Re: pkg/54694 (security/libssh does not build on Solaris)
Date: Thu, 28 Nov 2019 11:27:59 +0100

 > Joern: did you file a bug report upstream? If not, please do :)

 I opened a task, which seems to be a bug report in Phabricator:

 https://bugs.libssh.org/T201

 I have no idea if this is the correct method, though...

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 BITS - Bielefelder IT-Servicezentrum
 https://www.uni-bielefeld.de/bits

From: Benny Siegert <bsiegert@netbsd.org>
To: =?UTF-8?B?Q2xhdXNlbiwgSsO2cm4=?= <joern.clausen@uni-bielefeld.de>
Cc: gnats-bugs@netbsd.org, Ignatios Souvatzis <is@netbsd.org>, pkgsrc-bugs@netbsd.org, 
	gnats-admin@netbsd.org
Subject: Re: pkg/54694 (security/libssh does not build on Solaris)
Date: Thu, 28 Nov 2019 12:06:08 +0100

 On Thu, Nov 28, 2019 at 11:28 AM Clausen, J=C3=B6rn
 <joern.clausen@uni-bielefeld.de> wrote:
 > > Joern: did you file a bug report upstream? If not, please do :)
 >
 > I opened a task, which seems to be a bug report in Phabricator:
 >
 > https://bugs.libssh.org/T201
 >
 > I have no idea if this is the correct method, though...

 Thank you!

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.