Kaldi install: include pathing issues when compiling /src/ with make (RHEL)

248 views
Skip to first unread message

whun...@odu.edu

unread,
Jun 8, 2017, 4:21:11 PM6/8/17
to kaldi-help
Hi all,

So, I'm having an issue while compiling and configuring kaldi/src/

Running ./configure , I get this:

Configuring ...
Backing up kaldi.mk to kaldi.mk.bak ...
Checking compiler g++ ...
Checking OpenFst library in /home/wahunter/kaldi2/tools/openfst ...
Doing OS specific configurations ...
On Linux: Checking for linear algebra header files ...
Using ATLAS as the linear algebra library.
Atlas found in /usr/lib64/atlas
Validating presence of ATLAS libs in /usr/lib64/atlas
Could not find any libraries /usr/lib64/atlas/liblapack /usr/lib64/atlas/liblapack_atlas /usr/lib64/atlas/libclapack that seem to be an ATLAS CLAPACK library.
Validating presence of ATLAS libs in /usr/lib64/atlas
Could not find any libraries /usr/lib64/atlas/liblapack /usr/lib64/atlas/liblapack_atlas /usr/lib64/atlas/libclapack that seem to be an ATLAS CLAPACK library.
exp
-test.cc:22:24: fatal error: base/timer.h: No such file or directory
 
#include "base/timer.h"
                       
^
compilation terminated

If I change "base/timer" to "../base/timer" the code compiles correctly. This occurs with nearly every header file within this package. If there a better solution to this?

Running on an RHEL server where I don't have sudo access.


Daniel Povey

unread,
Jun 8, 2017, 4:23:37 PM6/8/17
to kaldi-help
So the file base/timer exists but not base/timer.h?
Something *extremely* strange is going on.
Either you have done something very weird, or your system is extremely unusual in some way.
Dan


--
Go to http://kaldi-asr.org/forums.html find out how to join
---
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

whun...@odu.edu

unread,
Jun 8, 2017, 4:55:25 PM6/8/17
to kaldi-help, dpo...@gmail.com
Apologies, when I wrote the line:


If I change "base/timer" to "../base/timer" the code compiles correctly.
 
I meant:

If I change include "base/timer.h" to include "../base/timer.h" the code compiles correctly.

Basically, for whatever reason, the gcc compiler defaults to normal behavior and includes only local paths (i.e., it will look in ./base time local to it) instead of where configure or make is ran from (i.e., one directory above). I'm thinking that, for whatever reason, there's a missing -iquote tag somewhere in the makefile that I haven't been able to find due to the nature of the system I'm using. Thank you for any advice on how to fix this. 

To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.

Daniel Povey

unread,
Jun 8, 2017, 5:00:46 PM6/8/17
to kaldi-help
Makefile.slow_expf in the probe/ directory includes ../kaldi.mk, which should have

CXXFLAGS = -std=c++11 -I.. ....

and other stuff after that.

Check that that is there, and try to cd to probe/ and do

make -f Makefile.slow_expf

and see if it works.



To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+unsubscribe@googlegroups.com.

whun...@odu.edu

unread,
Jun 8, 2017, 5:45:27 PM6/8/17
to kaldi-help, dpo...@gmail.com
Interesting. I tried that and here's what happens:

$ make -f Makefile.slow_expf

g
++ -O0    exp-test.cc   -o exp-test
exp
-test.cc:22:24: fatal error: base/timer.h: No such file or directory
 
#include "base/timer.h"
                       
^
compilation terminated
.
make
: *** [exp-test] Error 1

Looking at Makefile.slow_expf:
all:
include
../kaldi.mk

CXXFLAGS
+= -O0

BINFILES
= exp-test

include
../makefiles/default_rules.mk


Looking at Kaldi.mk:
# This file was generated using the following command:
# ./configure

CONFIGURE_VERSION
:= 6

# Toolchain configuration

CXX
= g++
AR
= ar
AS
= as
RANLIB
= ranlib

# Base configuration

DOUBLE_PRECISION
= 0
OPENFSTINC
= /home/wahunter/kaldi2/tools/openfst/include
OPENFSTLIBS
= /home/wahunter/kaldi2/tools/openfst/lib/libfst.so
OPENFSTLDFLAGS
= -Wl,-rpath=/home/wahunter/kaldi2/tools/openfst/lib


# Environment configuration

Daniel Povey

unread,
Jun 8, 2017, 5:51:16 PM6/8/17
to whun...@odu.edu, kaldi-help
I just pushed a fix.  Looks like it's a bug that has been there since 2011.   The configure script should already have exited with error, due to ATLAS not being installed on your system, but the '1' had been removed from a return statement.

You may have to try to install OpenBLAS instead and ask configure to use OpenBLAS>

Dan

WADE HUNTER

unread,
Jun 8, 2017, 5:52:52 PM6/8/17
to dpo...@gmail.com, kaldi-help
Thank you! 
Reply all
Reply to author
Forward
0 new messages