Re: [sqlite] undefined reference to sqlite3_mutex_held

2009-12-10 Thread Shawn Wilsher
On Thu, Dec 10, 2009 at 10:18 AM, Daniel Mierswa wrote:

> My concolusion is that the TB folks shouldn't assume that the system
> sqlite library was built with debugging symbols or provide a mechanism
> to opt out said function call with an easy switch/compiler flag.
>
Well, there is your problem.  Building Thunderbird with system SQLite is not
supported.

Cheers,

Shawn
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] undefined reference to sqlite3_mutex_held

2009-12-10 Thread Daniel Mierswa
On 10.12.2009 07:44, Roger Binns wrote:
> sqlite3.h is not generated from a .in template.  Are you volunteering to do
> that and become the maintainer of it?
Nah I was merely wondering how/if it could be achieved at all.

> Secondly your solution would only work for autotools which not everyone uses.
True.

> Thirdly it wouldn't support the case of people supplying flags at the
> command line to the compiler which is the usual case.
Also true.

> SQLite 3 is shipped with a pkg-config data file so you could try to get the
> flags into that.
Hm that's probably a good idea, but I wouldn't know what to put in there
to fix the TB issue.

My concolusion is that the TB folks shouldn't assume that the system
sqlite library was built with debugging symbols or provide a mechanism
to opt out said function call with an easy switch/compiler flag.

Thanks for your attention and clarification on that matter. :)

-- 
Mierswa, Daniel

If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
   --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22
n
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] undefined reference to sqlite3_mutex_held

2009-12-09 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Daniel Mierswa wrote:
> Couldn't it be done with something like a sqlite3.h.in which gets
> preprocessed by autotools (relevant switches would be for example
> --enable-debug or something) and set constants which can then be used to
> opt in/out certain prototypes?

sqlite3.h is not generated from a .in template.  Are you volunteering to do
that and become the maintainer of it?

Secondly your solution would only work for autotools which not everyone uses.

Thirdly it wouldn't support the case of people supplying flags at the
command line to the compiler which is the usual case.

SQLite 3 is shipped with a pkg-config data file so you could try to get the
flags into that.

In any event futzing with the header file doesn't actually solve anything.
If you call a function that has no header then the compiler will whine a
little and then you'll still get a link time error.

The bottom line is that the presence of declarations in headers only alters
compiler warnings for C code and that at link time you are told about there
being an issue.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksgmOoACgkQmOOfHg372QQ6aQCglydXigRUE+6LEQyIgxzb3JWB
bTAAn1OksONBetlQZXY7wbPZ+hCAsWe6
=cYIW
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] undefined reference to sqlite3_mutex_held

2009-12-09 Thread Daniel Mierswa
On 10.12.2009 06:32, Roger Binns wrote:
> The header file has no idea what options you used when compiling the
> library.  This applies to much other functionality you can include/omit.
> 
> Roger
Couldn't it be done with something like a sqlite3.h.in which gets
preprocessed by autotools (relevant switches would be for example
--enable-debug or something) and set constants which can then be used to
opt in/out certain prototypes?

-- 
Mierswa, Daniel

If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
   --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] undefined reference to sqlite3_mutex_held

2009-12-09 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Daniel Mierswa wrote:
> Though I wonder why the header does not hide the prototype when it gets
> installed into the system.

The header file has no idea what options you used when compiling the
library.  This applies to much other functionality you can include/omit.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksgh98ACgkQmOOfHg372QSoHwCgvO6apUZsWW0WwM+X840LfKrj
+qcAnjiz18sa53okZKZStAcEHXtI9Ct8
=Id0Q
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] undefined reference to sqlite3_mutex_held

2009-12-09 Thread Daniel Mierswa
On 10.12.2009 05:42, Dan Kennedy wrote:
> sqlite3_mutex_held() is only defined if SQLite is built with
> SQLITE_DEBUG defined. Looks like this was not the case when
> the library linked to by -lsqlite3 above was compiled.
I wrote exactly that in my initial mail to the list.
Though I wonder why the header does not hide the prototype when it gets
installed into the system.

-- 
Mierswa, Daniel

If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
   --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] undefined reference to sqlite3_mutex_held

2009-12-09 Thread Dan Kennedy

On Dec 10, 2009, at 11:19 AM, Daniel Mierswa wrote:

> On 10.12.2009 01:22, Shawn Wilsher wrote:
>> See https://bugzilla.mozilla.org/show_bug.cgi?id=533171 (this isn't  
>> really a
>> SQLite issue).
> I'm not sure what you mean. I can reproduce it without any Thunderbird
> code involved at all.
>
> impu...@istari ~ $ echo -e "#include  \n int main() {
> sqlite3_mutex_held(0); return 0; }" | gcc -xc - -lsqlite3
> /tmp/ccRHfvsh.o: In function `main':
> :(.text+0xa): undefined reference to `sqlite3_mutex_held'
> collect2: ld returned 1 exit status

sqlite3_mutex_held() is only defined if SQLite is built with
SQLITE_DEBUG defined. Looks like this was not the case when
the library linked to by -lsqlite3 above was compiled.

Dan.


>
> -- 
> Mierswa, Daniel
>
> If you still don't like it, that's ok: that's why I'm boss. I simply
> know better than you do.
>   --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] undefined reference to sqlite3_mutex_held

2009-12-09 Thread Daniel Mierswa
On 10.12.2009 01:22, Shawn Wilsher wrote:
> See https://bugzilla.mozilla.org/show_bug.cgi?id=533171 (this isn't really a
> SQLite issue).
I'm not sure what you mean. I can reproduce it without any Thunderbird
code involved at all.

impu...@istari ~ $ echo -e "#include  \n int main() {
sqlite3_mutex_held(0); return 0; }" | gcc -xc - -lsqlite3
/tmp/ccRHfvsh.o: In function `main':
:(.text+0xa): undefined reference to `sqlite3_mutex_held'
collect2: ld returned 1 exit status

-- 
Mierswa, Daniel

If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
   --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] undefined reference to sqlite3_mutex_held

2009-12-09 Thread Shawn Wilsher
See https://bugzilla.mozilla.org/show_bug.cgi?id=533171 (this isn't really a
SQLite issue).

Cheers,

Shawn

On Wed, Dec 9, 2009 at 3:32 PM, Daniel Mierswa  wrote:

> Hi list,
> when I try to build the current thunderbird 3.0 release against
> sqlite-3.6.21 i get an undefined reference to sqlite3_mutex_held, with
> 3.6.19 that didn't occur. When i compile sqlite3 with -DSQLITE_DEBUG the
> symbol is exported, now I wonder if this symbol is not supposed to be
> exported in a release build, in whch case the header should reflect
> that, or if it's a bug in the current source? Or am I totally off?
> Thanks for reading.
>
> --
> Mierswa, Daniel
>
> If you still don't like it, that's ok: that's why I'm boss. I simply
> know better than you do.
>   --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] undefined reference to sqlite3_mutex_held

2009-12-09 Thread Daniel Mierswa
Hi list,
when I try to build the current thunderbird 3.0 release against
sqlite-3.6.21 i get an undefined reference to sqlite3_mutex_held, with
3.6.19 that didn't occur. When i compile sqlite3 with -DSQLITE_DEBUG the
symbol is exported, now I wonder if this symbol is not supposed to be
exported in a release build, in whch case the header should reflect
that, or if it's a bug in the current source? Or am I totally off?
Thanks for reading.

-- 
Mierswa, Daniel

If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
   --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users