From areilly@bigpond.net.au  Fri Apr 23 03:33:34 2010
Return-Path: <areilly@bigpond.net.au>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 779081065673
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Apr 2010 03:33:34 +0000 (UTC)
	(envelope-from areilly@bigpond.net.au)
Received: from nskntmtas01p.mx.bigpond.com (nskntmtas01p.mx.bigpond.com [61.9.168.137])
	by mx1.freebsd.org (Postfix) with ESMTP id 0644E8FC19
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Apr 2010 03:33:33 +0000 (UTC)
Received: from nskntotgx02p.mx.bigpond.com ([124.188.161.100])
          by nskntmtas01p.mx.bigpond.com with ESMTP
          id <20100423033332.HXR12504.nskntmtas01p.mx.bigpond.com@nskntotgx02p.mx.bigpond.com>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Fri, 23 Apr 2010 03:33:32 +0000
Received: from duncan.reilly.home ([124.188.161.100])
          by nskntotgx02p.mx.bigpond.com with ESMTP
          id <20100423033332.ZZID2010.nskntotgx02p.mx.bigpond.com@duncan.reilly.home>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Fri, 23 Apr 2010 03:33:32 +0000
Message-Id: <1271993612.33927@duncan.reilly.home>
Date: Fri, 23 Apr 2010 13:33:32 +1000
From: Andrew Reilly <areilly@bigpond.net.au>
Reply-To: Andrew Reilly <areilly@bigpond.net.au>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: port devel/pwlib fails to build: cast error: patch attached
X-Send-Pr-Version: 3.113
X-GNATS-Notify: steve@energistic.com

>Number:         145966
>Category:       ports
>Synopsis:       port devel/pwlib fails to build: cast error: patch attached
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    fjoe
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 23 03:40:01 UTC 2010
>Closed-Date:    Thu Jun 16 04:04:14 UTC 2011
>Last-Modified:  Thu Jun 16 04:04:14 UTC 2011
>Originator:     Andrew Reilly
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD duncan.reilly.home 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Sat Apr 17 00:13:12 EST 2010 root@duncan.reilly.home:/nb/obj/nb/src/sys/DUNCAN amd64


	
>Description:
	I don't understand how this managed to make it into a software
	release.  It's just broken.  The compile fails thusly:
c++ -O1 -I/nb/ports/devel/pwlib/work/ptlib_v1_12_0/include -I/usr/local/include  -D_REENTRANT -pthread -fno-exceptions  -O1 -I/nb/ports/devel/pwlib/work/ptlib_v1_12_0/include -I/usr/local/include -Wall  -g -D_DEBUG -I/nb/ports/devel/pwlib/work/ptlib_v1_12_0/include  -O1 -fPIC -DLDAP_DEPRECATED -O1 -I/nb/ports/devel/pwlib/work/ptlib_v1_12_0/include -I/usr/local/include   -O1 -I/nb/ports/devel/pwlib/work/ptlib_v1_12_0/include -I/usr/local/include -c ../../ptclib/pssl.cxx -o /nb/ports/devel/pwlib/work/ptlib_v1_12_0/lib/obj_d/pssl.o
../../ptclib/pssl.cxx: In constructor 'PSSLContext::PSSLContext(const void*, PINDEX)':
../../ptclib/pssl.cxx:917: error: invalid conversion from 'const SSL_METHOD*' to 'SSL_METHOD*'
gmake[3]: *** [/nb/ports/devel/pwlib/work/ptlib_v1_12_0/lib/obj_d/pssl.o] Error 1


>How-To-Repeat:
	cd /usr/ports/devel/pwlib; make
>Fix:

--- work/ptlib_v1_12_0/src/ptclib/pssl.cxx.orig	2010-04-23 11:45:47.000000000 +1000
+++ work/ptlib_v1_12_0/src/ptclib/pssl.cxx	2010-04-23 11:46:01.000000000 +1000
@@ -914,7 +914,7 @@
   InitialisationMutex.Signal();
 
   // create the new SSL context
