Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 586684

Summary: dev-libs/protobuf should be slotted
Product: Gentoo Linux Reporter: Michał 'Khorne' Rzechonek <michal>
Component: Current packagesAssignee: SpanKY <vapier>
Status: RESOLVED INVALID    
Severity: normal CC: tomboy64
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Michał 'Khorne' Rzechonek 2016-06-22 09:26:19 UTC
Protobuf 3.0 series breaks API. From Google's release notes:

However, we do not generally recommend that existing users migrate from proto2 from proto3 due to API incompatibility, and we will continue to support proto2 for a long
time.

Reproducible: Always




I work around that issue by maskig >=dev-libs/protobuf-3.0
Comment 1 M. B. 2016-06-24 01:04:11 UTC
That's what the subslots are for. Slot /10 is the API version for 3.0.
Please file a bug against the reverse dependencies.
Comment 2 SpanKY gentoo-dev 2016-06-24 01:26:20 UTC
(In reply to M. B. from comment #1)

not really.  if the API is incompatible, then merely subslotting everything won't fix the reverse deps.
Comment 3 M. B. 2016-06-24 04:51:16 UTC
Maybe I expressed myself too briefly.

The API changed from 2 to 3. protoc, the main binary translating .proto files, supports both version 2 as well as version 3 of the protobuf specification, as the OP's quote from Google asserts.

However, there's libprotoc.so, which can be linked against. That .so is at version 10 with protobuf 3. In the tree are also versions with .so 8 and .so 9. I'm not exactly sure what the reporter's issue is, as his report is lacking details, but claiming that slotting is necessary because protobuf 3 isn't supporting protobuf 2 is simply not true, as far as protoc is concerned. The provided quote only concerns users, e.g. programmers using the protobuf specification. As the API is indeed incompatible.
Comment 4 Michał 'Khorne' Rzechonek 2016-06-24 09:02:29 UTC
Hi,

First of all, thanks for looking into it and sorry about not providing more details.

Thing is, as far as I know, even if protoc does indeed compile .proto files in version 2, the generated code has a different API and projects using it won't build anymore.

Google's "support" means that series 2.x will receive updates, not that new version will have full backward compatibility.

If I understand correctly, this means that I need to have both versions installed, like python2 and python3 -> hence the request for slotting. Note that this also covers installed headers and possibly libraries (not sure about the ABI, I would guess it's not compatible either).

Also, yes, I'm a programmer and the issue is about working on projects using protobuf on a Gentoo system.
Comment 5 Michał 'Khorne' Rzechonek 2016-06-24 13:04:22 UTC
Ok, turns out I was talking out of my ass.

M.B. was right to close this as INVALID. Sorry.