NetBSD Problem Report #44683

From  Fri Mar  4 22:46:02 2011
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 10E6863B91F
	for <>; Fri,  4 Mar 2011 22:46:02 +0000 (UTC)
Message-Id: <>
Date: Fri,  4 Mar 2011 22:46:00 +0000 (UTC)
Subject: Bacula-5.0.3 won't compile on DragonFly BSD 2.8.2
X-Send-Pr-Version: www-1.0

>Number:         44683
>Category:       pkg
>Synopsis:       Bacula-5.0.3 won't compile on DragonFly BSD 2.8.2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 04 22:50:00 +0000 2011
>Closed-Date:    Mon May 02 15:46:35 +0000 2011
>Last-Modified:  Mon May 02 15:46:35 +0000 2011
>Originator:     Michael Roland
>Release:        DragonFly BSD v2.8.2-RELEASE
Ocmulgee EMC
DragonFly 2.8-RELEASE DragonFly v2.8.2-RELEASE #2: Fri Oct 29 01:29:56 PDT 2010  i386

In pgksrc-2010Q4, the Bacula-5.0.3 compile generates this error message:

Compiling tls.c
tls.c: In function 'bool tls_postconnect_verify_host(JCR*, TLS_CONNECTION*, cons
t char*)':
tls.c:333: error: invalid conversion from 'const X509V3_EXT_METHOD*' to 'X509V3_
*** Error code 1

This error occurs when compiling Bacula with OpenSSL version 1.0.0 or higher. Patch-ad in the patches directory contains a patch for the tls.c file that corrects the error. However, the patch seems to check for an OpenSSL version higher than 1.0.0. DragonFly BSD 2.8.2 uses OpenSSL 1.0.0a, so the patch has no effect. Looking at Linux and BSD forums where this same problem is described, it looks like patch-ad should check for OPENSSL_VERSION_NUMBER >= 0x10000000L instead of 0x10100000L.

Changing the OpenSSL version check to 0x10000000L makes Bacula compile successfully.
Install pkgsrc-2010Q4.
cd /usr/pkgsrc/sysutils/bacula
In patch-ad, change the OPENSSL_VERSION_NUMBER from 0x10100000L to 0x10000000L. Run make distinfo to update the patch file checksums.

$NetBSD: patch-ad,v 1.4 2010/05/25 06:47:31 adam Exp $

--- src/lib/tls.c.orig  2010-04-27 19:58:29.000000000 +0000
+++ src/lib/tls.c
@@ -315,7 +315,7 @@ bool tls_postconnect_verify_host(JCR *jc
          extname = OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(ext)));

          if (strcmp(extname, "subjectAltName") == 0) {
-#ifdef HAVE_OPENSSLv1
+#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
             const X509V3_EXT_METHOD *method;
             X509V3_EXT_METHOD *method;

cd /usr/pkgsrc/sysutils/bacula
bmake distinfo


From: "David A. Holland" <>
Subject: PR/44683 CVS commit: pkgsrc/sysutils/bacula
Date: Sun, 6 Mar 2011 03:29:02 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Sun Mar  6 03:29:02 UTC 2011

 Modified Files:
 	pkgsrc/sysutils/bacula: distinfo
 	pkgsrc/sysutils/bacula/patches: patch-ad

 Log Message:
 Adjust openssl version number test; PR 44683 from Michael Roland.
 Fixes broken build on DragonFly 2.8.2.

 Someone please teach the openssl people about API stability.

 To generate a diff of this commit:
 cvs rdiff -u -r1.43 -r1.44 pkgsrc/sysutils/bacula/distinfo
 cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/bacula/patches/patch-ad

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

State-Changed-From-To: open->feedback
State-Changed-When: Sat, 30 Apr 2011 09:39:20 +0000

From: Michael Roland <>
To: "''" <>
Subject: Re: pkg/44683
Date: Mon, 2 May 2011 09:57:04 -0400 

 Follow up for problem report "Bacula-5.0.3 won't compile on DragonFly BSD

 Bacula-5.0.3 in pkgsrc 2011Q1 compiles with no errors on DragonFly BSD 2.8.2
 and 2.8.10.

 Thanks for fixing the problem!

State-Changed-From-To: feedback->closed
State-Changed-When: Mon, 02 May 2011 15:46:35 +0000
Confirmed fixed, thanks for the feedback!


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.