how to compile xruncounter if you're a total novice?

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
User avatar
ZestieBumwhig
Established Member
Posts: 73
Joined: Fri May 20, 2016 4:56 pm

how to compile xruncounter if you're a total novice?

Post by ZestieBumwhig »

This might be the wrong place to ask this... but I don't know how to use a computer. When I try to compile xruncounter (using "gcc -o xruncounter xruncounter.c" - is that not correct?) I get:

Code: Select all

root@xxxxxxx:/home/xxxxxxx# gcc -o xruncounter xruncounter.c
/tmp/ccuGaKKX.o: In function `jack_xrun_callback':
xruncounter.c:(.text+0x68): undefined reference to `jack_cpu_load'
xruncounter.c:(.text+0x81): undefined reference to `jack_cpu_load'
xruncounter.c:(.text+0xb5): undefined reference to `jack_cpu_load'
/tmp/ccuGaKKX.o: In function `signal_handler':
xruncounter.c:(.text+0x1a6): undefined reference to `jack_client_close'
/tmp/ccuGaKKX.o: In function `main':
xruncounter.c:(.text+0x1f8): undefined reference to `jack_client_open'
xruncounter.c:(.text+0x25d): undefined reference to `jack_port_register'
xruncounter.c:(.text+0x28c): undefined reference to `jack_port_register'
xruncounter.c:(.text+0x2f2): undefined reference to `jack_set_xrun_callback'
xruncounter.c:(.text+0x30d): undefined reference to `jack_set_sample_rate_callback'
xruncounter.c:(.text+0x328): undefined reference to `jack_set_buffer_size_callback'
xruncounter.c:(.text+0x343): undefined reference to `jack_set_process_callback'
xruncounter.c:(.text+0x35e): undefined reference to `jack_on_shutdown'
xruncounter.c:(.text+0x36d): undefined reference to `jack_activate'
xruncounter.c:(.text+0x3aa): undefined reference to `jack_is_realtime'
xruncounter.c:(.text+0x40b): undefined reference to `jack_cpu_load'
xruncounter.c:(.text+0x494): undefined reference to `jack_client_close'
collect2: error: ld returned 1 exit status
I've tried looking up these errors, but I'm too ignorant of the world of C and compiling to do anything with the results.

Basically, I'm not at all sure my system is "well tuned." Even though everything runs well and fairly smoothly, I'm not confident I don't have some really dumb settings - the fan comes on a lot, I get (inaudible) xruns at 10% DSP load using a Scarlett 18i20, etc. So this seemed like a good first step to figuring things out...
Musicteacher
Established Member
Posts: 194
Joined: Mon Nov 13, 2017 5:54 am
Has thanked: 8 times
Been thanked: 4 times

Re: how to compile xruncounter if you're a total novice?

Post by Musicteacher »

You need to link against the jack-libs.

The command for that given in another thread is:

Code: Select all

gcc -Wall xruncounter.c -lm `pkg-config --cflags --libs jack` -o xruncounter
For arch, there is a build-script in aur. Maybe you need to install jack development files, it depends on your distro.

If you get xruns at 10% dsp load, there is indeed room for improvement!
User avatar
ZestieBumwhig
Established Member
Posts: 73
Joined: Fri May 20, 2016 4:56 pm

Re: how to compile xruncounter if you're a total novice?

Post by ZestieBumwhig »

Ohhhhh!!!!!

Thank you, again! (you also helped with my touchpad - or, well, tried to; I gave up)

I had already tried commenting out (edit: removing the "comment-out" symbols, I mean) that line, but I didn't realize it was to be run in the terminal - I thought it was part of the C code! Now it works. Eventually I'll probably post for hints and tips, but having it working is great.

Code: Select all

Samplerate 48000 
Buffersize is 128 
jack running with realtime priority
Xrun 1 at DSP load 72.739578
Xrun 2 at DSP load 72.739578
Xrun 3 at DSP load 72.739578
......
in complete 278 Xruns in 7281 circles
first Xrun happen at DSP load 72.739578 circle 6239
Post Reply