Closed Bug 1166573 Opened 9 years ago Closed 9 years ago

sqlite linking errors when building a debug b2g build

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox41 affected)

RESOLVED WORKSFORME
Tracking Status
firefox41 --- affected

People

(Reporter: heycam, Unassigned)

Details

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.
And clobbering and rebuilding even without removing the macros worked.  Sorry for the noise.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.