[MacPorts] #62158: py-protobuf3: install failures for macOS 10.8 through 10.11: compilation error related to PROTOBUF_MAYBE_CONSTEXPR MapFieldBase(ConstantInitialized) (was: py-protobuf3: install failures for macOS 10.10 and 10.11: compilation error related to PROTOBUF_MAYBE_CONSTEXPR MapFieldBase(ConstantInitialized))

MacPorts noreply at macports.org
Wed Jan 27 00:05:17 UTC 2021


#62158: py-protobuf3: install failures for macOS 10.8 through 10.11: compilation
error related to PROTOBUF_MAYBE_CONSTEXPR MapFieldBase(ConstantInitialized)
---------------------------+--------------------------
  Reporter:  mascguy       |      Owner:  tobypeterson
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:
Resolution:                |   Keywords:
      Port:  py-protobuf3  |
---------------------------+--------------------------
Description changed by mascguy:

Old description:

> It looks like this port is failing to install for some macOS releases,
> blocking builds for a fair number of downstream ports:
>
> {{{
> /usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-
> common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch x86_64
> -isysroot/ -I. -I../src
> -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9
> -c google/protobuf/pyext/map_container.cc -o
> build/temp.macosx-10.10-x86_64-3.9/google/protobuf/pyext/map_container.o
> -Wno-write-strings -Wno-invalid-offsetof -Wno-sign-compare -Wno-unused-
> variable -std=c++11 -Wno-shorten-64-to-32 -Wno-deprecated-register
> -stdlib=libc++  -Wno-shorten-64-to-32
> In file included from google/protobuf/pyext/map_container.cc:39:
> ../src/google/protobuf/map_field.h:332:37: error: constexpr constructor
> never produces a constant expression [-Winvalid-constexpr]
>   explicit PROTOBUF_MAYBE_CONSTEXPR MapFieldBase(ConstantInitialized)
>                                     ^
> ../src/google/protobuf/map_field.h:335:9: note: non-literal type
> 'internal::WrappedMutex' cannot be used in a constant expression
>         mutex_(GOOGLE_PROTOBUF_LINKER_INITIALIZED),
>         ^
> 1 error generated.
> error: command '/usr/bin/clang' failed with exit code 1
> Command failed:  cd "/opt/local/var/macports/build
> /_opt_bblocal_var_buildworker_ports_build_ports_python_py-
> protobuf3/py39-protobuf3/work/protobuf-3.14.0/python" &&
> /opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9
> setup.py --no-user-cfg --cpp_implementation install
> --prefix=/opt/local/Library/Frameworks/Python.framework/Versions/3.9
> --root=/opt/local/var/macports/build
> /_opt_bblocal_var_buildworker_ports_build_ports_python_py-
> protobuf3/py39-protobuf3/work/destroot
> Exit code: 1
> Error: Failed to destroot py39-protobuf3: command execution failed
> }}}
>
> Ignore the fact that this port is compiling code during phase `destroot`,
> as that's covered by issue:56534.
>
> These specific failures are occurring on macOS 10.10 and 10.11. Different
> compilation errors are occurring on macOS 10.8 and 10.9, which will be
> covered by a separate ticket.

New description:

 It looks like this port is failing to install for some macOS releases,
 blocking builds for a fair number of downstream ports:

 {{{
 /usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-
 common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch x86_64
 -isysroot/ -I. -I../src
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9
 -c google/protobuf/pyext/map_container.cc -o
 build/temp.macosx-10.10-x86_64-3.9/google/protobuf/pyext/map_container.o
 -Wno-write-strings -Wno-invalid-offsetof -Wno-sign-compare -Wno-unused-
 variable -std=c++11 -Wno-shorten-64-to-32 -Wno-deprecated-register
 -stdlib=libc++  -Wno-shorten-64-to-32
 In file included from google/protobuf/pyext/map_container.cc:39:
 ../src/google/protobuf/map_field.h:332:37: error: constexpr constructor
 never produces a constant expression [-Winvalid-constexpr]
   explicit PROTOBUF_MAYBE_CONSTEXPR MapFieldBase(ConstantInitialized)
                                     ^
 ../src/google/protobuf/map_field.h:335:9: note: non-literal type
 'internal::WrappedMutex' cannot be used in a constant expression
         mutex_(GOOGLE_PROTOBUF_LINKER_INITIALIZED),
         ^
 1 error generated.
 error: command '/usr/bin/clang' failed with exit code 1
 Command failed:  cd "/opt/local/var/macports/build
 /_opt_bblocal_var_buildworker_ports_build_ports_python_py-
 protobuf3/py39-protobuf3/work/protobuf-3.14.0/python" &&
 /opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9
 setup.py --no-user-cfg --cpp_implementation install
 --prefix=/opt/local/Library/Frameworks/Python.framework/Versions/3.9
 --root=/opt/local/var/macports/build
 /_opt_bblocal_var_buildworker_ports_build_ports_python_py-
 protobuf3/py39-protobuf3/work/destroot
 Exit code: 1
 Error: Failed to destroot py39-protobuf3: command execution failed
 }}}

 Ignore the fact that this port is compiling code during phase `destroot`,
 as that's covered by issue:56534.

 These specific failures are occurring on macOS 10.8, 10.9, 10.10, and
 10.11.

--

-- 
Ticket URL: <https://trac.macports.org/ticket/62158#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list