[prev in list] [next in list] [prev in thread] [next in thread]
List: sqlite-users
Subject: [sqlite] Build issue on Mac (building for Android)
From: Ignacio Rodrigo <ignacio.rodrigo () toptal ! com>
Date: 2017-04-25 3:38:05
Message-ID: 74C560F3-7F41-462B-BFAF-16379A398A3A () toptal ! com
[Download RAW message or body]
Hi all,
I found this issue while building the SQLite C library for an Android app on my Mac. \
I'm using the amalgamated version of SQLIte 3.8.11.1.
I think it could be a valid issue, but it's the first time I use the library so \
please let me know if I'm missing something obvious.
Building the library fails because it tries to use mmap but <sys/mman.h> has not been \
included.
I found that <sys/mman.h> is only included if the following conditions are met:
1. #if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
2. #if SQLITE_OS_UNIX
The first precondition is checked right before the #include <sys/mman.h> line, so \
it's obvious. But the second precondition is checked several lines above the include.
Then I noticed that before using mman, it checks that the first precondition is true, \
but it doesn't check for the second precondition which is false in mi case, and \
that's why the build is failing for me.
I think the exact same conditions which are checked before the include should also be \
checked again before using it, what do you think?
I also confirmed this is still an issue in the latest version of the source code, \
3.18.0, which I downloaded here: sqlite-amalgamation-3180000.zip \
<http://sqlite.org/2017/sqlite-amalgamation-3180000.zip>
Please let me know if you need any more information about my dev environment or \
something, but I think it should be pretty easy to check this by just looking at the \
code.
Thanks in advance,
Ignacio Rodrigo
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic