MontrealCorpusTools / Montreal-Forced-Aligner

Command line utility for forced alignment using Kaldi
https://montrealcorpustools.github.io/Montreal-Forced-Aligner/
MIT License
1.3k stars 243 forks source link

[BUG] postgres error on arm architecture #556

Closed JoFrhwld closed 1 year ago

JoFrhwld commented 1 year ago

Debugging checklist

[x ] Have you updated to latest MFA version? [ x] Have you tried rerunning the command with the --clean flag?

Describe the issue A clear and concise description of what the bug is.

Installing mfa with conda, on apple silicon leads to an error in postgres. The relevant line in pg_log_global.txt seems to be

2023-02-09 15:44:02.630 EST [70021] ERROR:  could not load library "/Users/joseffruehwald/opt/miniconda3/envs/mfa_arm/lib/vector.so": dlopen(/Users/joseffruehwald/opt/miniconda3/envs/mfa_arm/lib/vector.so, 0x000A): tried: '/Users/joseffruehwald/opt/miniconda3/envs/mfa_arm/lib/vector.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))

For Reproducing your issue Please fill out the following:

  1. Corpus structure
    • What language is the corpus in?
      • English
    • How many files/speakers?
      • 1
    • Are you using lab files or TextGrid files for input?
      • Textgrid
  2. Dictionary
    • Are you using a dictionary from MFA? If so, which one?
      • english_us_arpa
    • If it's a custom dictionary, what is the phoneset?
  3. Acoustic model
    • If you're using an acoustic model, is it one download through MFA? If so, which one?
      • english_us_arpa
    • If it's a model you've trained, what data was it trained on?

Log file Please attach the log file for the run that encountered an error (by default these will be stored in ~/Documents/MFA).

Desktop (please complete the following information):

Additional context

To ensure I was definitely installing on the arm architecture:

CONDA_SUBDIR=osx-arm64 conda create -n mfa_arm montreal-forced-aligner -c conda-forge
conda activate mfa_arm
mfa model download acoustic english_us_arpa
mfa model download dictionary english_us_arpa
mfa align ~/Documents/misc_repos/vowelentines_day/to_align english_us_arpa english_us_arpa test_align
mmcauliffe commented 1 year ago

Can you check whether you have pgvector==h5a695e1_2 in conda list? I just released it a bit ago with some missing compilation flags, so if this is happening in the latest version, I'll dive back into arm64 compilation on conda.

JoFrhwld commented 1 year ago

looks like yes

> conda list | grep pgvector
pgvector                  0.4.0                h5a695e1_2    conda-forge
pgvector-python           0.1.6              pyhb2dc1fd_2    conda-forge
JoFrhwld commented 1 year ago

Wait, I see the 2.1.4 release here on github, but it looks like 2.1.3 is what's up on condaforge right now (and what I installed).

mmcauliffe commented 1 year ago

No, it's the pgvector package that's currently not building correctly for arm64, trying to debug it still.

mmcauliffe commented 1 year ago

Ok, finally got arm64 building correctly, so if you update to pgvector version haf31df1_3, this should be fixed.

JoFrhwld commented 1 year ago

It works!