Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 232023 - dev-libs/nss-3.12 will not compile with dev-db/sqlite-3.5.9
Summary: dev-libs/nss-3.12 will not compile with dev-db/sqlite-3.5.9
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-17 00:05 UTC by Robert Bradbury
Modified: 2009-01-24 10:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Log of emerge of nss with compile error (nss.lst,113.00 KB, text/plain)
2008-07-17 11:50 UTC, Robert Bradbury
Details
Log of last emerge of sqlite (Jul 6). (sqlite.lst,21.01 KB, text/plain)
2008-07-17 11:57 UTC, Robert Bradbury
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Bradbury 2008-07-17 00:05:00 UTC
Attempting to compile dev-libs/nss-3.12 fails with an "implicit declaration" of "sqlite3_prepare_v2" in .../nss-3.12/mozilla/security/nss/lib/softoken/sdb.c.



Reproducible: Always

Steps to Reproduce:
1. emerge =dev-libs/nss-3.12
2. Note emerge failure attempting to compile sdb.c

Actual Results:  
Emerge fails, so most recent version of nss cannot be installed.

Expected Results:  
nss should emerge properly.

It should be noted that there are other bug reports filed on problems emerging nss but they do not specify a sqlite problem.

It is believed that the problem is that in "sdb.c" the statement "#include <sqlite3.h>" should be patched to "#include <sqlite3ext.h>".  That is the statement found in the current Mozilla/Firefox sdb.c source and seems consistant with modifications/extensions which have been made to sqlite3.

The only difference between the Gentoo nss sdb.c and the Mozilla/Firefox nss sdb.c is that single line.

The existing Gentoo nss sources should only compile with an older version of sqlite (so the current ebuild needs a restriction to use the version of sqlite before sqlite3ext.h was added).
Comment 1 Raúl Porcel (RETIRED) gentoo-dev 2008-07-17 09:39:55 UTC
I'll disable system sqlite...
Comment 2 Raúl Porcel (RETIRED) gentoo-dev 2008-07-17 10:29:16 UTC
Hrm...i'm not able to reproduce...
Comment 3 Robert Bradbury 2008-07-17 11:50:46 UTC
Created attachment 160635 [details]
Log of emerge of nss with compile error

This is a log of the emerge of nss which demonstrates the "implicit declaration" problem.
Comment 4 Robert Bradbury 2008-07-17 11:57:54 UTC
Created attachment 160636 [details]
Log of last emerge of sqlite (Jul 6).

This is a log of the last emerge of sqlite3 on July 6.  The files /usr/include/sqlite3.h and /usr/include/sqlite3ext.h were updated on my system at that time.  From the looks of sqlite3ext.h that included a change to the definition of "sqlite3_prepare_v2".  From the looks of the Mozilla/Firefox CVS sources, it looks like June 29 may have been the date when the #include <sqlite3.h> was changed to #include <sqlite3ext.h> in sdb.c.
Comment 5 Raúl Porcel (RETIRED) gentoo-dev 2008-07-17 13:43:45 UTC
But 3.12 is in the tree since 18 jun :/
Comment 6 Robert Bradbury 2008-07-17 15:56:07 UTC
That is fine.  Perhaps nss-3.1.2 compiled with an older version of sqlite (perhaps 3.5.6) *before* the introduction of sqlite3ext.h.

It is very clear that the nss ebuilds should have some kind of sqlite restrictions.  Versions of sqlite w/o sqlite3ext.h should have an nss sdb.c which includes sqlite3.h.  Verions w/ sqlite3ext.h should have a nss sdb.c which includes sqlite3ext.h.  (At least that is the way I am reading the current mozilla sources.)

Now, I may have gotten things out of sync in my upgrades (I did very few upgrades through most of June) which may explain part of my problem.

But the bottom line on my system is that I either need a version of nss sdb.c which includes sqlite3ext.h, or I need someone to go through sqlite3.h and tell me why it doesn't have a declartion for sqlite3_prepare_v2 on my system.
Comment 7 Raúl Porcel (RETIRED) gentoo-dev 2008-07-17 17:06:43 UTC
 Contents of dev-db/sqlite-3.5.9:
/usr
/usr/bin
/usr/bin/sqlite3
/usr/include
/usr/include/sqlite3.h
/usr/include/sqlite3ext.h

* Contents of dev-db/sqlite-3.5.6:
/usr
/usr/bin
/usr/bin/lemon-3
/usr/bin/sqlite3
/usr/include
/usr/include/sqlite3.h
/usr/include/sqlite3ext.h


Hrm?
Comment 8 Robert Bradbury 2008-07-17 21:52:04 UTC
It would appear that with updates to sqlite as of Jul 17, 2008, nss may now be
able to compile completely.  The versions updated were to sqlite-2.8.16-r4 and
sqlite-3.5.9.

Regarding sqlite3ext.h being in both sqlite 3.5.9 and 3.5.6.  Perhaps they
changed sqlite3.h so it did not include sqlite3ext.h, or perhaps there are
configuration variables that changed, given the two defines for
sqlite3_prepare_v2 in sqlite3ext.h, e.g.:


#define sqlite3_prepare_v2             sqlite3_api->prepare_v2
#define sqlite3_prepare_v2             sqlite3_api->prepare_v2


they are obviously changing the API.  Under what circumstances they use and/or
declare the old vs. new interfaces I am unsure.
Comment 9 Robert Bradbury 2008-07-18 11:29:25 UTC
Though, not strictly a compile problem, there is an immediate library dependency problem when an upgrading dev-libs/nss.

Programs such as bug-buddy depend upon libssl3.so and libnss3.so.  Those in turn depend upon libsoftokn3.so (allof which are in /usr/lib/nss).

nss-3.12 upgrades libsoftokn3.so.11 to libsoftokn3.so.12 and removes libsoftokn3.so.11.  So bug-buddy needs to be immediately re-emerged after upgrading nss.  I suspect this applies to all other programs which use nss as well.  (A script to do a ldd dump of all files in /usr/bin running them through an egrep for libraries in /usr/lib/nss, esp. ssl3 and nss3 is probably necessary.
Comment 10 Robert Bradbury 2008-07-18 16:56:18 UTC
It appears that in order to completely compile bug-buddy, after upgrading to nss-3.12, it may be necessary to re-emerge evolution-data-server because it in turn depends upon libcamel-1.2 which has dependencies on dev-libs/nss as well.
Comment 11 Raúl Porcel (RETIRED) gentoo-dev 2008-08-28 17:27:26 UTC
So what we have to do here?
Comment 12 Stefan de Konink 2009-01-21 11:31:53 UTC
And this bug basically fubars every installation. Sqlite3 should be recompiled, NSS should be recompiled, and everything depending on NSS should be recompiled.