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

Build optee_examples SHARED_LIBRARIES Error #60

Closed
menghung opened this issue May 27, 2019 · 2 comments
Closed

Build optee_examples SHARED_LIBRARIES Error #60

menghung opened this issue May 27, 2019 · 2 comments
Labels

Comments

@menghung
Copy link

menghung commented May 27, 2019

Hi All

I want to use libteec.so to make SHARED_LIBRARIES
I modify the Android.mk of Helloword like this

LOCAL_PATH := $(call my-dir)

OPTEE_CLIENT_EXPORT = $(LOCAL_PATH)/…/…/optee_client/out/export

include $(CLEAR_VARS)
LOCAL_CFLAGS += -DANDROID_BUILD
LOCAL_CFLAGS += -Wall

LOCAL_SRC_FILES += host/main.c

LOCAL_C_INCLUDES := $(LOCAL_PATH)/ta/include
$(OPTEE_CLIENT_EXPORT)/include \

LOCAL_SHARED_LIBRARIES := libteec
LOCAL_MODULE := optee_example_hello_world
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_TAGS := optional
**include $(BUILD_SHARED_LIBRARY)**    ==> **include $(BUILD_EXECUTABLE) is OK but BUILD_SHARED_LIBRARY is fail**

include $(LOCAL_PATH)/ta/Android.mk

I always get the following error.

ninja: error: ‘**out/target/product/hikey960/obj_arm/lib/libteec.so.toc’**, needed by ‘out/target/product/hikey960/obj_arm/SHARED_LIBRARIES/libmhjni_intermediates/LINKED/libmhjni.so’, missing and no known rule to make it
12:47:18 ninja failed with: exit status 1
@vchong
Copy link

vchong commented May 30, 2019

First you're missing a backslash (\) in your Android.mk

LOCAL_C_INCLUDES := $(LOCAL_PATH)/ta/include \ ==> this one
$(OPTEE_CLIENT_EXPORT)/include \

I changed include $(BUILD_EXECUTABLE) to include $(BUILD_SHARED_LIBRARY) and was able to build without issues.

[ 95% 19/20] Install: out/target/product/hikey/vendor/lib64/optee_example_hello_world.so
[100% 20/20] build out/target/product/hikey/obj/SHARED_LIBRARIES/optee_example_hello_world_intermediates/optee_example_hello_world.so.toc

Ah, have you built libteec.so first? If not, then out/target/product/hikey960/obj_arm/lib/libteec.so.toc is missing, which is required for optee_example_hello_world.so.

@github-actions
Copy link

github-actions bot commented Jul 5, 2020

This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

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

No branches or pull requests

2 participants