[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: LMDB and Android



Do you have an example of agcc? I tried arm-linux-androideabi-gcc with --sysroot android-19 but the build fails.

mdb.c: In function 'mdb_env_open':
mdb.c:327:20: error: 'O_DSYNC' undeclared (first use in this function)
 # define MDB_DSYNC O_DSYNC
                    ^
mdb.c:4502:39: note: in expansion of macro 'MDB_DSYNC'
    env->me_mfd = open(dpath, oflags | MDB_DSYNC, mode);
                                       ^
mdb.c:327:20: note: each undeclared identifier is reported only once for each function it appears in
 # define MDB_DSYNC O_DSYNC
                    ^
mdb.c:4502:39: note: in expansion of macro 'MDB_DSYNC'
    env->me_mfd = open(dpath, oflags | MDB_DSYNC, mode);
                                       ^
make: *** [mdb.o] Error 1


On Sun, Jan 18, 2015 at 8:20 PM, Howard Chu <hyc@symas.com> wrote:
Kristoffer Sjögren wrote:
Hi

I'm a Android noob and need to build LMDB for Android. Is Android NDK
the way to go?

Yep.

https://developer.android.com/tools/sdk/ndk/index.html

Any tricks I should be aware of?

For simplicity's sake I put all the required flags into a shell script (I call it agcc) and just run "make CC=agcc" - you shouldn't need to change anything else in the Makefile then.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/