Skip to content
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

Some build errors in centos7 #47

Open
v-yunbin opened this issue May 26, 2021 · 10 comments
Open

Some build errors in centos7 #47

v-yunbin opened this issue May 26, 2021 · 10 comments

Comments

@v-yunbin
Copy link

I need to install ATLAS?

@svenha
Copy link

svenha commented May 26, 2021

@v-yunbin
Copy link
Author

v-yunbin commented May 27, 2021

@svenha I install atlas but met follows errors:

python setup.py build_ext --inplace
looking for atlas library, trying pkg-config first...
Package blas-atlas was not found in the pkg-config search path.
Perhaps you should add the directory containing `blas-atlas.pc'
to the PKG_CONFIG_PATH environment variable
No package 'blas-atlas' found
looking for atlas library, pkg-config found it
Traceback (most recent call last):
  File "setup.py", line 113, in <module>
    Extension("kaldiasr.nnet3",
TypeError: __init__() keywords must be strings
make: *** [kaldiasr/nnet3.so] Error 1

@svenha
Copy link

svenha commented May 27, 2021

Maybe your Linux distribution has a usable version of atlas including a .pc file. E.g. Ubuntu has it in package libatlas-base-dev.

If you must rely on your own atlas installation, you must create a blas-atlas.pc file or similar, which is referenced from kaldi-asr.pc (https://github.com/gooofy/py-kaldi-asr#source) BTW: I had to change the Requires line as follows because of Ubuntu's file structure:

Requires: blas-atlas

@svenha
Copy link

svenha commented May 27, 2021

OK, so I misunderstood the problem you reported and you should investigate the python error message. Your python must by python2.

@v-yunbin
Copy link
Author

OK, so I misunderstood the problem you reported and you should investigate the python error message. Your python must by python2.

i go to python2 env, and get some errors as follows:

python setup.py build_ext --inplace
looking for atlas library, trying pkg-config first...
Package blas-atlas was not found in the pkg-config search path.
Perhaps you should add the directory containing `blas-atlas.pc'
to the PKG_CONFIG_PATH environment variable
No package 'blas-atlas' found
looking for atlas library, pkg-config found it
Traceback (most recent call last):
  File "setup.py", line 122, in <module>
    **find_dependencies()),
TypeError: __init__() keywords must be strings
make: *** [kaldiasr/nnet3.so] Error 1

how to set the blas-atlas.pc ? do you have sample?

@v-yunbin
Copy link
Author

my atlas.pc:

prefix=/usr
libdir=${prefix}/lib
includedir=${prefix}/include/atlas


Name: atlas
Description: atlas tool
Version: 3.10
Libs: -Wl,-rpath,/usr/lib -L${libdir} -latlas
Cflags: -I${includedir}  -DHAVE_IMMEDIATE_STRUCTURES=1

maybe it have some relation with linux type? No matter i use python3 or python2 , it always raise errors:TypeError: __init__() keywords must be strings

@svenha
Copy link

svenha commented May 27, 2021

Maybe your kaldi-asr.pc is broken?

@v-yunbin
Copy link
Author

but i met another error:
Loading model from model_dir/ ... INTEL MKL ERROR: /home/ybZhang/miniconda2/lib/libmkl_vml_avx512.so.1: cannot open shared object file: No such file or directory. Intel MKL FATAL ERROR: cannot load libmkl_vml_avx512.so.1 or libmkl_vml_def.so.1

@v-yunbin
Copy link
Author

Maybe your kaldi-asr.pc is broken?

I remove the find_dependencies() in Extension, maybe it has same problem in centos:

compile_args = ['-Wall', '-pthread', '-std=c++11','-DKALDI_DOUBLEPRECISION=0','-Wno-sign-compare','-Wno-unused-local-typedefs', '-Winit-self','-DHAVE_EXECINFO_H=1', '-DHAVE_CXXABI_H','-DHAVE_ATLAS', '-g']
linker_args = ["-L{}/tools/openfst/lib".format(KALDI_ROOT),
                                   "-L{}/src/lib".format(KALDI_ROOT),
                                   "-lfst", "/usr/lib/libatlas.so.3", "-lm",
                                   "-lpthread", "-ldl", "-lkaldi-decoder", "-lkaldi-lat",
                                   "-lkaldi-fstext", "-lkaldi-hmm", "-lkaldi-feat",
								                                     "-lkaldi-transform", "-lkaldi-gmm", "-lkaldi-tree",
                                   "-lkaldi-util", "-lkaldi-matrix", "-lkaldi-base", "-lkaldi-nnet3",
                                   "-lkaldi-online2"]
ext_modules += [
    Extension("kaldiasr.nnet3",
              sources=["kaldiasr/nnet3.pyx", "kaldiasr/nnet3_wrappers.cpp"],
              language="c++",
              extra_compile_args=compile_args,                              extra_link_args = linker_args)]

@v-yunbin v-yunbin changed the title Failed to find libatlas.so.3 on your system Some build errors in centos7 May 27, 2021
@v-yunbin
Copy link
Author

@svenha rescore is not suppoted? rescore has better performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants