Bug 239379

Summary: devel/protobuf: pthread include fails, breaks net/mosh
Product: Ports & Packages Reporter: Michael Büker <freebsd>
Component: Individual Port(s)Assignee: Kubilay Kocak <koobs>
Status: Closed DUPLICATE    
Severity: Affects Some People CC: sunpoet, zi
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239038

Description Michael Büker 2019-07-22 10:36:40 UTC
The root cause of bug #239038 appears to be that protobuf compilation (no longer?) includes pthread in the way that is needed for net/mosh to function. Compare the error message:

 [libprotobuf FATAL google/protobuf/generated_message_util.cc:809] CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):

to the one reported in https://stackoverflow.com/questions/52890529/fatalexception-thrown-by-protobuf-library-on-instantiation-of-message:

 [libprotobuf FATAL /myproj/protobuf/src/google/protobuf/generated_message_util.cc:785] CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):

In that stackoverflow discussion, the solution is to add "--no-as-needed" before "-pthread" to the linker flags for protobuf.

This suggests that a similar tweak to the protobuf build instructions in FreeBSD ports could also help. I am not sufficiently familiar with ports to try this myself.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-07-30 10:35:35 UTC
Since all the information, analysis and a patch is in bug 239038, which has now been re-triaged and re-assigned to the devel/protobuf maintainer, close this as a dupe

*** This bug has been marked as a duplicate of bug 239038 ***