google / lyra

A Very Low-Bitrate Codec for Speech Compression
Apache License 2.0
3.8k stars 354 forks source link

Linux build #121

Open praveen-kd-23 opened 1 year ago

praveen-kd-23 commented 1 year ago

Hi , We are trying to integrate Lyra into our webrtc server running on linux and compiled using Make .

I have tried to generate linux build by using the below command

bazel build --enable_platform_specific_config lyra:lyra_encoder

But it generates only .so and .a files in bazel-bin folder . How to generate include folders too ?

Also i tried to add include files in a separate folder and linked liblyraencoder.so and other liblyra*.so files , but it throws undefined reference error in absl,glog libraries .

How to get a single lyra.so file with all other libraries linked ( Like a output from cmake/make)?

mchinen commented 1 year ago

Thanks for mentioning this. I believe your question is about exporting the headers/.so for external usage. Indeed the headers are not packaged for external use. The headers are referenced in the BUILD file, but that just makes them visible to bazel targets.

If you intend to build outside of bazel, I think you'll have to manually copy the headers for the interfaces that you are interested in. Alternatively, make a bazel target to write a C library that wraps your desired functionality as in the android NDK example to get around C++ ABI issues and use that externally.