Jack.h headers for pipewire on Fedora 37

Hello everybody!

I’m trying to compile simple_client.c (which is a jack example application) with this:

gcc -o simple simpleclient.c

At first, it didn’t work because it was not able to find jack.h. I’m running pipewire, so I simply installed pipewire-jack-audio-connection-kit-devel. Then ran the same command again:

/usr/bin/ld: /tmp/ccud4laK.o: in function `signal_handler':
simple_client.c:(.text+0x16): undefined reference to `jack_client_close'
/usr/bin/ld: /tmp/ccud4laK.o: in function `process':
simple_client.c:(.text+0x69): undefined reference to `jack_port_get_buffer'
/usr/bin/ld: simple_client.c:(.text+0x81): undefined reference to `jack_port_get_buffer'
/usr/bin/ld: /tmp/ccud4laK.o: in function `main':
simple_client.c:(.text+0x27d): undefined reference to `sin'
/usr/bin/ld: simple_client.c:(.text+0x2dd): undefined reference to `jack_client_open'
/usr/bin/ld: simple_client.c:(.text+0x37f): undefined reference to `jack_get_client_name'
/usr/bin/ld: simple_client.c:(.text+0x3bb): undefined reference to `jack_set_process_callback'
/usr/bin/ld: simple_client.c:(.text+0x3d4): undefined reference to `jack_on_shutdown'
/usr/bin/ld: simple_client.c:(.text+0x3f8): undefined reference to `jack_port_register'
/usr/bin/ld: simple_client.c:(.text+0x423): undefined reference to `jack_port_register'
/usr/bin/ld: simple_client.c:(.text+0x479): undefined reference to `jack_activate'
/usr/bin/ld: simple_client.c:(.text+0x4c3): undefined reference to `jack_get_ports'
/usr/bin/ld: simple_client.c:(.text+0x50c): undefined reference to `jack_port_name'
/usr/bin/ld: simple_client.c:(.text+0x524): undefined reference to `jack_connect'
/usr/bin/ld: simple_client.c:(.text+0x560): undefined reference to `jack_port_name'
/usr/bin/ld: simple_client.c:(.text+0x578): undefined reference to `jack_connect'
/usr/bin/ld: simple_client.c:(.text+0x5a6): undefined reference to `jack_free'
collect2: error: ld returned 1 exit status

This used to work on arch by installing pipewire pipewire-jack, but somehow something is wrong with jack.h here.

And I need to note that I use fedora 37, I didn’t switch yet.

Edit: I tried with jack-audio-connection-kit-devel but it requires jack-audio-connection-kit which would cause a conflict. That’s why I tried to install pipewire-jack-audio-connection-kit-devel.

You probably need to link the library?

gcc -L/usr/lib64/pipewire-0.3/jack -ljack -o simple_client simple_client.c
simple_client.c:16:10: fatal error: jack/jack.h: No such file or directory
   16 | #include <jack/jack.h>
      |          ^~~~~~~~~~~~~
compilation terminated.

Doesn’t seem to work. /usr/lib64/pipewire-0.3/jack does exist on my system and here is it’s content:

total 528K
drwxr-xr-x. 1 root root  216 May  3 16:57 .
drwxr-xr-x. 1 root root 2.2K Apr 27 15:21 ..
lrwxrwxrwx. 1 root root   21 Apr 20 14:18 libjacknet.so.0 -> libjacknet.so.0.370.0
-rwxr-xr-x. 1 root root  16K Apr 20 14:18 libjacknet.so.0.370.0
lrwxrwxrwx. 1 root root   24 Apr 20 14:18 libjackserver.so.0 -> libjackserver.so.0.370.0
-rwxr-xr-x. 1 root root 254K Apr 20 14:18 libjackserver.so.0.370.0
lrwxrwxrwx. 1 root root   18 Apr 20 14:18 libjack.so.0 -> libjack.so.0.370.0
-rwxr-xr-x. 1 root root 242K Apr 20 14:18 libjack.so.0.370.0

You do not have pipewire-jack-audio-connection-kit-devel installed.

Installed and tried again:

$ gcc -L/usr/lib64/pipewire-0.3/jack -ljack -o simple_client simple_client.c
/usr/bin/ld: /tmp/ccgFRvgT.o: in function `main':
simple_client.c:(.text+0x27d): undefined reference to `sin'
collect2: error: ld returned 1 exit status

You need to link to math library as well. -lm

1 Like