NetBSD Problem Report #49081

From www@NetBSD.org  Wed Aug  6 20:02:05 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A86F9A98D6
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  6 Aug 2014 20:02:05 +0000 (UTC)
Message-Id: <20140806200204.3CA01A98E0@mollari.NetBSD.org>
Date: Wed,  6 Aug 2014 20:02:04 +0000 (UTC)
From: venture37@geeklan.co.uk
Reply-To: venture37@geeklan.co.uk
To: gnats-bugs@NetBSD.org
Subject: Unbreak databases/sqlite3 on OS X Tiger
X-Send-Pr-Version: www-1.0

>Number:         49081
>Category:       pkg
>Synopsis:       Unbreak databases/sqlite3 on OS X Tiger
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 06 20:05:01 +0000 2014
>Closed-Date:    Thu Aug 07 15:36:30 +0000 2014
>Last-Modified:  Thu Aug 07 15:40:00 +0000 2014
>Originator:     Sevan Janiyan
>Release:        pkgsrc-current
>Organization:
>Environment:
Darwin 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc
>Description:
Tiger lacks the zone memory allocator, attempting to build fails with 
/bin/sh ./libtool --tag=CC   --mode=link gcc -D_REENTRANT=1 -DSQLITE_THREADSAFE=1  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -pipe -O2 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_LOAD_EXTENSION -I/usr/include -no-undefined -version-info 8:6:8 -L/usr/lib -L/usr/pkg/lib -o libsqlite3.la -rpath /usr/pkg/lib sqlite3.lo  -ldl
libtool: link: gcc -dynamiclib  -o .libs/libsqlite3.0.dylib  .libs/sqlite3.o   -L/tmp/databases/sqlite3/work/.buildlink/lib -ldl  -O2   -install_name  /usr/pkg/lib/libsqlite3.0.dylib -compatibility_version 9 -current_version 9.6 -Wl,-single_module
ld: Undefined symbols:
_OSAtomicCompareAndSwapPtrBarrier
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: internal link edit command failed
Makefile:356: recipe for target 'libsqlite3.la' failed
gmake: *** [libsqlite3.la] Error 1

Attached patch sets  SQLITE_WITHOUT_ZONEMALLOC which allows it to build successfully 
>How-To-Repeat:

>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/databases/sqlite3/Makefile,v
retrieving revision 1.80
diff -u -r1.80 Makefile
--- Makefile    18 Jul 2014 11:25:14 -0000      1.80
+++ Makefile    6 Aug 2014 19:59:11 -0000
@@ -28,8 +28,9 @@
 CFLAGS.NetBSD+=                -DUSE_PREAD

 # Darwin < 9 (Mac OS X < 10.5 "Leopard") doesn't have gethostuuid(2)
+# and lacks the zone memory allocator
 .if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
-CFLAGS+=               -DSQLITE_ENABLE_LOCKING_STYLE=0
+CFLAGS+=               -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WITHOUT_ZONEMALLOC
 .endif

 # This define includes the sqlite3_unlock_notify() API in the build.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 07 Aug 2014 15:36:30 +0000
State-Changed-Why:
Committed, thanks.


From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49081 CVS commit: pkgsrc/databases/sqlite3
Date: Thu, 7 Aug 2014 15:36:11 +0000

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Thu Aug  7 15:36:11 UTC 2014

 Modified Files:
 	pkgsrc/databases/sqlite3: Makefile

 Log Message:
 Fix build on OS X Tiger/Darwin 8.11.0. From Sevan Janiyan in PR 49081.


 To generate a diff of this commit:
 cvs rdiff -u -r1.80 -r1.81 pkgsrc/databases/sqlite3/Makefile

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

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