Compiling Jack on Solaris 10
août 24th, 2007 by Prune
For the aim of a new project I had to compile Jack, the audio software patch, on Solaris 10 x86. Jack is very usefull and goes between your sound card and your applications. Each Jack compliant piece, which may be Alsa for the soundcard or ecaSound for audio software, will have a virtual input and/or output. Then, using a Jack tool, you can patch (which is a technical word for wire) any input to any output.
This will enable us to patch some of the RME 32AES soundcard input to some software our developpers just made.
One thing the Dev team forgot, is that we are exclusively working on Solaris 10, on Sun’s hardware. This may sound easy as Jack is known to compile on Linux, OsX and Windows. But unfortunately, Jack does not compile on Solaris 10 !!
Googling to find a similar problem, we just found that FreeBSD had the same problem one year ago. Strange…
Cutting the story short, I had to dig into the code and kind of clean it up to have it compiling. I will just show you the final result as the changes are only trivial sanityse. You just have to edit config/os/generic/time.h and config/os/generic/time.c. It’s like some code in the .h should have been set in the .c file.
These are the final files. Change the original so it look like this :
In config/os/generic/time.h :
#ifndef __jack_time_h__ #define __jack_time_h__ #include <jack> jack_time_t jack_get_microseconds_from_system (); inline jack_time_t jack_get_microseconds (void); /* inline jack_time_t jack_get_microseconds (void) { return jack_get_microseconds_from_system (); } */ #endif /* __jack_time_h__ */ </jack>
config/os/generic/time.c :
void jack_init_time () { /* nothing to do on a generic system - we use the system clock */ } void jack_set_clock_source (jack_timer_type_t clocksrc) { /* only one clock source on a generic system */ } inline jack_time_t jack_get_microseconds (void) { return jack_get_microseconds_from_system (); }
[EDIT]
After some testing it seems libjack is having a bug when trying to link to jackd. A friend of mine, Daniel, Dev Team Manager, found the bug, and do a solution. You just have to change few lines in libjack/client.c, line 834 :
replace :
snprintf (req.object_path, sizeof (req.object_path), "%s", va->load_name); snprintf (req.object_data, sizeof (req.object_data), "%s", va->load_init);
by :
snprintf (req.object_path, sizeof (req.object_path), "%s", va->load_name ? va->load_name: ""); snprintf (req.object_data, sizeof (req.object_data), "%s", va->load_init ? va->load_init : "");
[EDIT]
Even if Jack compiles well, it seems it is still buggy in usage. For the moment we switched back to Linux, waiting to have time to do the whole debug. Maybe the lattency on the Solaris kernel will never enable us to use Jack on Solaris….
OK, i made both modifs and Jack compiles perfectly. Thank’s greatly !
Only the first include is and the at the end must be removed.
Cheers,
Sergio
Correction :
The first include is “jack/internal.h” and the “/jack” at the end must be removed.
Cheers,
Sergio