-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building libressl on Android #707
Comments
That is on behalf of Apache MiNiFi (C++ port) |
similar post https://marc.info/?l=libressl&m=163898452805536&w=2 |
CI build for Android 11 succeeds on Github Actions, here. It runs on ubuntu 18.04 and you can see how it execute cmake in scripts/test. Your log seems that other products had built LibreSSL as its library to use with. |
Version 3.0.2 was picked up. |
I might assume that you would provide a patch, for CMake - I could reproduce, with an applied patch |
You can reproduce with Termux |
Android 11 has kernel's version 4.19.127-g127475f6d88e-dirty |
Hey, I don't think we're to interested in supporting termux directly, since it can be difficult to get things working in that environment even in the best of times. If you want to send a diff for any CMake changes needed to build directly in that environment, feel free, but we're probably not going to be able to help much more than that. |
I was able to get libressl 3.8.0 to build under termux with only a few modifications. in CMakeLists.txt root can add
and then the syslog.h headers define syslog_r and vsyslog_r to pass to android syslog functions; somehow the test for HAVE_SYSLOG fails (Oh that must test for 'vsyslog'), so the include/compat/syslog.h ends up getting used, which then at the start I added
and I had to reverse the function declarations in crypto/compat/syslog_r.c
to
where the above functions are meant to be a shorthand representing their full definition with args and code.... Was surprised - termux has come a long way, and most of my largest library compiled just fine (other than this small issue with libressl) |
[ 0%] Built target date-tz
[ 1%] Built target spdlog-external
[ 2%] Built target ossp-uuid-external
[ 4%] Built target zlib-external
[ 5%] Built target yaml-cpp-external
[ 5%] Performing build step for 'libressl-portable'
Consolidate compiler generated dependencies of target crypto
[ 0%] Building C object crypto/CMakeFiles/crypto.dir/cryptlib.c.o
In file included from /data/data/com.termux/files/home/nifi-minifi-cpp/build/thirdparty/libressl-src/crypto/cryptlib.c:121:
/data/data/com.termux/files/home/nifi-minifi-cpp/build/thirdparty/libressl-src/crypto/../include/compat/syslog.h:32:6: error: conflicting types for 'android_polyfill_syslog_r'
void syslog_r(int, struct syslog_data , const char , ...);
^
/data/data/com.termux/files/usr/include/syslog.h:176:18: note: expanded from macro 'syslog_r'
#define syslog_r android_polyfill_syslog_r
^
/data/data/com.termux/files/usr/include/syslog.h:161:24: note: previous definition is here
static inline void android_polyfill_syslog_r(int syslog_priority, void d, const char format, ...)
^
In file included from /data/data/com.termux/files/home/nifi-minifi-cpp/build/thirdparty/libressl-src/crypto/cryptlib.c:121:
/data/data/com.termux/files/home/nifi-minifi-cpp/build/thirdparty/libressl-src/crypto/../include/compat/syslog.h:33:6: error: conflicting types for 'android_polyfill_vsyslog_r'
void vsyslog_r(int, struct syslog_data , const char , va_list);
^
/data/data/com.termux/files/usr/include/syslog.h:177:19: note: expanded from macro 'vsyslog_r'
#define vsyslog_r android_polyfill_vsyslog_r
^
/data/data/com.termux/files/usr/include/syslog.h:170:24: note: previous definition is here
static inline void android_polyfill_vsyslog_r(int syslog_priority, void d, const char fmt, va_list ap)
^
2 errors generated.
make[5]: *** [crypto/CMakeFiles/crypto.dir/build.make:188: crypto/CMakeFiles/crypto.dir/cryptlib.c.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:197: crypto/CMakeFiles/crypto.dir/all] Error 2
make[3]: *** [Makefile:146: all] Error 2
make[2]: *** [CMakeFiles/libressl-portable.dir/build.make:86: libressl-portable-prefix/src/libressl-portable-stamp/libressl-portable-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:1076: CMakeFiles/libressl-portable.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
The text was updated successfully, but these errors were encountered: