Update to build master (post zeromq)
zeromq, boost back to 1.58, other tweaks
This commit is contained in:
parent
dceca0e198
commit
1614c0ab84
|
@ -8,7 +8,7 @@ replacing "32" with "64".
|
|||
## Prepare Ubuntu environment
|
||||
|
||||
```
|
||||
sudo apt-get install build-essential cmake tofrodos
|
||||
sudo apt-get install build-essential cmake tofrodos libtool-bin
|
||||
sudo mkdir /opt/android
|
||||
sudo chown $LOGNAME /opt/android
|
||||
```
|
||||
|
@ -70,9 +70,9 @@ ln -s ../../../../openssl/android-21/lib/libcrypto.so
|
|||
## Build Boost
|
||||
```
|
||||
cd /opt/android
|
||||
wget https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.gz/download -O boost_1_64_0.tar.gz
|
||||
tar xfz boost_1_64_0.tar.gz
|
||||
(cd boost_1_64_0; ./bootstrap.sh)
|
||||
wget https://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.gz/download -O boost_1_58_0.tar.gz
|
||||
tar xfz boost_1_58_0.tar.gz
|
||||
(cd boost_1_58_0; ./bootstrap.sh)
|
||||
```
|
||||
The NDK r15c above gives errors about fsetpos and fgetpos not found(!?!), so we "just" comment them out in the include file:
|
||||
`nano /opt/android/tool32/include/c++/4.9.x/cstdio` (`//using ::fgetpos`, `//using ::fsetpos`)
|
||||
|
@ -83,21 +83,51 @@ export PATH=/opt/android/tool32/arm-linux-androideabi/bin:/opt/android/tool32/bi
|
|||
./b2 --build-type=minimal link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --build-dir=android32 --stagedir=android32 toolset=clang threading=multi threadapi=pthread target-os=android stage
|
||||
```
|
||||
|
||||
## Build & prepare zeromq
|
||||
```
|
||||
cd /opt/android
|
||||
wget git clone https://github.com/zeromq/zeromq3-x.git
|
||||
export PATH=/opt/android/tool32/arm-linux-androideabi/bin:/opt/android/tool32/bin:$PATH
|
||||
export OUTPUT_DIR=/opt/android/zeromq
|
||||
./configure --enable-static --disable-shared --host=arm-linux-androideabi --prefix=$OUTPUT_DIR LDFLAGS="-L$OUTPUT_DIR/lib" CPPFLAGS="-isystem /opt/android/tool32/include/c++/4.9.x -fPIC -I$OUTPUT_DIR/include -Wno-error -D__ANDROID_API__=21" LIBS="-lgcc"
|
||||
make
|
||||
make install
|
||||
|
||||
git clone https://github.com/zeromq/cppzmq.git
|
||||
cp cppzmq/*.hpp zeromq/include/
|
||||
```
|
||||
|
||||
## And finally: Build Monero
|
||||
```
|
||||
cd /opt/android
|
||||
git clone https://github.com/monero-project/monero
|
||||
cd monero
|
||||
|
||||
```
|
||||
```
|
||||
# <patch monero code as needed>
|
||||
|
||||
# also, don't abort on warnings:
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1f74f59..2c791c0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -400,7 +400,7 @@ else()
|
||||
set(ARCH_FLAG "-march=${ARCH}")
|
||||
endif()
|
||||
set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-variable -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized")
|
||||
- if(NOT MINGW)
|
||||
+ if(NOT MINGW AND NOT ANDROID)
|
||||
set(WARNINGS_AS_ERRORS_FLAG "-Werror")
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
```
|
||||
```
|
||||
mkdir -p build/release.android32
|
||||
cd build/release.android32
|
||||
|
||||
# only if not set already set
|
||||
export PATH=/opt/android/tool32/arm-linux-androideabi/bin:/opt/android/tool32/bin:$PATH
|
||||
|
||||
CC=clang CXX=clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D BUILD_TAG="android" -D BOOST_ROOT=/opt/android/boost_1_64_0 -D BOOST_LIBRARYDIR=/opt/android/boost_1_64_0/android32/lib -D OPENSSL_ROOT_DIR=/opt/android/openssl/android-21 -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true ../..
|
||||
CC=clang CXX=clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D BUILD_TAG="android" -D BOOST_ROOT=/opt/android/boost_1_58_0 -D BOOST_LIBRARYDIR=/opt/android/boost_1_58_0/android32/lib -D OPENSSL_ROOT_DIR=/opt/android/openssl/android-21 -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -D ZMQ_INCLUDE_PATH=/opt/android/zeromq/include -D ZMQ_LIB=/opt/android/zeromq/lib/libzmq.a ../..
|
||||
make
|
||||
|
||||
find . -name '*.a' -exec cp '{}' lib \;
|
||||
|
|
Loading…
Reference in New Issue