-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
pythonPackages.kaldi-active-grammar: fix build #203485
Conversation
|
||
# commit f07a0615ea82351bbddc0799364774cb350ff759 "openblas: 0.3.20 -> 0.3.21" | ||
# ... breaks header compatibility with the outdated kaldi-active-grammar tree. | ||
old-openblas = openblas.overrideAttrs (prev: rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird things might happen if this package were imported alongside numpy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Action recommended? It's contained to just this derivation so I don't anticipate much fallout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a bit of digging but revealed opencv having similar issues:
* Use LAPACK_xxxx to transparently (via predefined lapack macros) deal with pre and post 3.9.1 versions.
* LAPACK 3.9.1 introduces LAPACK_FORTRAN_STRLEN_END and modifies (through preprocessing) the declarations of the following functions used in opencv
* sposv_, dposv_, spotrf_, dpotrf_, sgesdd_, dgesdd_, sgels_, dgels_
* which end up with an extra parameter.
* So we also need to preprocess the function calls in opencv coding by prefixing them with LAPACK_.
* The good news is the preprocessing works fine whatever netlib's LAPACK version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding
substituteInPlace src/matrix/cblas-wrappers.h \
--replace stptri_ LAPACK_stptri \
--replace dtptri_ LAPACK_dtptri \
--replace sgetrf_ LAPACK_sgetrf \
--replace dgetrf_ LAPACK_dgetrf \
--replace sgetri_ LAPACK_sgetri \
--replace dgetri_ LAPACK_dgetri \
--replace sgesvd_ LAPACK_sgesvd \
--replace dgesvd_ LAPACK_dgesvd \
--replace ssptri_ LAPACK_ssptri \
--replace dsptri_ LAPACK_dsptri \
--replace ssptrf_ LAPACK_ssptrf \
--replace dsptrf_ LAPACK_dsptrf
to postPatch
allows it to build successfully with 0.3.21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with openfst. We should not merge this in the current state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The openfst one isn't new and I think it's much less likely to produce a collision - numpy is everywhere on the other hand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed @risicle's suggestion; @SuperSandro2000: KAG uses a openfst fork, so it's not the same.
(I tried typing this with the working build and it does work, but effort. Spent like two minutes figuring out I need to say "location <500ms> say <200ms> super <500ms> tab" or a longer string)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KAG uses a openfst fork, so it's not the same.
has it the same import path? If so they are considered the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also tried it before saying that and it does not work. The fork is based on 1.7, we are on 1.8 - I am not interested in debugging this, and it's out of the scope of my changes: cleaning [openfst] up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Builds happily, aarch64-linux
Might be worth suggesting the openblas fix to upstream. |
Successfully created backport PR #204282 for |
Description of changes
Fixes #203089; cc @Lykos153 @mweinelt.
Snuck
backports-zoneinfo
in as it's an indirect dependency and something I ran into because my test shell hadpython38
. Can drop.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notesZHF: #199919