Closed AxelNennker closed 5 years ago
Hi Axel,
Could you explain to me what problem using cmake
causes that using make
directly would solve?
From what I recall you were unable to cross-compile for android using cmake. Why not open an issue for that?
Added WIP to the title of this PR.
I will follow openssl-rs's example and copy the source_dir to OUT_DIR
https://github.com/alexcrichton/openssl-src-rs/blob/master/src/lib.rs#L80
This way it gets removed when cargo clean
is called.
Also integrate with testcrate again following openssl_rs's example.
I now build from the testcrate to see who the src-crate is used.
Sub-problem is now that the cloned git submodule is not on the stable branch and the configure
script is complaining about that.
--- stderr
configure: WARNING: You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed.
Is that something you could change for the git submodule?
Yes the master branch uses a unreleased version for zmq. The latest_release branch tracks the lastest zmq stable release.
I suggest to add the stable branch here as a submodule like described here. https://stackoverflow.com/questions/1777854/how-can-i-specify-a-branch-tag-when-adding-a-git-submodule Maybe even a fixed version (which would be needed to be updated from time to time)
Currently latest_release
tracks the stable branch. However the stable branch is not a fixed version.
I'm not sure I understand your previous comment.
I think that the submodule should be 'stable' not master.
cd zeromq-src-rs/vendor
git checkout stable
cd ..
git add zeromq-src-rs
git commit -m "moved src directory vendor to stable"
git push
This way the submodule directory 'vendor' contains the branch 'stable' when zeromq-src-rs is checked out.
The master branch mirrors libzmq
's master branch. It is a preview branch.
The lastest_release mirros follows libzmq
's lastest_release branch. This is a the stable branch.
Do you mean that you think either of these branches should be renamed?
Signed-off-by: Axel Nennker axel.nennker@telekom.de
I suggest to call zeromq's autogen.sh && configure && make to build libzmq.a
How to use this:
git clone --recursive https://github.com/AxelNennker/zeromq-src-rs
cd zeromq-src-rs
ANDROID_API=28 PATH=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH CC=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang CXX=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang++ cargo build --target=aarch64-linux-android
vendor/src/.libs/libzmq.a
Possible improvements:
cargo clean
removes everything built