[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] [PATCH] Fix "Symbol not found: _OSAtomicCompareAndSwapPtrBarrier" on Mac OS X 10.4 (Tig
From:       Richard Hipp <drh () sqlite ! org>
Date:       2012-08-24 1:20:59
Message-ID: CALwJ=Mxae=uZ=S5BSBBfcN7fYSUoVZf=abVPno=qJVZvD4YrDQ () mail ! gmail ! com
[Download RAW message or body]

On Tue, Aug 21, 2012 at 8:54 PM, Dwayne Litzenberger <dlitz@dropbox.com>wrote:

> Recent versions of SQLite fail to run on Mac OS X 10.4 (Tiger) with
> the following error message:
>

We don't test SQLite in MacOS 10.4, but we do test every release on MacOS
10.2.  For that platform, we add the compile-time option:

    -DSQLITE_WITHOUT_ZONEMALLOC

Doing the same should clear the problem on MacOS 10.4 as well.  And using
that approach will save us from having to maintain a bunch of hard-to-test
preprocessor logic.


>
>     $ DYLD_LIBRARY_PATH=. ./sqlite3
>     dyld: lazy symbol binding failed: Symbol not found:
> _OSAtomicCompareAndSwapPtrBarrier
>       Referenced from: ./libsqlite3.0.dylib
>       Expected in: /usr/lib/libSystem.B.dylib
>
>     dyld: Symbol not found: _OSAtomicCompareAndSwapPtrBarrier
>       Referenced from: ./libsqlite3.0.dylib
>       Expected in: /usr/lib/libSystem.B.dylib
>
>     Trace/BPT trap
>
> This is because OSAtomicCompareAndSwapPtrBarrier was not introduced
> until Mac OS X 10.5 (Leopard).
>
> Affected versions:
>
> - Latest trunk (fossil 45cdc32f1e cloned from https://sqlite.org/src/)
> - SQLite 3.7.13
> - SQLite 3.7.12
>
> Not affected:
>
> - SQLite 3.7.11
> - SQLite 3.7.10
> - SQLite 3.7.9
>
> Build environment:
>
>     Mac OS X SDK: MacOSX10.6.sdk
>
>     $ xcodebuild -version
>     Xcode 3.2.5
>     Component versions: DevToolsCore-1763.0; DevToolsSupport-1758.0
>     BuildVersion: 10M2423
>
>     $ gcc --version
>     i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)
>
> How to reproduce:
>
> I built SQLite on a Mac OS X 10.5 (Leopard) machine, then copied
> .libs/ to a machine running 10.4 (Tiger) and ran sqlite3 from there:
>
>     tar xzf sqlite-autoconf-3071300.tar.gz
>     mkdir bld
>     cd bld
>     CFLAGS='-arch ppc -arch i386 -mmacosx-version-min=10.4' \
>         LDFLAGS='-arch ppc -arch i386 -mmacosx-version-min=10.4' \
>         ../sqlite-autoconf-3071300/configure --without-dependency-tracking
>     make
>     rsync --delete -a .libs/ tigerbox:~/sqlite-scratch/
>     ssh -t tigerbox "cd ~/sqlite-scratch && DYLD_LIBRARY_PATH=. ./sqlite3"
>
> I should get a regular sqlite prompt.  What I actually got was the
> "Symbol not found" error above.
>
> It looks like other people have seen this issue before[1], but it does
> not look like it's actually been fixed.
>
> Please apply the attached patch against the latest trunk (45cdc32f1e),
> which fixes this bug.  (You can ignore the git commit id in the patch.
>  It wasn't obvious to me how to make fossil output a commit as a
> patch, so just I did a "git init" inside the fossil working directory
> and then worked from that.)
>
> Cheers,
> - Dwayne
>
> [1] http://sqlite.org:8080/pipermail/sqlite-users/2012-January/036184.html
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>


-- 
D. Richard Hipp
drh@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic