OP-TEE / optee_client

Normal World Client side of the TEE
Other
188 stars 235 forks source link

Android5.1 compile error #108

Closed airbak closed 6 years ago

airbak commented 7 years ago

Hi all, Android5.1 compile error.
Does other Android version work well ?

LOG: Install: out/target/product/Hi3798MV200/system/lib/libteec.so Import includes file: out/target/product/Hi3798MV200/obj/EXECUTABLES/tee-supplicant_intermediates/import_includes target thumb C: tee-supplicant <= device/hisilicon/bigfish/HiSTBSDKV6R2/source/tee/core/optee/optee_client/tee-supplicant/src/handle.c target thumb C: tee-supplicant <= device/hisilicon/bigfish/HiSTBSDKV6R2/source/tee/core/optee/optee_client/tee-supplicant/src/tee_supp_fs.c target thumb C: tee-supplicant <= device/hisilicon/bigfish/HiSTBSDKV6R2/source/tee/core/optee/optee_client/tee-supplicant/src/tee_supplicant.c target thumb C: tee-supplicant <= device/hisilicon/bigfish/HiSTBSDKV6R2/source/tee/core/optee/optee_client/tee-supplicant/src/teec_ta_load.c target thumb C: tee-supplicant <= device/hisilicon/bigfish/HiSTBSDKV6R2/source/tee/core/optee/optee_client/tee-supplicant/src/rpmb.c target thumb C: tee-supplicant <= device/hisilicon/bigfish/HiSTBSDKV6R2/source/tee/core/optee/optee_client/tee-supplicant/src/tee_socket.c device/hisilicon/bigfish/HiSTBSDKV6R2/source/tee/core/optee/optee_client/tee-supplicant/src/tee_socket.c: In function 'sa_set_port': device/hisilicon/bigfish/HiSTBSDKV6R2/source/tee/core/optee/optee_client/tee-supplicant/src/tee_socket.c:551:12: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (slen < sizeof(sain)) ^ device/hisilicon/bigfish/HiSTBSDKV6R2/source/tee/core/optee/optee_client/tee-supplicant/src/tee_socket.c:561:12: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (slen < sizeof(sain6)) ^ device/hisilicon/bigfish/HiSTBSDKV6R2/source/tee/core/optee/optee_client/tee-supplicant/src/tee_socket.c: In function 'sa_get_port': device/hisilicon/bigfish/HiSTBSDKV6R2/source/tee/core/optee/optee_client/tee-supplicant/src/tee_socket.c:577:12: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (slen < sizeof(sain)) ^ device/hisilicon/bigfish/HiSTBSDKV6R2/source/tee/core/optee/optee_client/tee-supplicant/src/tee_socket.c:587:12: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (slen < sizeof(sain6)) ^ cc1: all warnings being treated as errors make: *** [out/target/product/Hi3798MV200/obj/EXECUTABLES/tee-supplicant_intermediates/src/tee_socket.o] Error 1

vchong commented 7 years ago

Our reference build is based on Android 7 (N) which seems to be ok. Is this a 32-bit platform? The simple 'fix' would maybe to try adding -Wno-sign-compare flag to the build or cast the comparison to a compatible type. It would be hard to try to change glibc or bionic to match one or the other.

jbech-linaro commented 6 years ago

I'm closing the ticket, either because it has already been answered or that it is no longer relevant or it could be lack of response from the author. Having that said, feel free to re-open the ticket if you have more to add to the ticket.