[gnutls-dev] Building GnuTLS 1.6.1 under Mac OS X (fwd)

Simon Josefsson simon at josefsson.org
Thu Jan 25 10:33:54 CET 2007


For some reason, the post below bounced, so I'm re-sending it.  I'll
look at the patches ASAP.

/Simon

Matthias Scheler <tron at NetBSD.org> writes:

> 	Hello,
>
> I was trying to send the following e-mail to gnutls-dev at gnupg.org but
> the mailing list software bounced it:
>
> From: Matthias Scheler <tron at NetBSD.org>
> Subject: Building GnuTLS 1.6.1 under Mac OS X
> To: gnutls-dev at gnupg.org
> Date: Wed, 24 Jan 2007 19:21:18 +0000
>
>
> 	Hello,
>
> the C++ library included in "gnutls" 1.6.1 doesn't build under Mac OS X
> because of a compiler bug. Apple's GCC apparently doesn't handle calling
> pure virtual function in constructors and desctrutors properly, see here:
>
> http://porting.openoffice.org/mac/macosx_issues.html
>
> I've attached two patches taken from NetBSD's "pkgsrc" which inline
> the copy constructor of the "credentials" class under Mac OS X. That
> fixes the build problem for me under Mac OS 10.4.8 using the G++
> compiler from Xcode tools 2.4.1.
>
> 	Kind regards
>
> -- 
> Matthias Scheler                                  http://zhadum.org.uk/
>
> $NetBSD: patch-aa,v 1.9 2007/01/24 15:58:04 tron Exp $
>
> --- includes/gnutls/gnutlsxx.h.orig	2006-08-07 13:40:23.000000000 +0100
> +++ includes/gnutls/gnutlsxx.h	2007-01-24 11:29:43.000000000 +0000
> @@ -233,7 +233,14 @@
>  {
>      public:
>          credentials(gnutls_credentials_type_t t);
> +#if defined(__APPLE__) || defined(__MACOS__)
> +        credentials( credentials& c) {
> +                type = c.type;
> +                set_ptr( c.ptr());
> +	}
> +#else
>          credentials( credentials& c);
> +#endif
>          virtual ~credentials() { }
>          gnutls_credentials_type_t get_type() const;
>      protected:
>
> $NetBSD: patch-ac,v 1.3 2007/01/24 15:58:04 tron Exp $
>
> --- lib/gnutlsxx.cpp.orig	2006-06-01 20:49:01.000000000 +0100
> +++ lib/gnutlsxx.cpp	2007-01-24 11:31:05.000000000 +0000
> @@ -822,11 +822,13 @@
>  { 
>  }
>  
> +#if !(defined(__APPLE__) || defined(__MACOS__))
>  credentials::credentials( credentials& c)
>  {
>      this->type = c.type;
>      this->set_ptr( c.ptr());
>  }
> +#endif
>  
>  gnutls_credentials_type_t credentials::get_type() const
>  { 
>
>
>
>
>
> ----------
>
>
> Could you  please resend it? I've also attached it to this e-mail.
>
> 	Kind regards
>
> -- 
> Matthias Scheler                                  http://zhadum.org.uk/
>>From tron at colwyn.zhadum.org.uk Thu Jan 25 07:15:51 2007 +0000
> X-Keywords:
> Received: from kerckhoffs.g10code.com ([217.69.77.222])
> 	by trithemius.gnupg.org with esmtp (Exim 4.50 #1 (Debian))
> 	id 1H9qac-0001Jy-Tu for <mm.gnutls-dev at trithemius.gnupg.org>;
> 	Wed, 24 Jan 2007 23:27:34 +0100
> Received: from colwyn.zhadum.org.uk ([81.187.181.119] ident=root)
> 	by kerckhoffs.g10code.com with esmtp (Exim 4.50 #1 (Debian))
> 	id 1H9q1B-0004Ox-QC
> 	for <gnutls-dev at gnupg.org>; Wed, 24 Jan 2007 22:50:58 +0100
> Received: from excalibur.zhadum.org.uk (excalibur.zhadum.org.uk
> 	[81.187.181.118])
> 	by colwyn.zhadum.org.uk (8.13.5.20060614/8.13.3) with ESMTP id
> 	l0OJLJxV018309
> 	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
> 	for <gnutls-dev at gnupg.org>; Wed, 24 Jan 2007 19:21:19 GMT
> Received: by localhost.localhost (Postfix, from userid 1001)
> 	id 912095E5194; Wed, 24 Jan 2007 19:21:18 +0000 (GMT)
> Date: Wed, 24 Jan 2007 19:21:18 +0000
> From: Matthias Scheler <tron at NetBSD.org>
> To: gnutls-dev at gnupg.org
> Subject: Building GnuTLS 1.6.1 under Mac OS X
> Message-ID: <20070124192118.GA617 at colwyn.zhadum.org.uk>
> Mime-Version: 1.0
> Content-Type: multipart/signed; micalg=pgp-sha1;
> 	protocol="application/pgp-signature"; boundary="XF85m9dhOBO43t/C"
> Content-Disposition: inline
> User-Agent: Mutt/1.4.2.2i
> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0
> 	(colwyn.zhadum.org.uk [81.187.181.119]);
> 	Wed, 24 Jan 2007 19:21:19 +0000 (GMT)
> X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on 
> 	trithemius.gnupg.org
> X-Spam-Level: 
> X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham 
> 	version=3.0.3
> X-Original-Status: RO
> Status: RO
> Content-Length: 2492
> Lines: 94
>
>
> --XF85m9dhOBO43t/C
> Content-Type: multipart/mixed; boundary="CE+1k2dSO48ffgeK"
> Content-Disposition: inline
>
>
> --CE+1k2dSO48ffgeK
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
>
> 	Hello,
>
> the C++ library included in "gnutls" 1.6.1 doesn't build under Mac OS X
> because of a compiler bug. Apple's GCC apparently doesn't handle calling
> pure virtual function in constructors and desctrutors properly, see here:
>
> http://porting.openoffice.org/mac/macosx_issues.html
>
> I've attached two patches taken from NetBSD's "pkgsrc" which inline
> the copy constructor of the "credentials" class under Mac OS X. That
> fixes the build problem for me under Mac OS 10.4.8 using the G++
> compiler from Xcode tools 2.4.1.
>
> 	Kind regards
>
> --=20
> Matthias Scheler                                  http://zhadum.org.uk/
>
> --CE+1k2dSO48ffgeK
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: attachment; filename=patch-aa
>
> $NetBSD: patch-aa,v 1.9 2007/01/24 15:58:04 tron Exp $
>
> --- includes/gnutls/gnutlsxx.h.orig	2006-08-07 13:40:23.000000000 +0100
> +++ includes/gnutls/gnutlsxx.h	2007-01-24 11:29:43.000000000 +0000
> @@ -233,7 +233,14 @@
>  {
>      public:
>          credentials(gnutls_credentials_type_t t);
> +#if defined(__APPLE__) || defined(__MACOS__)
> +        credentials( credentials& c) {
> +                type = c.type;
> +                set_ptr( c.ptr());
> +	}
> +#else
>          credentials( credentials& c);
> +#endif
>          virtual ~credentials() { }
>          gnutls_credentials_type_t get_type() const;
>      protected:
>
> --CE+1k2dSO48ffgeK
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: attachment; filename=patch-ac
> Content-Transfer-Encoding: quoted-printable
>
> $NetBSD: patch-ac,v 1.3 2007/01/24 15:58:04 tron Exp $
>
> --- lib/gnutlsxx.cpp.orig	2006-06-01 20:49:01.000000000 +0100
> +++ lib/gnutlsxx.cpp	2007-01-24 11:31:05.000000000 +0000
> @@ -822,11 +822,13 @@
>  {=20
>  }
> =20
> +#if !(defined(__APPLE__) || defined(__MACOS__))
>  credentials::credentials( credentials& c)
>  {
>      this->type =3D c.type;
>      this->set_ptr( c.ptr());
>  }
> +#endif
> =20
>  gnutls_credentials_type_t credentials::get_type() const
>  {=20
>
> --CE+1k2dSO48ffgeK--
>
> --XF85m9dhOBO43t/C
> Content-Type: application/pgp-signature
> Content-Disposition: inline
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (Darwin)
>
> iD8DBQFFt7GtiYEmcnvdc3cRAnbDAKCTKatP9RIxswhqfXkHT5kJuvzbuwCgvDyw
> t8naVCEzAeCP8b1GA9Rnc/c=
> =Glgk
> -----END PGP SIGNATURE-----
>
> --XF85m9dhOBO43t/C--




More information about the Gnutls-devel mailing list