You are here

qjackctl cannot find jack shared library

Dear community:

Perhaps someone has an idea as to how to fix this.

I have a MIDI controller keyboard (with no speakers) which I would like to play
though my computer (Ubuntu 7.04). I am told that a fluidsynth – jack
combination should do the trick.

I've gotten as far as installing jack and qjackctl; however when I attempt to
start qjackctl I get the following message:

qjackctl: error while loading shared libraries: libjack.so.0: cannot open shared
object file: No such file or directory

Needless to say, qjackctl does not start. Looking around the web I found this
suggestion:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

After issuing this command qjackctl did start. However, while looking, I
also found many comments discouraging this practice. So I am looking for a
different solution, if possible.

My installation procedure was as follows:

1. Downloaded jack-audio-connection-kit-0.109.2.tar.gz from http://jackaudio.org
2. tar -xzvf jack-audio-connection-kit-0.109.2.tar.gz in my downloads directory.
3. cd jack-audio-connection-kit-0.109.2/
4. ./configure This produced a ton of messages. The very last messages were
these:
jack-audio-connection-kit 0.109.2 :

| Build with ALSA support............................... : true
| Build with old FireWire (FreeBob) support............. : false
| Build with new FireWire (FFADO) support............... : false
| Build with OSS support................................ : true
| Build with CoreAudio support.......................... : false
| Build with PortAudio support.......................... : false
| Compiler optimization flags........................... : -DREENTRANT -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=i686 -mmmx -msse -mfpmath=sse
| Compiler full flags................................... : -I$(top_srcdir)/config -I$(top_srcdir) -I$(top_srcdir) -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -g -g -O2
| Install dir for libjack + backends.................... : ${exec_prefix}/lib/jack
|
| Default driver backend................................ : "alsa"
| Shared memory interface............................... : "System V"
| Install prefix........................................ : /usr/local

5. make Which also produced a ton of messages, none of which seemed very
remarkable to me (but I am a relative newbee). In particular, I saw no errors.
6. sudo su
7. make install Again, this also produced a fair number of messages, none of
which meant very much to me. I didn't see any errors here either.
8. Downloaded and untarred qjackctl-0.3.2.tar.gz from
http://qjackctl.sourceforge.net/
9. cd qjackctl-0.3.2
10. ./configure Which produced this, after many other messages:
QjackCtl 0.3.2

Build target . . . . . . . . . . . . . . . . . . .: release

JACK Audio Connection Kit support . . . . . . . .: yes
JACK Realtime support . . . . . . . . . . . . . .: yes
JACK Transport support . . . . . . . . . . . . . .: yes
JACK XRUN delay support . . . . . . . . . . . . .: yes
JACK Maximum scheduling delay support . . . . . .: yes
JACK MIDI support . . . . . . . . . . . . . . . .: yes
ALSA MIDI Sequencer support . . . . . . . . . . .: yes
System tray icon support . . . . . . . . . . . . .: yes

Install prefix . . . . . . . . . . . . . . . . . .: /usr/local

Now type 'make', followed by 'make install' as root.

11. make Lots of output, none of which meant much to me
12. sudo su
13 make install This produced very little output:
`qjackctl' -> `/usr/local/bin/qjackctl'
`icons/qjackctl.png' -> `/usr/local/share/pixmaps/qjackctl.png'
`qjackctl.desktop' -> `/usr/local/share/applications/qjackctl.desktop'

As I said before, I typed qjackctl at the shell prompt and got:

qjackctl: error while loading shared libraries: libjack.so.0: cannot open shared
object file: No such file or directory

Looking around some of my directories I found the following files:

