Bug 212973

Summary: devel/protobuf: Upgrade to 3.1.0
Product: Ports & Packages Reporter: clutton
Component: Individual Port(s)Assignee: Po-Chuan Hsieh <sunpoet>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: ejbevenour, pi, sunpoet, tomek
Priority: --- Keywords: patch, patch-ready
Version: LatestFlags: pi: maintainer-feedback+
Hardware: Any   
OS: Any   
Attachments:
Description Flags
git diff .
none
patch to make ostinato work with protobuf 3.1.0
none
patch to make zbackup work with protobuf 3.1.0 none

Description clutton 2016-09-24 19:21:52 UTC
Created attachment 175138 [details]
git diff .

Apparently it's simply a version bump. I needed it for chromium.
Are there any ports which would brake with 3rd version?
Comment 1 Kurt Jaeger freebsd_committer freebsd_triage 2016-09-27 15:59:20 UTC
I searched for dependent ports using

grep -Rl 'devel/protobuf' * > /tmp/file

and reduced it by the depends that aren't exactly protobuf. Using
that way, I found 33 other ports. It needs to be checked if they
still build with the new protobuf and probably if they run, too.

I assume there are many indirect dependencies, so other ports might
be affected as well. It's not a trivial task.
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2016-09-27 19:47:06 UTC
There's already 3.1.0 out there, btw.
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2016-09-27 20:10:01 UTC
The 3.0.0-alpha1 relnotes say:

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.

So maybe add this as devel/protobuf3 ?
Comment 4 clutton 2016-09-28 05:28:01 UTC
(In reply to Kurt Jaeger from comment #2)

Or instead create devel/protobuf2, depends on what is common practice now.

Indeed, figuring out would be not a simple task. My encounter with protobuf was 3rd version. May be someone more experienced could answer how much are those two are incompatible, and which one in use ( is it a ruby way: everyone use new things, or is it a python way :D)
Comment 5 E.J. Bevenour 2016-10-11 20:52:18 UTC
Here is a list of ports that depend on protobuf.
https://www.freshports.org/search.php?stype=depends_all&method=match&query=protobuf&num=500&orderby=category&orderbyupdown=asc&search=Search&format=plaintext
I had compiled all these ports againt protobuf 3.0.0 and found that two ports do not build sysutils/zbackup and net/ostinato. There is a puul request in for fixing this issue in sysutils/zbackup. I have submitted a bug to up ostinato, and waiting for a response as of the time of replying. I will be going through and testing the application I have listed above to see if they still work.
Comment 6 E.J. Bevenour 2016-10-12 01:11:03 UTC
Created attachment 175642 [details]
patch to make ostinato work with protobuf 3.1.0
Comment 7 E.J. Bevenour 2016-10-12 17:06:20 UTC
Created attachment 175672 [details]
patch to make zbackup work with protobuf 3.1.0
Comment 8 E.J. Bevenour 2016-10-12 17:08:22 UTC
As of right now The best way to move forward is to move to protobuf 3.1.0
Comment 9 Kurt Jaeger freebsd_committer freebsd_triage 2016-10-12 19:30:40 UTC
testbuilds@work
Comment 10 Kurt Jaeger freebsd_committer freebsd_triage 2016-10-13 05:19:20 UTC
Hmm, 3.1.0 fails to build on 9.3a ? Any ideas ?
Comment 11 E.J. Bevenour 2016-10-13 14:31:17 UTC
(In reply to Kurt Jaeger from comment #10)
gcc48 is needed to compile.
and 
running
"env LD_LIBRARY_PATH='/usr/local/lib/gcc48' CC=gcc48 CXX=g++48 ./configure"
properly configures gcc48 to use its library.
I have tried to add the above command to the Makefile and could not get it to work.
Comment 12 E.J. Bevenour 2016-10-13 14:43:47 UTC
env LD_LIBRARY_PATH='/usr/local/lib/gcc48' CC=gcc48 CXX=g++48 make is also needed
Comment 13 E.J. Bevenour 2016-10-13 15:44:32 UTC
comment #12 and comment #11 cause issues with compiling other ports on FreeBSD 9.3 that depend on protobuf 3.1.0.
For FreeBSD 9.3 protobuf 3.1.0 should be compile with clang38.
this can be accomplished by adding

.if ${OSVERSION} >= 903000 && ${OSVERSION} < 1000000
CONFIGURE_ENV+= CC='clang38' \
CXX='clang++38'
.endif

to the Makefile.
Comment 14 Kurt Jaeger freebsd_committer freebsd_triage 2016-10-14 05:41:58 UTC
testbuilding with USES=compiler:c++14-lang @work
Comment 15 Kurt Jaeger freebsd_committer freebsd_triage 2016-10-14 17:58:49 UTC
testbuilding the depends:

astro/libosmpbf
astro/osmium
astro/merkaartor
audio/clementine-player
audio/mumble
audio/murmur
audio/mixxx
devel/pinba_engine
devel/php5-pinba
devel/tesla
devel/py-protobuf
devel/goprotobuf
dns/powerdns
games/cockatrice
games/pokerth
games/pink-pony
japanese/mozc-server
net/spoofer
net/mosh
net-im/ricochet
net-p2p/zetacoin
net-p2p/bitcoin
net-p2p/litecoin
net-p2p/dogecoin
net-p2p/namecoin
security/certificate-transparency
Comment 16 Kurt Jaeger freebsd_committer freebsd_triage 2016-10-15 08:41:10 UTC
Some failed builds on 9.3a, because of 9.3a:

93a:
[03:20:10] ====>> Failed ports: devel/objecthash:build dns/powerdns:build games/
pokerth:build net-im/ricochet:build games/pink-pony:build audio/mixxx:build net/
mosh:build astro/libosmpbf:build net-p2p/litecoin:build audio/mumble:build devel
/tesla:build
[03:20:10] ====>> Skipped ports: security/certificate-transparency
Comment 17 Po-Chuan Hsieh freebsd_committer freebsd_triage 2016-11-05 09:37:12 UTC
I prefer updating devel/protobuf to 3.1 and keep 2.x as devel/protobuf2 if necessary.
Comment 18 Tomasz "CeDeROM" CEDRO 2016-11-30 17:35:30 UTC
Here is another request and port package for protobuf3. No difference for me at the moment if we make 3.1.0 a protobuf or protobuf3. Maybe keeping the protobuf up to date and legacy protobuf2 is a good idea :-)

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214957
Comment 19 Jan Beich freebsd_committer freebsd_triage 2016-12-16 17:29:18 UTC
devel/protobuf is 3.1.0 since ports r428581. Are the patches here still relevant?