google / google/conscrypt

Compiler error

Open
#1,039 1 comment 0 reactions 1 assignee Claimed by @hliao View on GitHub
Dominant language
Java
Stars
1.4k
Forks
326
Avg merge
16h 22m
Merged PRs (30d)
17

Description

I followed the compiled guide and get some compiling error with boring ssl missing some function.

[207/301] Building CXX object CMakeFiles/conscrypt_jni.dir/Users/xxxxxxxx/Code/conscrypt/common/src/jni/main/cpp/conscrypt/native_crypto.cc.o
FAILED: CMakeFiles/conscrypt_jni.dir/Users/xxxxxxxx/Code/conscrypt/common/src/jni/main/cpp/conscrypt/native_crypto.cc.o
/Users/xxxxxxxx/Library/Android/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=armv7-none-linux-androideabi16 --gcc-toolchain=/Users/xxxxxxxx/Library/Android/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/xxxxxxxx/Library/Android/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DANDROID -DBORINGSSL_IMPLEMENTATION -DBORINGSSL_SHARED_LIBRARY -DOPENSSL_SMALL -D_XOPEN_SOURCE=700 -Dconscrypt_jni_EXPORTS -I../../../../../common/src/jni/main/include -I../../../../../common/src/jni/unbundled/include -I/Users/xxxxxxxx/Code/boringssl/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -O0 -fno-limit-debug-info -fPIC -fvisibility=hidden -Wno-unused-parameter -Wno-tautological-constant-compare -Wtautological-constant-out-of-range-compare -MD -MT CMakeFiles/conscrypt_jni.dir/Users/xxxxxxxx/Code/conscrypt/common/src/jni/main/cpp/conscrypt/native_crypto.cc.o -MF CMakeFiles/conscrypt_jni.dir/Users/xxxxxxxx/Code/conscrypt/common/src/jni/main/cpp/conscrypt/native_crypto.cc.o.d -o CMakeFiles/conscrypt_jni.dir/Users/xxxxxxxx/Code/conscrypt/common/src/jni/main/cpp/conscrypt/native_crypto.cc.o -c /Users/xxxxxxxx/Code/conscrypt/common/src/jni/main/cpp/conscrypt/native_crypto.cc
/Users/xxxxxxxx/Code/conscrypt/common/src/jni/main/cpp/conscrypt/native_crypto.cc:4851:12: error: no matching function for call to 'ASN1ToByteArray'
return ASN1ToByteArray(env, param.get(), i2d_ASN1_TYPE);
^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/xxxxxxxx/Code/conscrypt/common/src/jni/main/cpp/conscrypt/native_crypto.cc:289:12: note: candidate function template not viable: no known conversion from 'int (const ASN1_TYPE *, uint8_t **)' (aka 'int (const asn1_type_st *, unsigned char **)') to 'int (*)(asn1_type_st *, unsigned char **)' for 3rd argument
jbyteArray ASN1ToByteArray(JNIEnv* env, T* obj, int (*i2d_func)(T*, unsigned char**)) {
^
/Users/xxxxxxxx/Code/conscrypt/common/src/jni/main/cpp/conscrypt/native_crypto.cc:4948:12: error: no matching function for call to 'ASN1ToByteArray'
return ASN1ToByteArray(env, X509_EXTENSION_get_data(ext),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/xxxxxxxx/Code/conscrypt/common/src/jni/main/cpp/conscrypt/native_crypto.cc:289:12: note: candidate function template not viable: no known conversion from 'int (const ASN1_OCTET_STRING *, uint8_t **)' (aka 'int (const asn1_string_st *, unsigned char **)') to 'int (*)(asn1_string_st *, unsigned char **)' for 3rd argument
jbyteArray ASN1ToByteArray(JNIEnv* env, T* obj, int (*i2d_func)(T*, unsigned char**)) {
^
2 errors generated.
[208/301] Building C object boringssl/crypto/CMakeFiles/crypto.dir/x509/x509rset.c.o
[209/301] Building C object boringssl/crypto/CMakeFiles/crypto.dir/x509/x509spki.c.o
[210/301] Building C object boringssl/crypto/CMakeFiles/crypto.dir/x509/x509_vpm.c.o
[211/301] Building C object boringssl/crypto/CMakeFiles/crypto.dir/x509/x_algor.c.o
[212/301] Building C object boringssl/crypto/CMakeFiles/crypto.dir/x509/x_attrib.c.o
[213/301] Building C object boringssl/crypto/CMakeFiles/crypto.dir/x509/x_all.c.o
[214/301] Building C object boringssl/crypto/CMakeFiles/crypto.dir/x509/x509_vfy.c.o
ninja: build stopped: subcommand failed.

I think it maybe caused by different boring ssl version, please help make it clear.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.