Build broken on ubuntu due to MKL symbols not found #50211
Labels
module: build
Build system issues
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃悰 Bug
On my system, pytorch builds fine, but using MKL function fails:
To Reproduce
Steps to reproduce the behavior:
python setup.py develop
python -c 'import torch; torch.tensor([[1.0, 2], [3, 4]]).svd()'
Depending on which MKL operations is used, the undefined symbol varies.
Expected behavior
Not to crash :)
Environment
I think that the relevant env variable is
LDFLAGS
:Note that it contains
--as-needed
.I bisected the commits and the culprit seems to be 12ee7b6, added by #50080 . The problem is that if LDFLAGS contains
--as-needed
, it overrides the--no-as-needed
which is added by theif
.An easy workaround is to manually add
--no-as-needed
at the end of my LDFLAGS, but I claim that since theif
clearly tries to take care of it, the PR is wrong.cc @malfet @seemethere @walterddr
The text was updated successfully, but these errors were encountered: