google / android-auto-companion-ios

Apache License 2.0
14 stars 5 forks source link

Missing libprotobuf & libprotoc #5

Open Claes34 opened 2 months ago

Claes34 commented 2 months ago

Hello !

This may be due to outdated documentation or updates to protobuf, but I ran into errors while compiling the package. The plugin would not generate source files using the protobuf files :

/usr/local/bin/../lib/libprotobuf.27.3.0.dylib' (no such file)
/usr/local/bin/../lib/libprotoc.27.3.0.dylib' (no such file)

Maybe I missed something that would not require the following but: as a workaround, since the documentation suggests using a symbolic link for the binary protoc, I figured I may had to create symbolic links for the dylib files as well :

sudo ln /opt/homebrew/opt/protobuf@27/lib/libprotobuf.27.3.0.dylib /usr/local/lib
sudo ln /opt/homebrew/opt/protobuf@27/lib/libprotoc.27.3.0.dylib /usr/local/lib

This is probably not optimal (version in symbolic link), do you know a better fix for this ?

tapsns commented 2 months ago

Hi,

I'm not reproducing the issue you are seeing.

I confirmed that I don't have any symbolic links to the libraries. I only have symbolic links to the protoc and protoc-gen-swift executables. For evaluation, I upgraded my homebrew projects and confirmed that libprotoc is at version 27.3.

I then did a clean build of the Companion SDK AndroidAutoConnectedDeviceManager target with Xcode and it built without errors. I confirmed that the plugin generated the swift files for the corresponding proto files.

I'm not sure what's causing the issue you are seeing, but maybe it's specific to your homebrew configuration since it sounds like the protoc binary can't find the libraries on which it depends. Maybe doing a clean install of homebrew might fix the issue?

Claes34 commented 2 months ago

Hi ! Thank you for trying to reproduce the issue. It's probably my homebrew configuration as you mentioned, i'll try on another mac tomorrow. If it works, I'll check for differences in configurations to help me find the solution ;)