sqlite linking errors when building a debug b2g build

RESOLVED WORKSFORME

Status

Firefox Build System
General
RESOLVED WORKSFORME
3 years ago
2 months ago

People

(Reporter: heycam, Unassigned)

Tracking

Trunk

Firefox Tracking Flags

(firefox41 affected)

Details

(Reporter)

Description

3 years ago
I am trying to produce a debug B2G build for my device (aries).  Here is one of the problems I am running into, once it gets up to the linking libxul stage:

../../../gecko/storage/src/SQLiteMutex.h:110: error: undefined reference to 'sqlite3_mutex_held'
../../../gecko/storage/src/SQLiteMutex.h:117: error: undefined reference to 'sqlite3_mutex_notheld'

I don't really know which copy of sqlite this is trying to link against (there are at least three under my B2G checkout), but in all of them the definition of these two methods are within #ifndef NDEBUG macros.

At this point in the build I find three sqlite3.o files:

./out/host/linux-x86/obj/SHARED_LIBRARIES/libsqlite_intermediates/sqlite3.o
./out/target/product/aries/obj/SHARED_LIBRARIES/libsqlite_intermediates/sqlite3.o
./objdir-gecko/db/sqlite3/src/sqlite3.o

and the second one doesn't have an sqlte3_mutex_held symbol in it, according to objdump.

Removing all of those #ifndefs and doing a clobber build makes it work (though rebuilding with |./build.sh -j1| still results in the link error, so I guess we have some dependency checking issues).  Still, it's not clear to me which file it is that's getting compiled mistakenly (presumably) with the wrong defines set.
(Reporter)

Comment 1

3 years ago
And clobbering and rebuilding even without removing the macros worked.  Sorry for the noise.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME

Updated

2 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.