From umq@ueo.co.jp  Mon Feb  6 23:14:14 2012
Return-Path: <umq@ueo.co.jp>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 888A0106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  6 Feb 2012 23:14:14 +0000 (UTC)
	(envelope-from umq@ueo.co.jp)
Received: from msa01b.plala.or.jp (msa01.plala.or.jp [IPv6:2400:7800:0:5010::1])
	by mx1.freebsd.org (Postfix) with ESMTP id AFAD48FC13
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  6 Feb 2012 23:14:13 +0000 (UTC)
Received: from terpsichore.kaumoge.org ([125.202.216.248])
          by msa01b.plala.or.jp with ESMTP
          id <20120206231412.IDEX4884.msa01b.plala.or.jp@terpsichore.kaumoge.org>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Tue, 7 Feb 2012 08:14:12 +0900
Received: from calliope.kaumoge.org (calliope.kaumoge.org [192.168.24.120])
	by terpsichore.kaumoge.org (8.14.4/8.14.4/20101205) with ESMTP id q16NE9Ol084410
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 7 Feb 2012 08:14:10 +0900 (JST)
	(envelope-from umq@ueo.co.jp)
Message-Id: <86ty33r1vi.wl%umq@ueo.co.jp>
Date: Tue, 07 Feb 2012 08:14:09 +0900
From: Hirohisa Yamaguchi <umq@ueo.co.jp>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] security/libssh2 does not build against libgcrypt
X-Send-Pr-Version: 3.113

>Number:         164835
>Category:       ports
>Synopsis:       [patch] security/libssh2 does not build against libgcrypt
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sbz
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 06 23:20:07 UTC 2012
>Closed-Date:    Wed Feb 08 07:00:04 UTC 2012
>Last-Modified:  Wed Feb  8 07:00:21 UTC 2012
>Originator:     Hirohisa Yamaguchi
>Release:        FreeBSD 8.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD calliope.****.org 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64

>Description:
	security/libssh2 does not link when configured to use libgcrypt

	| Making all in example
	| make  all-am
	| if clang -DHAVE_CONFIG_H   -I../include -I../example    -O2 -pipe -I/usr/local/include -fno-strict-aliasing -MT direct_tcpip.o -MD -MP -MF ".deps/direct_tcpip.Tpo" -c -o direct_tcpip.o direct_tcpip.c;  then mv -f ".deps/direct_tcpip.Tpo" ".deps/direct_tcpip.Po"; else rm -f ".deps/direct_tcpip.Tpo"; exit 1; fi
	| /bin/sh ../libtool --tag=CC --mode=link clang  -O2 -pipe -I/usr/local/include -fno-strict-aliasing   -rpath=/usr/local/lib -L/usr/local/lib -o direct_tcpip  direct_tcpip.o ../src/libssh2.la 
	| libtool: link: clang -O2 -pipe -I/usr/local/include -fno-strict-aliasing -rpath=/usr/local/lib -o .libs/direct_tcpip direct_tcpip.o  -L/usr/local/lib ../src/.libs/libssh2.so /usr/local/lib/libgcrypt.so /usr/local/lib/libgpg-error.so /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -lz -Wl,-rpath -Wl,/usr/local/lib
	| clang: warning: argument unused during compilation: '-rpath=/usr/local/lib'
	| ../src/.libs/libssh2.so: undefined reference to `_libssh_error'
	| clang: error: linker command failed with exit code 1 (use -v to see invocation)
	| *** Error code 1
	| 
	| Stop in /usr/ports/security/libssh2/work/libssh2-1.4.0/example.
	| *** Error code 1
	| 

	
>How-To-Repeat:
	# make -C /usr/ports/security/libssh2 -DBATCH -DWITH_GCRYPT rmconfig build

>Fix:

	the patch taken from:
		http://trac.libssh2.org/changeset/b3ade9a63e881e69b4c9cfe7b5dbad78dcc4a0e0/libssh2

Index: security/libssh2/files/patch-src_libgcrypt.c
===================================================================
RCS file: security/libssh2/files/patch-src_libgcrypt.c
diff -N security/libssh2/files/patch-src_libgcrypt.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ security/libssh2/files/patch-src_libgcrypt.c	6 Feb 2012 23:12:06 -0000
@@ -0,0 +1,10 @@
+--- src/libgcrypt.c	(revision 209de22299b4b58e582891dfba70f57e1e0492db)
++++ src/libgcrypt.c	(revision b3ade9a63e881e69b4c9cfe7b5dbad78dcc4a0e0)
+@@ -582,5 +582,5 @@
+                           const char *passphrase)
+ {
+-    return _libssh_error(session, LIBSSH2_ERROR_FILE,
++    return _libssh2_error(session, LIBSSH2_ERROR_FILE,
+                          "Unable to extract public key from private key file: "
+                          "Method unimplemented in libgcrypt backend");
+
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sbz 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Feb 6 23:20:22 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164835 
State-Changed-From-To: open->closed 
State-Changed-By: sbz 
State-Changed-When: Wed Feb 8 07:00:03 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164835 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/164835: commit references a PR
Date: Wed,  8 Feb 2012 06:58:47 +0000 (UTC)

 sbz         2012-02-08 06:58:34 UTC
 
   FreeBSD ports repository
 
   Modified files:
     security/libssh2     Makefile 
   Added files:
     security/libssh2/files patch-src__libgcrypt.c 
   Log:
   - Fix build when using GCRYPT KNOB
   - Bump PORTREVISION
   
   PR:             ports/164835
   Submitted by:   Hirohisa Yamaguchi <umq at ueo.co.jp>
   Approved by:    jadawin@, miwi@ (mentors, implicit)
   
   Revision  Changes    Path
   1.37      +1 -0      ports/security/libssh2/Makefile
   1.1       +11 -0     ports/security/libssh2/files/patch-src__libgcrypt.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
