pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Make php-pdo_sqlite use pkgsrc sqlite

25 sep 2009 kl. 14.43 skrev Leo R. Lundgren:

I'm having a problem with php-pdo_sqlite, in that it is linking itself against my OS X 10.5.8 native sqlite 3.4, instead of the pkgsrc sqlite 3.6.16. I do have sqlite3 from pkgsrc installed:

        % pkg_info|grep sqlite
        php5-pdo_sqlite-5.2.10 PHP extension for PHP Data Objects (SQLite v3)
        sqlite3-3.6.16      SQL Database Engine in a C Library

I am building php-pdo_sqlite like usual, no special settings. However, I have tried to mitigate the issue using the following in / usr/pkg/etc/mk.conf:


Using the PREFER_PKGSRC setting worked flawlessly when I had the same issue with freetype 2, so I presume that I am using this feature correctly. I also tried the same thing but with "sqlite" instead of "sqlite3", but none of those settings seem to make a difference. After restarting Apache with mod_php (also from pkgsrc), phpinfo() still reports the following:

        PDO support: enabled
        PDO drivers: sqlite

        PDO Driver for SQLite 3.x: enabled
PECL Module version: 1.0.1 $Id: pdo_sqlite.c,v 2008/12/31 11:17:42 sebastian Exp $
        SQLite Library: 3.4.0

I want the last line above to say "SQLite Library: 3.6.16", or at least 3.5.4 since that version or newer is what I need PHP/PDO to use.

Maybe the problem is that php-pdo_sqlite doesn't respect PREFER_PKGSRC at all? Any idea what I can do to make php-pdo_sqlite link against pkgsrc's own sqlite3 instead och my system's sqlite3?

Addendum; tnn@ pointed out that php-pdo_sqlite should never choose native sqlite3. Indeed, looking at what the pdo_sqlite extension is linked against, there's no mention of anything but pkgsrc's sqlite:

        % otool -L /usr/pkg/lib/php/20040412/
/usr/pkg/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4)

It was also suggested that it might have to do with some incorrect runpaths. I'll try to have a look at that.


Home | Main Index | Thread Index | Old Index