-
Notifications
You must be signed in to change notification settings - Fork 74.2k
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
libtensorfow-lite.a linking issue #36689
libtensorfow-lite.a linking issue #36689
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
Could you also remove tensorflow/lite/tools/make/downloads/absl/absl/hash/internal/print_hash_of.cc from CORE_CC_EXCLUDE_SRCS? You can find it on master.
…es for libtensorflow-lite.a By a file dependency game, hashtablez_sampler.cc and flags files include the absl/synchronization/mutex.h file but all files related to absl synchronization are not part of the build and as a result it generates a linking issue while linking the generated libtensorflow-lite.a library into a C/C++ application. It is not obvious that hash and flags files are needed so simply remove them from the list of the build sources. Signed-off-by: Vincent ABRIOU <vincent.abriou@st.com>
…btensorflow-lite.a lite/kernels/rfft2d.cc has reference to rdft2d. As a consequence, libtensorflow-lite.a need to include fft2d/fftsg2d.c source in its build. If fftsg2d.c is not part of libtensorflow-lite.a, a C/C++ application that use the libtensorflow-lite.a static library is not able to link with the following error: rfft2d.cc:(.text+0x594): undefined reference to `rdft2d' Signed-off-by: Vincent ABRIOU <vincent.abriou@st.com>
951a77a
to
83d0eb1
Compare
Patches updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PiperOrigin-RevId: 295078069 Change-Id: Idbd7b6a45253d7e9d7ee34ab44e1d8513a982f38
@terryheo Can it be backported to r1.15 ? |
@apivovarov could you share which script is failing on r1.15? |
If you app uses whole
We need whole archive because app fails at runtime if we do no use the whole archive. |
confirmed. I'll work no it. |
As a result linking user's program with tflite archive results in
The issue was fixed in r2.2 (should it be backported to r2.1?) fix for another fix for |
I've created PR #39773 for r2.1 branch |
This pull request fix issues encounter while linking the generated libtensorflow-lite.a into a C/C++ application.
Multiple symbols where not defined such as:
absl/hash and absl/flags that where referencing absl/synchronization have been removed from the build and fft2d/fftsg2d.c has been added to the build.
This has been successfully tested against the STM32MP1 OpenSTLinux distribution.
BR
Vincent