Return-Path: Delivered-To: apmail-httpd-apreq-dev-archive@www.apache.org Received: (qmail 46544 invoked from network); 1 Feb 2005 08:19:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Feb 2005 08:19:45 -0000 Received: (qmail 39830 invoked by uid 500); 1 Feb 2005 08:19:45 -0000 Delivered-To: apmail-httpd-apreq-dev-archive@httpd.apache.org Received: (qmail 39743 invoked by uid 500); 1 Feb 2005 08:19:44 -0000 Mailing-List: contact apreq-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list apreq-dev@httpd.apache.org Received: (qmail 39730 invoked by uid 99); 1 Feb 2005 08:19:44 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_HELO_PASS,SPF_PASS,UPPERCASE_25_50 X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of gcaa-apreq-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 01 Feb 2005 00:19:42 -0800 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1CvtFh-0001lb-Gt for apreq-dev@httpd.apache.org; Tue, 01 Feb 2005 09:19:13 +0100 Received: from adsl-3-9-33.mia.bellsouth.net ([65.3.9.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Feb 2005 09:19:13 +0100 Received: from joe+gmane by adsl-3-9-33.mia.bellsouth.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Feb 2005 09:19:13 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: apreq-dev@httpd.apache.org To: apreq-dev@httpd.apache.org From: Joe Schaefer Subject: [PATCH] Re: apr-related ABI issues for apreq2 packagers Date: Tue, 01 Feb 2005 03:19:20 -0500 Lines: 72 Message-ID: <87651cvgjb.fsf_-_@gemini.sunstarsys.com> References: <87hdlak6vm.fsf@gemini.sunstarsys.com> <20050123195513.GB6150@roonstrasse.net> <87is5nizop.fsf@gemini.sunstarsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: adsl-3-9-33.mia.bellsouth.net Mail-Copies-To: never User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:mbwGvQfDP77lMVR5MKd7RfQr/ps= Sender: news X-Gmane-MailScanner: Found to be clean X-Gmane-MailScanner: Found to be clean X-MailScanner-From: gcaa-apreq-dev@m.gmane.org X-MailScanner-To: apreq-dev@httpd.apache.org X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Joe Schaefer writes: > Max Kellermann writes: [...] >> But we shouldn't just make a "recommendation" of this case, >> we should hard code our decision (whatever of the two it may be) >> in our build scripts. Everything else endangers binary >> compatibility between different distributions. > > That's the core issue: should *we* tinker with our major number > based on apr's ABI, or should we always leave it "2"? IMO > we should always leave ours at "2", no matter which apr version > a user links us against. Here's a patch which splits the difference by bumping our generated so's major number based on the apr major version. This should cover the ABI issues, so installing libapreq2 into a system-wide directory won't cause a conflict when different apr ABIs are present. I'd like to commit this patch to trunk, but first am looking for feedback on the general concept. - echo ${ltmaj}:${patch}:${minor} +elif test "$1" = "minor"; then + echo ${minor} +elif test "$1" = "patch"; then + echo ${patch} else echo "ERROR: unknown version CMD ($1)" exit 1 Index: acinclude.m4 =================================================================== --- acinclude.m4 (revision 125283) +++ acinclude.m4 (working copy) @@ -53,7 +53,7 @@ APACHE2_INCLUDES=-I`$APACHE2_APXS -q INCLUDEDIR` APR_MAJOR_VERSION=`$APACHE2_APXS -q APR_VERSION 2>/dev/null | cut -d. -f 1` - if test ${APR_MAJOR_VERSION:=0} -eq 0; then + if test ${APR_MAJOR_VERSION:="0"} -eq 0; then apr_config=apr-config apu_config=apu-config else @@ -168,10 +168,20 @@ get_version="$abs_srcdir/build/get-version.sh" version_hdr="$abs_srcdir/src/apreq_version.h" - APREQ_LIBTOOL_VERSION=`$get_version libtool $version_hdr APREQ` + # set version data + APREQ_MAJOR_VERSION=`$get_version major $version_hdr APREQ` - APREQ_DOTTED_VERSION=`$get_version all $version_hdr APREQ` + APREQ_MINOR_VERSION=`$get_version minor $version_hdr APREQ` + APREQ_PATCH_VERSION=`$get_version patch $version_hdr APREQ` + APREQ_DOTTED_VERSION=`$get_version all $version_hdr APREQ` + # XXX: APR_MAJOR_VERSION doesn't yet work for static builds + APREQ_LIBTOOL_CURRENT=`expr $APREQ_MAJOR_VERSION + $APREQ_MINOR_VERSION + $APR_MAJOR_VERSION` + APREQ_LIBTOOL_REVISION=$APREQ_PATCH_VERSION + APREQ_LIBTOOL_AGE=$APREQ_MINOR_VERSION + + APREQ_LIBTOOL_VERSION="$APREQ_LIBTOOL_CURRENT:$APREQ_LIBTOOL_REVISION:$APREQ_LIBTOOL_AGE" + APREQ_LIBNAME="apreq$APREQ_MAJOR_VERSION" APREQ_INCLUDES="" APREQ_LDFLAGS="" -- Joe Schaefer