ls -al /usr/local/lib
total 948
drwxr-xr-x 5 root root 4096 2008-03-17 09:52 .
drwxr-xr-x 10 root root 4096 2008-03-16 17:59 ..
drwxr-xr-x 2 root root 4096 2008-03-17 09:52 jack
-rw-r--r-- 1 root root 377292 2008-03-15 16:29 libfluidsynth.a
-rwxr-xr-x 1 root root 892 2008-03-15 16:29 libfluidsynth.la
lrwxrwxrwx 1 root root 22 2008-03-15 16:29 libfluidsynth.so -> libfluidsynth.so.1.1.2
lrwxrwxrwx 1 root root 22 2008-03-15 16:29 libfluidsynth.so.1 -> libfluidsynth.so.1.1.2
-rwxr-xr-x 1 root root 316705 2008-03-15 16:29 libfluidsynth.so.1.1.2
-rwxr-xr-x 1 root root 832 2008-03-17 09:52 libjack.la
lrwxrwxrwx 1 root root 17 2008-03-17 09:52 libjack.so -> libjack.so.0.0.28
lrwxrwxrwx 1 root root 17 2008-03-17 09:52 libjack.so.0 -> libjack.so.0.0.28
-rwxr-xr-x 1 root root 226117 2008-03-17 09:52 libjack.so.0.0.28
drwxr-xr-x 2 root root 4096 2008-03-17 09:52 pkgconfig
drwxrwsr-x 3 root staff 4096 2008-03-11 09:37 python2.5

ls -al /usr/local/lib/jack
total 432
drwxr-xr-x 2 root root 4096 2008-03-17 09:52 .
drwxr-xr-x 5 root root 4096 2008-03-17 09:52 ..
-rwxr-xr-x 1 root root 838 2008-03-17 09:52 inprocess.la
-rwxr-xr-x 1 root root 10674 2008-03-17 09:52 inprocess.so
-rwxr-xr-x 1 root root 820 2008-03-17 09:52 intime.la
-rwxr-xr-x 1 root root 13330 2008-03-17 09:52 intime.so
-rwxr-xr-x 1 root root 855 2008-03-17 09:52 jack_alsa.la
-rwxr-xr-x 1 root root 276887 2008-03-17 09:52 jack_alsa.so
-rwxr-xr-x 1 root root 839 2008-03-17 09:52 jack_dummy.la
-rwxr-xr-x 1 root root 35227 2008-03-17 09:52 jack_dummy.so
-rwxr-xr-x 1 root root 827 2008-03-17 09:52 jack_oss.la
-rwxr-xr-x 1 root root 61206 2008-03-17 09:52 jack_oss.so

ls -al /usr/local/bin
total 1548
...
-rwxr-xr-x 1 root root 23851 2008-03-15 16:29 fluidsynth
...
-rwxr-xr-x 1 root root 13387 2008-03-17 09:52 jack_alias
-rwxr-xr-x 1 root root 12505 2008-03-17 09:52 jack_bufsize
-rwxr-xr-x 1 root root 12468 2008-03-17 09:52 jack_connect
-rwxr-xr-x 1 root root 200615 2008-03-17 09:52 jackd
-rwxr-xr-x 1 root root 12468 2008-03-17 09:52 jack_disconnect
-rwxr-xr-x 1 root root 13551 2008-03-17 09:52 jack_evmon
-rwxr-xr-x 1 root root 11518 2008-03-17 09:52 jack_freewheel
-rwxr-xr-x 1 root root 16419 2008-03-17 09:52 jack_impulse_grabber
-rwxr-xr-x 1 root root 14950 2008-03-17 09:52 jack_load
-rwxr-xr-x 1 root root 17816 2008-03-17 09:52 jack_lsp
-rwxr-xr-x 1 root root 20767 2008-03-17 09:52 jack_metro
-rwxr-xr-x 1 root root 14495 2008-03-17 09:52 jack_midiseq
-rwxr-xr-x 1 root root 14489 2008-03-17 09:52 jack_midisine
-rwxr-xr-x 1 root root 10713 2008-03-17 09:52 jack_monitor_client
-rwxr-xr-x 1 root root 13308 2008-03-17 09:52 jack_showtime
-rwxr-xr-x 1 root root 15359 2008-03-17 09:52 jack_simple_client
-rwxr-xr-x 1 root root 26015 2008-03-17 09:52 jack_transport
-rwxr-xr-x 1 root root 11601 2008-03-17 09:52 jack_unload
...
-rwxr-xr-x 1 root root 1033682 2008-03-17 09:55 qjackctl
...

