TimothyGu / libilbc

Packaged version of iLBC codec from the WebRTC project
BSD 3-Clause "New" or "Revised" License
64 stars 49 forks source link

Missing symbol from the shared library #32

Closed dbermond closed 3 years ago

dbermond commented 3 years ago

The symbol WebRtcIlbcfix_InitDecode is missed from the shared library. The following command produces no output:

$ nm -D libilbc.so | grep 'WebRtcIlbcfix_InitDecode'

As a result, applications that uses this function and tries to link against libilbc.so fails to build. For example, FFmpeg is showing me this error:

/usr/bin/ld: /tmp/ffconf.mxjpOf0E/test.o: in function `check_WebRtcIlbcfix_InitDecode':
test.c:(.text+0x3): undefined reference to `WebRtcIlbcfix_InitDecode'
collect2: error: ld returned 1 exit status
ERROR: libilbc not found

This can be fixed by the following modification, but I'm not sure if it would be desirable for the project. Probably there could be a better solution.

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,7 +44,6 @@ if(NOT CMAKE_BUILD_TYPE)
     set(CMAKE_BUILD_TYPE Release)
 endif()

-set(CMAKE_C_VISIBILITY_PRESET hidden)
 set(CMAKE_CXX_VISIBILITY_PRESET hidden)
 set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
TimothyGu commented 3 years ago

Darn, I fixed this for init_encode but not init_decode…

dbermond commented 3 years ago

Thank you for fixing this! Working fine now :)