Skip to content
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

Android / Java bindings/jni/ci_build.sh fails on Ubuntu 22.04 #2233

Open
stephan57160 opened this issue Sep 17, 2022 · 3 comments
Open

Android / Java bindings/jni/ci_build.sh fails on Ubuntu 22.04 #2233

stephan57160 opened this issue Sep 17, 2022 · 3 comments

Comments

@stephan57160
Copy link
Contributor

stephan@ubuntu-vm:~/git/ZEROMQ$ git clone git@github.com:zeromq/czmq/
stephan@ubuntu-vm:~/git/ZEROMQ$ cd czmq/bindings/jni
stephan@ubuntu-vm:~/git/ZEROMQ$ ./ci_build.sh

ends with

...
make[2]: Leaving directory '/tmp/tmp-deps/libzmq'
make[1]: Leaving directory '/tmp/tmp-deps/libzmq'
9eccc61 (grafted, HEAD -> master, origin/master, origin/HEAD) tool_libinfo: silence "different 'const' qualifiers" in qsort()
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Remember to add 'LT_INIT' to configure.ac.
configure: WARNING: unrecognized options: --with-docs
configure: WARNING: Continuing even with errors mentioned immediately above this line.
configure: WARNING: Cannot find libraries for LDAP support: LDAP disabled
configure: error: TLS not detected, you will not be able to use HTTPS, FTPS, NTLM and more.
Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl or --with-rustls to address this.
stephan@ubuntu-vm:~/git/ZEROMQ$ 

Modified bindings/jni/ci_build.sh to dump CONFIG_OPTS when building libcurl and it shows :

...
./configure options for 'LIBCURL':
  > CFLAGS=-I/tmp/jni_build/include
  > CPPFLAGS=-I/tmp/jni_build/include
  > CXXFLAGS=-I/tmp/jni_build/include
  > LDFLAGS=-L/tmp/jni_build/lib
  > PKG_CONFIG_PATH=/tmp/jni_build/lib/pkgconfig
  > --prefix=/tmp/jni_build
  > --with-docs=no
  > --quiet
  > --with-secure-transport
...

So, --with-secure-transport is used, despite libcurl configure help suggests.

Modified (again) bindings/jni/ci_build.sh reset libcurl source tree to commit HEAD is now at 46f11a4 Makefile.am: fix portability issues and builds goes further.

Some modification happend in libcurl since commit :

commit 46f11a4cef48f5ba95f7757e4e4ab96fa43e0444 (HEAD -> master)
Author: Christian Weisgerber via curl-library <curl-library@lists.haxx.se>
Date:   Thu May 19 15:45:07 2022 +0200

    Makefile.am: fix portability issues
    
    Commit a04f0b961333e1a19848d073d8c7db9c20b2a371 made me notice that
    there is a portability issue in curl's top-level Makefile.am.
    
    $< can only be used in rules that deal with .SUFFIXES.  Its use
    for general prerequisites is a GNU make extension.
    
    $< could be replaced by $?, but I think in an autotools context,
    something like this is better:
    
    Bug: https://curl.se/mail/lib-2022-05/0024.html
    Closes #8861

Currently workging to identify the latest working commit.

@stephan57160
Copy link
Contributor Author

First non working libcurl commit:

commit 576e507c78bdd2ec88da442a5354f9dd661b9a8a
Author: Daniel Stenberg <daniel@haxx.se>
Date:   Thu Aug 25 17:29:48 2022 +0200

    configure: if asked to use TLS, fail if no TLS lib was detected
    
    Previously the configure script would just warn about this fact and
    continue with TLS disabled build which is not always helpful. TLS should
    be explicitly disabled if that is what the user wants.
    
    Closes #9367

@stephan57160
Copy link
Contributor Author

Surprisingly, when building ZYRE with zyre/bindings/jni/ci_build.sh, this issue is not seen.

After investigations, one can see that CZMQ dependencies are not built with the same process.
For instance, libcurl, libmicrohttpd, ... are not rebuilt, when building ZYRE.

@stephan57160
Copy link
Contributor Author

This happens when building the native libraries.
Don't know yet what happens when building cross-compiled libraries for Android.
Moreover, I don't know what are the TLS-capable libraries provided by Android SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant