Static library with libvideo-ipc

Hello,

I want to pass a library to static, so i add this line :

LOCAL_FORCE_STATIC := 1

but when I want to build it I get this error:

/home/champion/airsdk/sdk/pc/usr/lib/libvideo-ipc.a(client.c.o): in function `set_output_ts':
/data/jenkins/jobs/anafi2-airsdk-release/workspace/packages/libvideo-ipc/src/client.c:36: undefined reference to `time_get_monotonic'
/usr/bin/ld: /data/jenkins/jobs/anafi2-airsdk-release/workspace/packages/libvideo-ipc/src/client.c:37: undefined reference to `time_timespec_to_ns'
/usr/bin/ld: /data/jenkins/jobs/anafi2-airsdk-release/workspace/packages/libvideo-ipc/src/client.c:36: undefined reference to `time_get_monotonic'
/usr/bin/ld: /data/jenkins/jobs/anafi2-airsdk-release/workspace/packages/libvideo-ipc/src/client.c:37: undefined reference to `time_timespec_to_ns'
collect2: error: ld returned 1 exit status

how can i fix it ?

Best,
Thomas

Hi,

Is your goal to have an executable with all your additional libraries as static (to have a single big file) or to link with the builtin libraries of the sdk as static ?

Linking with the sdk lib as static is actually not desirable/possible (private dependencies are not available). However it seems the generated sdk still propose some .a that confuse the build system if LOCAL_FORCE_STATIC is given. That something we need to address in our side though.

If its one of your library that you want to build as static use BUILD_STATIC_LIBRARY instead of BUILD_LIBRARY in the atom.mk.

You could also keep the LOCAL_FORCE_STATIC and add libfutils as dependencies. It way work but I can not guarantee it.

The solution for me was to use BUILD_STATIC_LIBRARY.

Thank you for your answer.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.