Any suggestions or comments will be much appreciated.

Thanks,

Edward

Forums: 
rncbc's picture

Hi Edward,

All the messages you say you don't understand are in fact the plain output of the build and compilation process, so it's considered quite normal behavior. No worries about that, assuming the whole process ended with no errors.

I guess the main problem you're facing is that you're building and installing from source and the default installation target directory is /usr/local instead of the standard /usr. What happens is that the linker (ld) cache doesn't know whether to look into this directory, yet.

Maybe this will do it: as root, edit /etc/ld.so.conf, add a new line with just /usr/local/lib, save and still as root run ldconfig. That's it: from now on, all shared libraries (.so) installed under /usr/local should be found when running your applications, so that you may proceed to the next problem... sure, don't despair, they'll come :)

Cheers
--
rncbc aka Rui Nuno Capela

Hi Rui,

Thank you so much for your help. I followed your suggestion and now qjackctl starts. As you predicted, a couple more problems appeared:

1. For now I am starting qjackctl in a terminal window. In that window I get the following warning:
Warning: no locale found: /usr/local/share/locale/qjackctl_en_US.qm
Since I can see all the text in English on the gui widgets and the message window, I am guessing this warning is not important.

2. In its message window, qjackctl complained about a missing artshell. I don't know if this is an important problem. In any case I found the option to enable/disable the execution of a script at start time. I unchecked that option, and now I don't see this complaint anymore.

3. In its message window, qjackctl issued a complaint mentioning FIFO and permissions. I looked around the web and I found the suggestion to add these lines to /etc/security/limits.conf:
edward - rtprio 95
edward - memlock 512000
edward - nice -19
After restarting my computer (I'm sure there is a better way), this made the error message go away. From what I read, I have the vague idea that these settings have to do with allowing user 'edward' to execute processes that request "real time" operations. I won't ask you to explain each setting, but I am curious to know whether you think this modification of /etc/security/limits.conf is a reasonable thing to do.

4. I compiled and installed fluidsynth and qsynth from their sources. Then I started qjackctl and clicked the start button; and this appeared to start up jack successfully. Unfortunately when I attempted to start qsynth it reported the following in its message window"
22:10:04.050 Qsynth1: Creating synthesizer engine...
22:10:05.080 Qsynth1: Creating audio driver (jack)...
22:10:05.081 Qsynth1: Failed to create the audio driver (jack). Cannot continue without it.
fluidsynth: error: Couldn't find the requested audio driver: jack
So I am stuck at this point. Any idea what could be wrong?

Thanks for your help and patience,

Edward

rncbc's picture

1. For now I am starting qjackctl in a terminal window. In that window I get the following warning:
Warning: no locale found: /usr/local/share/locale/qjackctl_en_US.qm
Since I can see all the text in English on the gui widgets and the message window, I am guessing this warning is not important.

You guessed it right. It is not important and it's just a warning. It only gets supressed when a specific translation file is found for your current LANG setting. As en_US is in deed the native one, you're fine. You rather ignore it and carry on ;)

2. In its message window, qjackctl complained about a missing artshell. I don't know if this is an important problem. In any case I found the option to enable/disable the execution of a script at start time. I unchecked that option, and now I don't see this complaint anymore.

Again, you've done the right thing. The artsshell startup entry is a legacy from early times, when KDE aRTs sound service was ruling and annoyingly grabbing the sound device in exclusive mode. If you don't run KDE or aRTs is not your desktop sound service, then you may forget or even ignore this issue.

