Opened 10 months ago

Closed 3 months ago

#69262 closed defect (fixed)

py310-grpcio @1.48.4: ERROR Source build is not a directory

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: emcrisostomo (Enrico Maria Crisostomo)
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: Cc: mascguy (Christopher Nielsen), FlyingSamson
Port: py310-grpcio

Description

https://build.macports.org/builders/ports-10.14_x86_64-builder/builds/195277/steps/install-port/logs/stdio

Executing:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_grpc/py310-grpcio/work/grpc-1.48.4" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 -m build --no-isolation build 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_grpc/py310-grpcio/work/grpc-1.48.4" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 -m build --no-isolation build 
ERROR Source build is not a directory
Command failed:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_grpc/py310-grpcio/work/grpc-1.48.4" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 -m build --no-isolation build 
Exit code: 1

Change History (8)

comment:1 Changed 8 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:2 Changed 6 months ago by dragos-bth (Dragos Ilie)

Having the same issue:

:debug:build MACOSX_DEPLOYMENT_TARGET='14.0'
:debug:build MACPORTS_LEGACY_SUPPORT_DISABLED='1'
:debug:build OBJC='/usr/bin/clang'
:debug:build OBJCFLAGS='-arch arm64 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk'
:debug:build SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk'
:info:build Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_grpc/py310-grpcio/work/grpc-1.48.4" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 -m build --no-isolation build 
:debug:build system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_grpc/py310-grpcio/work/grpc-1.48.4" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 -m build --no-isolation build 
:info:build ERROR Source build is not a directory
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_grpc/py310-grpcio/work/grpc-1.48.4" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 -m build --no-isolation build 
:info:build Exit code: 1
:error:build Failed to build py310-grpcio: command execution failed
:debug:build Error code: CHILDSTATUS 94947 1
Last edited 6 months ago by dragos-bth (Dragos Ilie) (previous) (diff)

comment:3 Changed 6 months ago by FlyingSamson

I can also confirm this. I had a look into the work/grpc-1.48.4 and indeed there is no build folder to be found in there. I then tried removing the build.target build line from the portfile. This seems to solve this problem, leaving me with a classic "How did that ever work" feeling. However, unfortunately a little further down the line all hell breaks loose with multiple errors such as

: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 *(*)(vo
id *) noexcept'. Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

This is most likely due to a too new cython version being used during the build step (see also this SO thread). The cython version required by grpc also changed recently in version 1.63 from pre 3.0.0 to at least 3.0.0. The "easiest" solution might be to update grpc to a more recent version.

comment:4 in reply to:  3 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to FlyingSamson:

leaving me with a classic "How did that ever work" feeling.

It got broken when the python portgroup's default value of python.pep517 changed from no to yes for python versions 3.7–3.10 last year. The fix for that would be simply:

  • devel/grpc/Portfile

    diff --git a/devel/grpc/Portfile b/devel/grpc/Portfile
    index 52d989224e4..cf5969e22e6 100644
    a b if {[string match "py*" ${subport}]} { 
    234234                    GRPC_PYTHON_BUILD_WITH_CYTHON=1
    235235    }
    236236
     237    python.pep517   no
     238
    237239    # Build instructions:
    238240    # https://github.com/grpc/grpc/tree/master/src/python/grpcio#installing-from-source
    239241

But I expect you're right that it also needs to be updated to build with cython 3. Subports for python 3.11 and 3.12 should be added then as well.

comment:5 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)

In e0cc3ebca7eb5937f9b3a217309a32e7b654d297/macports-ports (master):

py*-grpcio*: Disable python.pep517

Fixes "ERROR Source build is not a directory"

See: #69262

comment:6 Changed 6 months ago by FlyingSamson

Cc: FlyingSamson added

comment:7 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)

While that has fixed the "ERROR Source build is not a directory" error, there are then other errors; I'm not working on fixing them.

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

Resolution: fixed
Status: assignedclosed

This particular error is fixed, #70563 is open for the rest.

Note: See TracTickets for help on using tickets.