-  SSL_METHOD * meth = SSLv23_method();
+  const SSL_METHOD * meth = SSLv23_method();
   context  = SSL_CTX_new(meth);
   if (context == NULL)
     PSSLAssert("Error creating context: ");

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Apr 23 03:48:15 UTC 2010 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: steve@energistic.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/145966: port devel/pwlib fails to build: cast error: patch attached
Date: Fri, 23 Apr 2010 03:48:13 UT

 Maintainer of devel/pwlib,
 
 Please note that PR ports/145966 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/145966
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Fri Apr 23 17:27:14 UTC 2010 
State-Changed-Why:  
Approved by maintainer in mail caught in spamtrap: 

From: "Steve Ames" <steve@energistic.com> 
Subject: Re: ports/145966: port devel/pwlib fails to build: cast error: patch attached 
Date: Fri, 23 Apr 2010 12:32:58 -0400 

This looks fine. Thanks for catching this. 

-Steve 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145966 
Responsible-Changed-From-To: freebsd-ports-bugs->rene 
Responsible-Changed-By: rene 
Responsible-Changed-When: Tue Apr 27 20:05:31 UTC 2010 
Responsible-Changed-Why:  
Grab 

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

From: Rene Ladan <rene@freebsd.org>
To: bug-followup@FreeBSD.org, areilly@bigpond.net.au, 
 steve@energistic.com
Cc:  
Subject: Re: ports/145966: port devel/pwlib fails to build: cast error: patch
 attached
Date: Tue, 27 Apr 2010 22:43:01 +0200

 The port builds fine without the patch using the default settings
 (compiler, /etc/make.conf, maybe others) on 8.0-RELEASE/amd64 and
 7-STABLE/i386.  A log for the latter is at
 http://rene-ladan.nl/tb/logs/7-FreeBSD/pwlib-1.12.0_5,1.log
 
 Can you detail your environment?

From: Rene Ladan <rene@freebsd.org>
To: bug-followup@FreeBSD.org, areilly@bigpond.net.au
Cc: steve@energistic.com
Subject: Re: ports/145966: port devel/pwlib fails to build: cast error: patch
 attached
Date: Tue, 27 Apr 2010 23:23:42 +0200

 On 27-04-2010 22:43, Rene Ladan wrote:
 > The port builds fine without the patch using the default settings
 > (compiler, /etc/make.conf, maybe others) on 8.0-RELEASE/amd64 and
 > 7-STABLE/i386.  A log for the latter is at
 > http://rene-ladan.nl/tb/logs/7-FreeBSD/pwlib-1.12.0_5,1.log
 > 
 > Can you detail your environment?
 
 I got a tip that this might happen with openssl from ports, while I
 tested the port with openssl from base.

From: Andrew Reilly <areilly@bigpond.net.au>
To: Rene Ladan <rene@freebsd.org>
Cc: bug-followup@FreeBSD.org,
 steve@energistic.com
Subject: Re: ports/145966: port devel/pwlib fails to build: cast error: patch attached
Date: Wed, 28 Apr 2010 09:02:45 +1000

 Hi Rene,
 
 On 28/04/2010, at 06:43 , Rene Ladan wrote:
 
 > The port builds fine without the patch using the default settings
 > (compiler, /etc/make.conf, maybe others) on 8.0-RELEASE/amd64 and
 > 7-STABLE/i386.  A log for the latter is at
 > http://rene-ladan.nl/tb/logs/7-FreeBSD/pwlib-1.12.0_5,1.log
 >=20
 > Can you detail your environment?
 
 As per the PR: I'm running 9-CURRENT.  I doubt that I've done anything =
 to my environment that would confuse a build.  I have CFLAGS and =
 CXXFLAGS+=3D-g in /etc/make.conf, but that shouldn't affect this.  =46rom =
 the command line it certainly appears that /usr/local/include is being =
 searched, and I have openssl-1.0.0 installed as a port, so that theory =
 sounds fair.  I doubt that this is unique, though.
 
 Cheers,
 
 --=20
 Andrew
 

From: Rene Ladan <rene@freebsd.org>
To: bug-followup@FreeBSD.org, areilly@bigpond.net.au, 
 steve@energistic.com
Cc:  
Subject: Re: ports/145966: port devel/pwlib fails to build: cast error: patch
 attached