3. In its message window, qjackctl issued a complaint mentioning FIFO and permissions. I looked around the web and I found the suggestion to add these lines to /etc/security/limits.conf:
edward - rtprio 95
edward - memlock 512000
edward - nice -19
After restarting my computer (I'm sure there is a better way), this made the error message go away. From what I read, I have the vague idea that these settings have to do with allowing user 'edward' to execute processes that request "real time" operations. I won't ask you to explain each setting, but I am curious to know whether you think this modification of /etc/security/limits.conf is a reasonable thing to do.

It is not just reasonable but rather necessary. These settings allows you (edward) to run programs which needs real-time scheduling privileges to behave as designed. This is the case when you start jackd in real-time mode (-R) and it's the recommended way of doing things. So you can chalk this one right too.

4. I compiled and installed fluidsynth and qsynth from their sources. Then I started qjackctl and clicked the start button; and this appeared to start up jack successfully. Unfortunately when I attempted to start qsynth it reported the following in its message window:
22:10:04.050 Qsynth1: Creating synthesizer engine...
22:10:05.080 Qsynth1: Creating audio driver (jack)...
22:10:05.081 Qsynth1: Failed to create the audio driver (jack). Cannot continue without it.
fluidsynth: error: Couldn't find the requested audio driver: jack
So I am stuck at this point. Any idea what could be wrong?

It looks like fluidsynth is failing to connect to jack as a client. This might be a symptom of shared library clash, meaning that it might be probable that you have different versions of the same library.so under different paths. For example, maybe you have libjack.so, or libfluidsynth.so under /usr/local/lib as installed from the sources by default, and also under /usr/lib but installed from your distro packaging. Check that out and try uninstalling the distro packaged ones first and try again.

This is just a guess of course. You should try whether the same issue appears when starting some other jack clients for instance. Example clients which are usually installed with jack itself are: jack_lsp, jack_metro, jack_simple_client, jackrec, jack_showtime, etc. Try any of those and check if they run alright.

Byee
--
rncbc aka Rui Nuno Capela

Hi again,

Found the problem:
I said I had built and installed the software in this order: 1 jack, 2 qjackctl, 3 fluidsynth, 4 qsynth
In fact I did it in this order: 1. fluidsynth, 2 jack, 3 qjackctl, 4 qsynth
So... I unwittingly compiled fluidsynth without any jack support... oh well...
Now things start up correctly. All I have to do now is to learn how to use jack to plug things together.

Thanks for all your help.

Edward

rncbc's picture

Glad you found the trouble maker.

Now, regarding how to use jack to plug things together it's the easiest one: just use QjackCtl Connections widget and that's all said ;)

Cheers
--
rncbc aka Rui Nuno Capela

Technically, this is not the power Linux users way of doing this, but I follow the Redhat rule and use the ./configure --prefix=/usr option when building Qtractor, or anything else, for that matter. Sure, many Linux users will tell this is bad, but really, it's not. The whole concept behind this usage of /usr/local derived from people wanting to keep their own compiled programs separated from the OS files. While most Linux programmers still follow this rule as a default, most distributions do not, to some extent.

If you simply recompile your programs using this (--prefix=/usr), I'd guess all your problems will magically disappear. Just remember to do a "make uninstall" first, for each program you compiled, to clean out the /usr/local/ dirs.

Lexridge

Thanks for the suggestion. I hadn't thought of that possibility. As far as uninstalling is concerned, can I do a "make uninstall" as a regular user or do I have to be root (or use sudo)? What I have been doing up to know, which I am certain is pretty naive, was "find /usr/local -name '**' -print . Then I had been manually going through the list and "rm" ing anything that seemed appropriate.

Thanks,

Edward

rncbc's picture

Yes, make uninstall is the recommended command incantation to un-install packages built from source. It's and should do exactly the opposite of make install and obviously should be run under the very same user authority, most usually, root.

Byee.
--
rncbc aka Rui Nuno Capela

Add new comment