Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#62174 closed defect (fixed)

cmake @3.19.3 tries to use sphinx-build-3.6

Reported by: EJFielding (Eric Fielding) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc: rubendibattista (Ruben Di Battista), blair (Blair Zajac)
Port: cmake

Description

I am trying to do the usual port upgrade outdated and the cmake build is failing. I see in the log file that it is using --sphinx-build=/opt/local/bin/sphinx-build-3.6 but I don't have that installed. I tried explicitly selecting the 3.7 Sphinx with port select --set sphinx py37-sphinx, cleaning cmake, and building again, but it still looks for the wrong version.

I attach the log file.

Attachments (1)

main.log (486.5 KB) - added by EJFielding (Eric Fielding) 4 years ago.
main.log

Download all attachments as: .zip

Change History (11)

Changed 4 years ago by EJFielding (Eric Fielding)

Attachment: main.log added

main.log

comment:1 Changed 4 years ago by EJFielding (Eric Fielding)

At the beginning of the log file, it correctly finds py37-sphinx:

:debug:main Searching for dependency: py37-sphinx
:debug:main Found Dependency: receipt exists for py37-sphinx

But later tries to use sphinx-build-3.6.

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

comment:2 in reply to:  description Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: rubendibattista added; michaelld removed
Owner: set to michaelld
Status: newassigned
Summary: cmake 3.19.3 tries to use sphinx-build-3.6cmake @3.19.3 tries to use sphinx-build-3.6

Replying to EJFielding:

I see in the log file that it is using --sphinx-build=/opt/local/bin/sphinx-build-3.6 but I don't have that installed.

The code was just refactored a few days ago. Maybe this introduced a bug. Ruben, can you have a look?

I notice some odd behavior myself, such as:

$ port info cmake +docs
Error: cmake: Error executing docs: can't read "PYTHON_VERSION_WITH_DOT": no such variable
Error: Unable to open port: Error evaluating variants
$ port info cmake +python27
Error: Unable to open port: can't read "python_branch": no such variable

I tried explicitly selecting the 3.7 Sphinx with port select --set sphinx py37-sphinx, cleaning cmake, and building again, but it still looks for the wrong version.

Ports should not be affected by what you select.

comment:3 Changed 4 years ago by blair (Blair Zajac)

Cc: blair added

comment:4 Changed 4 years ago by blair (Blair Zajac)

I have +doc and +python38 in /opt/local/etc/macports/variants.conf.

I ran into the same issue. If I revert cmake back to 906a898f14b which is cmake: update to 3.19.3 then the build works. Then going to 7caeafd874e the build fails.

Doing a diff between the last good build at 906a898f14b and 7caeafd874e shows this:

 --->  Patching macports.cmake: s|__APPLICATIONS_DIR__|/Applications/MacPorts|g
---->  Patching macports.cmake: s|__PYTHON_VERSION_WITH_DOT__|3.8|g
+--->  Patching macports.cmake: s|__PYTHON_VERSION_WITH_DOT__|3.7|g
 --->  Configuring cmake

comment:5 Changed 4 years ago by blair (Blair Zajac)

Resolution: fixed
Status: assignedclosed

In d21145e3bbc08fbdd2ec317f6fc6bcc8da231dac/macports-ports (master):

cmake: set new python_branch value before using it

Follow up 7caeafd874e.

Fixes: #62174

comment:6 Changed 4 years ago by rubendibattista (Ruben Di Battista)

Sorry everyone for introducing the bug and thanks Blair for attempting to fix it. ffor wwhatever reason, on my machine I got no error and also the CI tests passed on the PR 🤷‍♂️

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

Whatever python version of sphinx it was using to build with docs on your system, you must've had it installed already. The reporter didn't. I'm presuming here that you did actually test the docs variant.

The buildbot and CI systems only build default variants. docs isn't a default variant of this port.

comment:8 Changed 4 years ago by rubendibattista (Ruben Di Battista)

I see, sorry again for the overlook.

comment:9 Changed 4 years ago by michaelld (Michael Dickens)

Thank you @Blair for the quick fixup!

comment:10 Changed 4 years ago by EJFielding (Eric Fielding)

Thanks all for the fix and the information. I ran a regular port selfupdate and then port upgrade outdated. It downloaded a prebuilt binary this time, so I did not test the build.

Note: See TracTickets for help on using tickets.