Date: Thu, 29 Apr 2010 21:47:24 +0200

 The OpenSSL version has to determined at compile time, because with the
 patch and using the base OpenSSL version (0.9.8k) the build fails with:
 
 c++ -O1
 -I/usr/home/rene/freebsd/cvs/ports/devel/pwlib/work/ptlib_v1_12_0/include -I/usr/local/include
  -D_REENTRANT -pthread -fno-exceptions  -O1
 -I/usr/home/rene/freebsd/cvs/ports/devel/pwlib/work/ptlib_v1_12_0/include -I/usr/local/include
 -Wall  -g -D_DEBUG
 -I/usr/home/rene/freebsd/cvs/ports/devel/pwlib/work/ptlib_v1_12_0/include
 -O1 -fPIC -DLDAP_DEPRECATED -O1
 -I/usr/home/rene/freebsd/cvs/ports/devel/pwlib/work/ptlib_v1_12_0/include -I/usr/local/include
   -O1
 -I/usr/home/rene/freebsd/cvs/ports/devel/pwlib/work/ptlib_v1_12_0/include -I/usr/local/include
 -c ../../ptclib/pssl.cxx -o
 /usr/home/rene/freebsd/cvs/ports/devel/pwlib/work/ptlib_v1_12_0/lib/obj_d/pssl.o
 ../../ptclib/pssl.cxx: In constructor 'PSSLContext::PSSLContext(const
 void*, PINDEX)':
 ../../ptclib/pssl.cxx:918: error: invalid conversion from 'const
 SSL_METHOD*' to 'SSL_METHOD*'
 ../../ptclib/pssl.cxx:918: error:   initializing argument 1 of 'SSL_CTX*
 SSL_CTX_new(SSL_METHOD*)'
 
 This is on FreeBSD 8.0/amd64.
 
 -- 
 http://www.rene-ladan.nl/
 
 GPG fingerprint = ADBC ECCD EB5F A6B4 549F  600D 8C9E 647A E564 2BFC
 (subkeys.pgp.net)

From: Steve Ames <steve@energistic.com>
To: Rene Ladan <rene@freebsd.org>
Cc: bug-followup@freebsd.org, areilly@bigpond.net.au
Subject: Re: ports/145966: port devel/pwlib fails to build: cast error:
 patch attached
Date: Thu, 29 Apr 2010 16:49:33 -0400

 On Thu, Apr 29, 2010 at 09:47:24PM +0200, Rene Ladan wrote:
 > The OpenSSL version has to determined at compile time, because with the
 > patch and using the base OpenSSL version (0.9.8k) the build fails with:
 > 
 > -I/usr/home/rene/freebsd/cvs/ports/devel/pwlib/work/ptlib_v1_12_0/include -I/usr/local/include
 > -c ../../ptclib/pssl.cxx -o
 > /usr/home/rene/freebsd/cvs/ports/devel/pwlib/work/ptlib_v1_12_0/lib/obj_d/pssl.o
 > ../../ptclib/pssl.cxx: In constructor 'PSSLContext::PSSLContext(const
 > void*, PINDEX)':
 > ../../ptclib/pssl.cxx:918: error: invalid conversion from 'const
 > SSL_METHOD*' to 'SSL_METHOD*'
 > ../../ptclib/pssl.cxx:918: error:   initializing argument 1 of 'SSL_CTX*
 > SSL_CTX_new(SSL_METHOD*)'
 
 *sigh* so... anyone know when this was changed in openssl and if (by including openssl headers) there is a version variable that we can #IF around to select the proper casting for each situation?
 
State-Changed-From-To: open->feedback 
State-Changed-By: rene 
State-Changed-When: Wed May 5 18:24:19 UTC 2010 
State-Changed-Why:  
Patch works for OpenSSL 1.0, but is not compatible with OpenSSL from base. 
Awaiting maintainer feedback for a solution. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145966 
Responsible-Changed-From-To: rene->freebsd-ports-bugs 
Responsible-Changed-By: rene 
Responsible-Changed-When: Sun Aug 1 18:59:23 UTC 2010 
Responsible-Changed-Why:  
No solution for both ports and base openssl, off to someone with more openssl knowledge. 

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

From: vwe@freebsd.org
To: bug-followup@FreeBSD.org, areilly@bigpond.net.au
Cc:  
Subject: Re: ports/145966: port devel/pwlib fails to build: cast error: patch
 attached
