GithubHelp home page GithubHelp logo

build issue for src/online about kaldi HOT 9 CLOSED

dwks avatar dwks commented on May 22, 2024 1
build issue for src/online

from kaldi.

Comments (9)

danpovey avatar danpovey commented on May 22, 2024

Let's wait till we get some other comments on this.
@jtrmal ?

from kaldi.

jtrmal avatar jtrmal commented on May 22, 2024

That will solve problems for you, but will create problems for users that
do not have compiled portaudio against jack, I believe.
The correct solution would be, perhaps, use pkg-config? I'm not sure if we
can rely on its presence, though.
y.

On Fri, Oct 9, 2015 at 7:12 PM, Daniel Povey [email protected]
wrote:

Let's wait till we get some other comments on this.
@jtrmal https://github.com/jtrmal ?


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

from kaldi.

dwks avatar dwks commented on May 22, 2024

It's strange. The pkg-config for portaudio doesn't list -ljack as a dependency even when it was built with jack support (which is the default if libjack-dev installed). It only shows

$ pkg-config --libs ../../tools/portaudio/install/lib/pkgconfig/portaudio-2.0.pc 
-L.../tools/portaudio/install/lib -lportaudio -lasound -lm -lpthread 

So this doesn't solve the linker errors:

EXTRA_LDLIBS += $(shell pkg-config --libs ../../tools/portaudio/install/lib/pkgconfig/portaudio-2.0.pc)

Given the way the Makefile checks for alsa, here is a symmetric method for jack:

diff --git a/src/online/Makefile b/src/online/Makefile
index 4c0ad9f..3e1c7ca 100644
--- a/src/online/Makefile
+++ b/src/online/Makefile
@@ -22,6 +22,9 @@ ifeq ($(UNAME), Linux)
   else
     EXTRA_LDLIBS += -lrt
   endif
+  ifneq ($(wildcard ../../tools/portaudio/install/include/pa_jack.h),)
+    EXTRA_LDLIBS += -ljack
+  endif
 endif


There must be a better way however.

from kaldi.

dogancan avatar dogancan commented on May 22, 2024

Some time back I was struggling with this exact problem and the best solution I found at the time was to parse the portaudio libtool file after installation (tools/portaudio/lib/libportaudio.la) to figure out the library dependencies as well as linker flags on different platforms. The particular variables of interest are "dependency_libs" and "inherited_linker_flags".

from kaldi.

dwks avatar dwks commented on May 22, 2024

Looks like a portaudio bug. The configure.in doesn't say it needs -ljack in its pkg-config for unix even though it does for windows; it just needs a LIBS="$LIBS $JACK_LIBS". I have reported it to the portaudio developers.

For kaldi, my earlier diff is probably sufficient unless we want to switch to pkg-config.

from kaldi.

danpovey avatar danpovey commented on May 22, 2024

I'll put it as a comment in the Makefile for now.
Dan

On Fri, Oct 9, 2015 at 8:09 PM, dwks [email protected] wrote:

Looks like a portaudio bug. The configure.in doesn't say it needs -ljack
in its pkg-config for unix even though it does for windows; it just needs a
LIBS="$LIBS $JACK_LIBS". I have reported it to the portaudio developers.

For kaldi, my earlier diff is probably sufficient unless we want to switch
to pkg-config.


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

from kaldi.

dwks avatar dwks commented on May 22, 2024

I meant this diff which should be safe.

+  ifneq ($(wildcard ../../tools/portaudio/install/include/pa_jack.h),)
+    EXTRA_LDLIBS += -ljack
+  endif

from kaldi.

danpovey avatar danpovey commented on May 22, 2024

Ok, I'll add that, thanks.

On Fri, Oct 9, 2015 at 8:29 PM, dwks [email protected] wrote:

I meant this diff which should be safe.

  • ifneq ($(wildcard ../../tools/portaudio/install/include/pa_jack.h),)
  • EXTRA_LDLIBS += -ljack
  • endif


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

from kaldi.

dwks avatar dwks commented on May 22, 2024

The portaudio folks don't seem to be fixing this right away. Let's just stick with what we already have. Closing the issue.

from kaldi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.