UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. 4javier
    3. Posts
    4
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 2
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by 4javier

    • Unreferenced function even if it's in a linked library

      Hi guys.
      I'm blocked with this error:

      target StaticExecutable: sdcard (/home/Ubuntu/javier/dati/download/part-tree/out/target/product/y991/obj/EXECUTABLES/sdcard_intermediates/LINKED/sdcard)
      /home/Ubuntu/javier/dati/download/part-tree/out/target/product/y991/obj/STATIC_LIBRARIES/liblogwrap_intermediates/liblogwrap.a(logwrap.o): In function `do_log_line':
      /home/Ubuntu/javier/dati/download/part-tree/system/core/logwrapper/logwrap.c:160: undefined reference to `klog_write'
      /home/Ubuntu/javier/dati/download/part-tree/system/core/logwrapper/logwrap.c:160: undefined reference to `klog_write'
      /home/Ubuntu/javier/dati/download/part-tree/system/core/logwrapper/logwrap.c:160: undefined reference to `klog_write'
      /home/Ubuntu/javier/dati/download/part-tree/system/core/logwrapper/logwrap.c:160: undefined reference to `klog_write'
      collect2: error: ld returned 1 exit status
      make: *** [/home/Ubuntu/javier/dati/download/part-tree/out/target/product/y991/obj/EXECUTABLES/sdcard_intermediates/LINKED/sdcard] Error 1
      

      This is the interesting part of the Android.mk for liblogwrap

      LOCAL_PATH:= $(call my-dir)
      
      include $(CLEAR_VARS)
      
      # ========================================================
      # Static library
      # ========================================================
      include $(CLEAR_VARS)
      LOCAL_MODULE := liblogwrap
      LOCAL_SRC_FILES := logwrap.c
      LOCAL_SHARED_LIBRARIES := libcutils liblog
      LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
      LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
      LOCAL_CFLAGS := -Werror
      include $(BUILD_STATIC_LIBRARY)
      

      This is the grep matching the function not found inside ./target/product/y991/obj/SHARED_LIBRARIES/libcutils_intermediates/LINKED/libcutils.so

      nm -C ./target/product/y991/obj/SHARED_LIBRARIES/libcutils_intermediates/LINKED/libcutils.so | grep klog_write
      000000000000a504 T klog_write
      

      Why it can't find that?

      posted in General
      4
      4javier
    • Shrink vendor/ dir for porting to new device

      Hi all.
      I'm trying to port the AOSP tree I re-generated for my device (it builds, boots and and works 99%) to Ubuntu Touch. It's a tree customized by mediatek and at the moment I'm facing the problem that my ubuntu sources try to build some subdirs of vendor/ which need java. I think this isn't normal, and I would to know which part of vendor should I avoid to port (like vendor/mediatek/proprietary/package, maybe?) and what's he correct way to chieve that. I think it should be sufficient to delete the dirs, because usually they are sourced by a simple
      (call first-makefiles-under, $(LOCAL_PATH)
      in their parent directory.

      posted in General new device porting mediatek
      4
      4javier