Date: Thu, 07 Oct 2010 11:24:38 +0200

 Hi!
 
 While not an expert in SSL issues, I've been able to cleanly compile
 devel/pwlib with two patches:
 
 http://people.freebsd.org/~vwe/gnats/pr145966/Makefile.patch
 http://people.freebsd.org/~vwe/gnats/pr145966/patch-src_ptclib_pssl.cxx
 
 You may want to try these with both the base system openssl (0.9.x) and
 the ports openssl (1.x.x) and see if it compiles under all
 circumstances.
 
 HTH
 
 Volker

From: Ruslan Mahmatkhanov <cvs-src@yandex.ru>
To: bug-followup@FreeBSD.org
Cc: steve@energistic.com
Subject: Re: ports/145966
Date: Wed, 08 Dec 2010 01:07:09 +0300

 Hi!
 
 I tested the build with patch-src_ptclib_pssl.cxx patch and it works for 
 me on recent -stable i386. I believe that Makefile.patch isn't needed 
 because security/openssl is already installs as dependency when building 
 pwlib. I tried first to build it with security/openssl installed and all 
 is fine. Then i deinstalled security/openssl to try build it with base 
 openssl and openssl was installed from ports as dependency before actual 
 building pwlib.. so there is no need in USE_OPENSSL_PORT=yes.
 
 Thanks for the solution. Please commit this patch!
 
 -- 
 Regards,
 Ruslan

From: Kurt Jaeger <pi@opsec.eu>
To: Steve Ames <steve@energistic.com>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/145966: fbsd devel/pwlib build error ?
Date: Wed, 29 Dec 2010 16:38:36 +0100

 Hi!
 
 > Check pr database. I believe there's a patch in there.
 > 
 > http://www.freebsd.org/cgi/query-pr-summary.cgi?category=ports&severity=&priority=&class=&state=&sort=none&text=pwlib&responsible=&multitext=&originator=&release=
 
 Found it:
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/145966
 
 Tested it, this works for me. What's missing to get this committed ?
 
 -- 
 pi@opsec.eu            +49 171 3101372                        10 years to go !

From: Steve Ames <steve@energistic.com>
To: Kurt Jaeger <pi@opsec.eu>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/145966: fbsd devel/pwlib build error ?
Date: Wed, 29 Dec 2010 11:08:35 -0500

 On Wed, Dec 29, 2010 at 04:38:36PM +0100, Kurt Jaeger wrote:
 > Hi!
 > 
 > > Check pr database. I believe there's a patch in there.
 > > 
 > > http://www.freebsd.org/cgi/query-pr-summary.cgi?category=ports&severity=&priority=&class=&state=&sort=none&text=pwlib&responsible=&multitext=&originator=&release=
 > 
 > Found it:
 > 
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/145966
 > 
 > Tested it, this works for me. What's missing to get this committed ?
 
 Unsure. Its been out there a while. I gave it the nod some time ago i thought. *shrug*
 
 -steve
 

From: Stephen Montgomery-Smith <stephen@missouri.edu>
To: bug-followup@FreeBSD.org, areilly@bigpond.net.au
Cc:  
Subject: Re: ports/145966: port devel/pwlib fails to build: cast error: patch
 attached
Date: Tue, 14 Jun 2011 22:25:54 -0500

 Hey Andrew,
 
 I was looking through the old PR's.  I noticed that a patch was 
 committed to this port in April 17 called patch-src-ptclib-pssl.cxx that 
 seems to effectively perform the same operation as your proposed patch. 
   You may want to check it out and see for yourself if it works.  If it 
 does, you can close this PR.
 
 Stephen
Responsible-Changed-From-To: freebsd-ports-bugs->fjoe-ports-bugs 
Responsible-Changed-By: fjoe 
Responsible-Changed-When: Thu Jun 16 04:01:58 UTC 2011 
Responsible-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=145966 
Responsible-Changed-From-To: fjoe-ports-bugs->fjoe 
Responsible-Changed-By: fjoe 
Responsible-Changed-When: Thu Jun 16 04:02:37 UTC 2011 
Responsible-Changed-Why:  
To me. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145966 
State-Changed-From-To: feedback->closed 
State-Changed-By: fjoe 
State-Changed-When: Thu Jun 16 04:02:52 UTC 2011 
State-Changed-Why:  
The fix was committed on 17 Apr (ports/devel/pwlib/files/patch-src-ptclib-pssl.cxx). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145966 
>Unformatted:
