Re: libupb.a needed by anything using protobuf .cmake files
| Newsgroups | gmane.linux.lfs.beyond.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 2025-05-23 at 23:20 +0200, Pierre Labastie wrote: > /usr/lib/cmake/protobuf/protobuf-targets.cmake contains: > ----- > add_library(protobuf::libupb STATIC IMPORTED) > ----- > So if we remove libupb.a as done in protobuf instructions (since > protobuf-31), any CMakeLists.txt using this file will fail with: > ---------- > CMake Error at /usr/lib/cmake/protobuf/protobuf-targets.cmake:132 > (message): > The imported target "protobuf::libupb" references the file > > "/usr/lib/libupb.a" > > but this file does not exist. Possible reasons include: > > * The file was deleted, renamed, or moved to another location. > > * An install or uninstall procedure did not complete successfully. > > * The installation package was faulty and contained > > "/usr/lib/cmake/protobuf/protobuf-targets.cmake" > > but not all the files it references. > ----------- > So I think we should remove the line "rm /usr/lib/libupb.a" when > installing protobuf. libupb.a is about 520KB in size... The problem here is not to save space. It's just it shouldn't be installed even per upstream documentation (https://github.com/protocolbuffers/protobuf/blob/main/upb/README.md): While upb offers a C API, the C API & ABI are not stable. For this reason, upb is not generally offered as a C library for direct consumption, and there are no releases. I'll try to figure out a way to prevent it from being installed. -- Xi Ruoyao <[email protected]> School of Aerospace Science and Technology, Xidian University -- http://lists.linuxfromscratch.org/sympa/info/blfs-dev Unsubscribe: See the above information page