Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#56534 closed defect (fixed)

py-protobuf, py-protobuf3: builds extension in destroot phase

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: tobypeterson
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: kencu (Ken), mascguy (Christopher Nielsen)
Port: py-protobuf py-protobuf3

Description

Why do py-protobuf and py-protobuf3 build the extension in the destroot and test phases? Why don't they do that in the build phase?

Change History (8)

comment:1 Changed 5 years ago by mf2k (Frank Schima)

Owner: blair deleted
Port: py-protobuf, py-protobuf3py-protobuf py-protobuf3

comment:2 Changed 4 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:3 Changed 4 years ago by mascguy (Christopher Nielsen)

Just noticed this peculiarity too, while investigating install failures for py-protobuf3:

/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

I suppose these failures are worthy of another ticket...?

comment:4 Changed 4 years ago by mascguy (Christopher Nielsen)

Regardless, should this ticket be assigned to the port maintainer, @tobypeterson?

comment:5 Changed 4 years ago by mf2k (Frank Schima)

Owner: set to tobypeterson

comment:6 Changed 4 years ago by tobypeterson

Assume it's related to the use of --cpp_implementation - no idea why it does that.

comment:7 Changed 4 years ago by tobypeterson

Resolution: fixed
Status: assignedclosed

In 3cf0faaa6dad8738dde272416445eff62a096498/macports-ports (master):

py-protobuf3: build the cpp extension during the build phase; fixes #56534

comment:8 Changed 4 years ago by tobypeterson

Now also passing --cpp_implementation during build. It's still needed during other phases to ensure that the built C++ extension is actually installed/tested.

Note: See TracTickets for help on using tickets.