Opened 3 months ago

Last modified 7 weeks ago

#70563 assigned defect

py310-grpcio @1.48.4_9 fails to build

Reported by: areilly Owned by: emcrisostomo (Enrico Maria Crisostomo)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: gioGarbe (Giovanni Garberoglio)
Port: grpcio

Description

% sudo port install py310-grpcio
--->  Computing dependencies for py310-grpcio
--->  Fetching archive for py310-grpcio
--->  Attempting to fetch py310-grpcio-1.48.4_9.darwin_23.arm64.tbz2 from https://packages.macports.org/py310-grpcio
--->  Attempting to fetch py310-grpcio-1.48.4_9.darwin_23.arm64.tbz2 from http://mirror.fcix.net/macports/packages/py310-grpcio
--->  Attempting to fetch py310-grpcio-1.48.4_9.darwin_23.arm64.tbz2 from http://jog.id.packages.macports.org/macports/packages/py310-grpcio
--->  Building py310-grpcio
Error: Failed to build py310-grpcio: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_grpc/py310-grpcio/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port py310-grpcio failed

The build fails thusly:

:info:build Error compiling Cython file:
:info:build ------------------------------------------------------------
:info:build ...
:info:build     return 1
:info:build   else:
:info:build     return 0
:info:build cdef grpc_arg_pointer_vtable default_vtable
:info:build default_vtable.copy = &_copy_pointer
:info:build                       ^
:info:build ------------------------------------------------------------
:info:build src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi:34:22: Cannot assign type 'void *(*)(void *) except? NULL' to 'void *(*)(void *) noexcept'. Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Some digging on stackoverflow suggests that grpc requires cython>=0.29.8,<3.0.0rc1 but macports has 3.0.10. I have installed py310-cython-compat @0.29.37, but I can't run it, and the build of grpc does not appear to be able to find it (it installs into /opt/local/lib/py310-cython-compat/ which seems unlike other python installs).

Attachments (1)

main.log (241.8 KB) - added by areilly 3 months ago.
The build log from macports.

Download all attachments as: .zip

Change History (7)

Changed 3 months ago by areilly

Attachment: main.log added

The build log from macports.

comment:1 Changed 3 months ago by jmroot (Joshua Root)

Owner: set to emcrisostomo
Status: newassigned

comment:2 Changed 3 months ago by jmroot (Joshua Root)

In 7bd1695352a7ea3a98e9a85605de5603a616a468/macports-ports (master):

py*-grpcio: build with cython-compat

See: #70563

comment:3 Changed 3 months ago by jmroot (Joshua Root)

Port: grpcio added; py310-grpcio removed
Summary: py310-grpcio 1.48.4_9.darwin_23.arm64: fails to buildpy310-grpcio @1.48.4_9 fails to build

That fixed the cython errors but it's still failing like this:

In file included from src/core/ext/filters/message_size/message_size_filter.cc:19:
In file included from ./src/core/ext/filters/message_size/message_size_filter.h:30:
In file included from ./src/core/lib/channel/channel_args.h:33:
In file included from /opt/local/include/absl/types/optional.h:39:
/opt/local/include/absl/utility/utility.h:82:12: error: no member named 'in_place_t' in namespace 'std'
using std::in_place_t;
      ~~~~~^

Likely needs to be updated to a new upstream version to be compatible with the current abseil.

comment:4 Changed 3 months ago by jmroot (Joshua Root)

Actually that should be standard C++17. The problem is -std=c++14 is being added to the compiler flags for some reason. Updating is likely still the best fix.

comment:5 Changed 3 months ago by jmroot (Joshua Root)

In 026a92d59d275dd756c54bdd3e29b1822c5c6fc2/macports-ports (master):

grpc: try to actually use C++17

See: #70563

comment:6 Changed 7 weeks ago by gioGarbe (Giovanni Garberoglio)

Cc: gioGarbe added
Note: See TracTickets for help on using tickets.