Skip to content

BLD Fix another Meson dependency #31174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2025
Merged

Conversation

lesteve
Copy link
Member

@lesteve lesteve commented Apr 10, 2025

Found them through ninja -t missingdeps. I don't think this has caused any issue in practice but this doesn't hurt to fix it.

Here is how to run ninja -t missingdeps

rm -rf my-build
meson setup my-build --reconfigure
ninja -C my-build -t missingdeps

Output:

Missing dep: sklearn/linear_model/_sgd_fast.cpython-313-x86_64-linux-gnu.so.p/sklearn/linear_model/_sgd_fast.pyx.c uses sklearn/_loss/_loss.pxd (generated by CUSTOM_COMMAND)
Missing dep: sklearn/linear_model/_sag_fast.cpython-313-x86_64-linux-gnu.so.p/sklearn/linear_model/_sag_fast.pyx.c uses sklearn/_loss/_loss.pxd (generated by CUSTOM_COMMAND)
Processed 255 nodes.
Error: There are 2 missing dependency paths.
2 targets had depfile dependencies on 1 distinct generated inputs (from 1 rules)  without a non-depfile dep path to the generator.
There might be build flakiness if any of the targets listed above are built alone, or not late enough, in a clean output directory.

You can also get an error by explicitly building explicitly one of the two targets with missing dependencies e.g.:

rm -rf my-build
ninja -C my-build sklearn/linear_model/_sag_fast.cpython-313-x86_64-linux-gnu.so.p/sklearn/linear_model/_sag_fast.pyx.c

Output:

ninja: Entering directory `my-build'
[14/14] Compiling Cython source sklearn/linear_model/_sag_fast.pyx
FAILED: sklearn/linear_model/_sag_fast.cpython-313-x86_64-linux-gnu.so.p/sklearn/linear_model/_sag_fast.pyx.c 
cython -M --fast-fail -3 '-X language_level=3' '-X boundscheck=False' '-X wraparound=False' '-X initializedcheck=False' '-X nonecheck=False' '-X cdivision=True' '-X profile=False' --include-dir /home/lesteve/dev/scikit-learn/my-build sklearn/linear_model/_sag_fast.pyx -o sklearn/linear_model/_sag_fast.cpython-313-x86_64-linux-gnu.so.p/sklearn/linear_model/_sag_fast.pyx.c

Error compiling Cython file:
------------------------------------------------------------
...
import numpy as np
from libc.math cimport exp, fabs, isfinite, log
from libc.time cimport time, time_t
from libc.stdio cimport printf

from .._loss._loss cimport (
^
------------------------------------------------------------

sklearn/linear_model/_sag_fast.pyx:8:0: 'sklearn/_loss/_loss.pxd' not found
ninja: build stopped: subcommand failed.

Copy link

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: dfec5c2. Link to the linter CI: here

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jeremiedbb jeremiedbb merged commit aa0f381 into scikit-learn:main Apr 11, 2025
39 checks passed
@lesteve lesteve deleted the meson-tweak branch April 14, 2025 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants