Opened 4 years ago

Last modified 20 months ago

#59673 new defect

python and cmake portgroups interfere with one another: can't read "configure.pre_args": can't read "build.cmd": can't read "python.bin": can't read "python.prefix": can't read "python.branch": can't read "python.version": no such variable

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: portgroup Cc: mamoll (Mark Moll), landonf (Landon Fuller), essandess (Steve Smith), reneeotten (Renee Otten)
Port: py-pyside, py-pyside-tools, py-shiboken, z3, py-onnx

Description

The features of the python 1.0 and cmake 1.1 portgroup combine to make python stub ports like py-shiboken unbuildable:

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

(Stub ports shouldn't try to build anything anyway.)

--->  Configuring py-shiboken
DEBUG: Preferred compilers: clang llvm-gcc-4.2 macports-clang-9.0 macports-clang-8.0 macports-clang-7.0 macports-clang-6.0 macports-clang-5.0 macports-clang-3.7 macports-clang-3.4 macports-gcc-9 macports-gcc-8 macports-gcc-7 macports-gcc-6 macports-gcc-5
DEBUG: Using compiler 'Xcode Clang'
DEBUG: Executing proc-pre-org.macports.configure-configure-0
DEBUG: CPPFLAGS="-I/opt/local/include" inserted into CFLAGS="-Os -DNDEBUG -I/opt/local/include" CXXFLAGS="-Os -DNDEBUG -I/opt/local/include"
Error: Failed to configure py-shiboken: can't read "configure.pre_args": can't read "build.cmd": can't read "python.bin": can't read "python.prefix": can't read "python.branch": can't read "python.version": no such variable
DEBUG: Error code: NONE
DEBUG: Backtrace: can't read "configure.pre_args": can't read "build.cmd": can't read "python.bin": can't read "python.prefix": can't read "python.branch": can't read "python.version": no such variable
    while executing
"$pre $targetname"
Error: See /opt/local/var/macports/logs/_opt_bblocal_var_buildworker_ports_build_ports_python_py-shiboken/py-shiboken/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port py-shiboken failed
Build of 'py-shiboken' failed.

Change History (10)

comment:1 Changed 4 years ago by jmroot (Joshua Root)

I mean, yes, you can't build with both setup.py and cmake. Portfiles should not include both portgroups.

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: mamoll landonf@… added
Port: py-pyside py-pyside-tools py-shiboken z3 added

Ok, then the question becomes: why do py-pyside, py-pyside-tools, py-shiboken, and z3 incude both portgroups?

comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Mark? Landon? Any comment on the above?

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

Cc: essandess added
Port: py-onnx added

py-onnx is a new port that exhibits this problem. Steve, any comment about why you needed to use both portgroups?

comment:5 in reply to:  4 Changed 4 years ago by essandess (Steve Smith)

Replying to ryandesign:

py-onnx is a new port that exhibits this problem. Steve, any comment about why you needed to use both portgroups?

I included the cmake portgroup because the build needs cmake stuff, and I just copied and pasted what other ports had done.

For the areas where cmake conflicts with the python portgroup, I just wrote over the necessary commands.

Also, this is only an issue in the stub port py-onyx, not in actual ports like py37-onnx, so it’s not an actual issue.

I’m happy to change this to either incorporate a different cmake approach, or to add the necessary stuff to the stub port to make the stub port errors go away. I’ll defer to you all for the right approach.

comment:6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

It is an actual issue in that an actual error message occurs when attempting to install a port which should not occur. I don't know what the solution is. Josh claimed that there was no valid use case for including both portgroups, so I'm trying to get data from those who have included both portgroups about why that was necessary, so that we can decide what the correct fix is: either removing one or the other portgroup from the ports, or allowing the portgroups to coexist somehow.

The cmake portgroup is for configuring using cmake and building using make. The python portgroup is for disabling the configure phase and building using setup.py. Which of these does the port want? Looking at a build log for py37-onnx, I see that it has not used a configure phase and it has built using setup.py. This suggests to me that you're not actually using the cmake portgroup. Did you try without it?

Last edited 4 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

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

Cc: mascguy added

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

Cc: mascguy removed

comment:9 Changed 20 months ago by mascguy (Christopher Nielsen)

Keywords: portgroup added

Add keyword portgroup, to pg-related tickets

comment:10 Changed 20 months ago by mascguy (Christopher Nielsen)

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