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

tools/extras/check_dependencies.sh libtool issues #223

Closed
dwks opened this issue Oct 9, 2015 · 4 comments
Closed

tools/extras/check_dependencies.sh libtool issues #223

dwks opened this issue Oct 9, 2015 · 4 comments

Comments

@dwks
Copy link

dwks commented Oct 9, 2015

One more issue: running "make" from a clean install in tools/ on Debian 8.2 fails because check_dependencies thinks I need the binary "libtool". It seems Debian now has "libtoolize" in the libtool package which generates local "libtool"s (zeromq/libzmq#1385), and this is used by e.g. openfst's configure script. The full build works correctly if I check for "libtoolize" instead of "libtool" in tools/extras/check_dependencies.sh.

Otherwise, if I run "make" three separate times (or make -k) the build mostly completes, although it does not make the openfst symlink, so I have to make it myself or configure kaldi with --fst-root pointing at the right place. Note: there is also a Debian package "libtool-bin" which provides a system-wide "libtool" executable, and installing that will make the build succeed, although I don't think the executable is actually used because local "libtool"s are still created.

Maybe it would be best to test for either libtool or libtoolize. I'm not very familiar with autotools unfortunately.

Last comment: when building tools/ in parallel with make -j N, the check_dependencies is run at the same time as other configure scripts etc, which makes its output interleaved and difficult to spot. This will run check_dependencies first even if multiple jobs were specified:

diff --git a/tools/Makefile b/tools/Makefile
index cb3a35b..0c63b13 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -34,6 +34,9 @@ all: check_required_programs sph2pipe atlas sclite openfst
 check_required_programs:
        extras/check_dependencies.sh

+# make sure check_required_programs runs before anything else:
+sph2pipe atlas sclite openfst sctk: | check_required_programs
+
 clean: openfst_cleaned sclite_cleaned

 openfst_cleaned:
@@ -72,7 +75,7 @@ openfst-$(OPENFST_VERSION)/lib: | openfst-$(OPENFST_VERSION)/Makefile

 # Add the -O flag to CXXFLAGS on cygwin as it can fix the compilation error   
 # "file too big".
-openfst-$(OPENFST_VERSION)/Makefile: openfst-$(OPENFST_VERSION)/.patched
+openfst-$(OPENFST_VERSION)/Makefile: openfst-$(OPENFST_VERSION)/.patched | check_required_programs
 ifeq ($(OSTYPE),cygwin)
        cd openfst-$(OPENFST_VERSION)/; ./configure --prefix=`pwd` --enable-static --enable-shared --enable-far --enable-ngram-fsts CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -O" LDFLAGS="$(LDFLAGS)" LIBS="-ldl"
 else
@vijayaditya
Copy link
Contributor

In debian-jessie the libtool package has been split. So an additional package has to be installed to get the libtool binary. The package libtool-bin has to be added to tools/check_dependencies.sh script.
(Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761791)

I will add modify tools/check_dependencies.sh to do a debian version dependent package check.

@dwks
Copy link
Author

dwks commented Oct 9, 2015

Everything in tools/ builds without libtool-bin being installed, by the way. None of the configure scripts need the libtool binary directly (as the bug you linked to said, it is rare for it to be necessary). If you're already special-casing Debian I would suggest looking for libtoolize instead.

@danpovey
Copy link
Contributor

danpovey commented Oct 9, 2015

Thanks.
I'm checking in a fix for the check_dependencies.sh and the Makefile.
I am checking if 'libtoolize' exists and asking for the 'libtool' package
to be installed if not.
I hate autotools.

@jtrmal: I notice when experimenting with extras/install_irstlm.sh that
'readlink -f' does not work on a mac. Perhaps you could just use the $pwd
as-is if that command fails, via an || statement? You might want to see in
what other scripts 'readlink -f' is used.

Dan

On Fri, Oct 9, 2015 at 3:00 PM, dwks notifications@github.com wrote:

Everything in tools/ builds without libtool-bin being installed, by the
way. None of the configure scripts need the libtool binary directly (as the
bug you linked to said, it is rare for it to be necessary). If you're
already special-casing Debian I would suggest looking for libtoolize
instead.


Reply to this email directly or view it on GitHub
#223 (comment).

@jtrmal
Copy link
Contributor

jtrmal commented Oct 20, 2015

After another glance at this, it seems this issue was resolved by Dan -- and I resolved the readlink issue later, so I'm closing it.

@jtrmal jtrmal closed this as completed Oct 20, 2015
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

4 participants