Ports still using protobuf-cpp

Perry E. Metzger pmetzger at macports.org
Thu Apr 26 16:53:14 UTC 2018


On Thu, 26 Apr 2018 09:18:47 -0700 Ken Cunningham
<ken.cunningham.webuse at gmail.com> wrote:
> On 10.6.8, this has broken all the ports that used protobuf-cpp, as
> predicted, due to the thread_local thing.

Ah, I'd misinterpreted. I thought in the "mosh" discussion that you
had said you now had a fix for this stuff:

https://github.com/macports/macports-ports/pull/690#issuecomment-361076904

I thought that meant this could now be migrated. Apologies if that's
not been the case.

> Normal ports can be fixed up by adding this (eg mosh):
> 
> # force protobuf3-cpp into the no_threadlocal mode
> if { ${os.platform} eq "darwin" && ${os.major} < 11 } {
>     configure.cppflags-append -DGOOGLE_PROTOBUF_NO_THREADLOCAL
> }

Would you be willing to put in pull requests for these?

> For some, like those that use qt4, (ostinato) it's more messy,
> because qt ignores all the normal stuff you might try to do like
> that.
> 
> In the end, I just added the following to 
> 
> /opt/local/include/google/protobuf/stubs/common.h
> 
> #ifndef GOOGLE_PROTOBUF_NO_THREADLOCAL
> #define GOOGLE_PROTOBUF_NO_THREADLOCAL 1
> #endif
> 
> 
> and so far, that fixes all the ports for me.
> 
> But it's not a fix I'm prepared to suggest in a Portfile just yet.

Understood.

Perry
-- 
Perry E. Metzger		pmetzger at macports.org


More information about the macports-dev mailing list