Re: [Jack-Devel] Jack beginner question

PrevNext  Index
DateWed, 21 Aug 2013 15:13:09 -0700
From val and leslie <[hidden] at coloradocollege dot edu>
To[hidden] at lists dot jackaudio dot org
In-Reply-ToVal Veirs (R) [Jack-Devel] Jack beginner question
Follow-UpHarry van Haaren Re: [Jack-Devel] Jack beginner question
> First, "Thank you" to Pawel and Flo for helping me as I try to compile 
> anything with jack.
>
> I have now installed libjack-dev and one result seems to be that I now 
> have a path and file:
> /usr/include/jack/jack.h
> which I take to be a good thing.
> When I try to compile, now the compiler now finds jack.h but none of 
> its references resolve.  I now need to be linked into some jack 
> library(s) that either I don't yet have or I have them in one or more 
> wrong locations.
> Compiling metro.c yields:
> val@zar:~/JackFiles/jack-1.9.9.5/example-clients$ gcc -o metronome 
> `pkg-config --cflags --libs jack` metro.c
> /tmp/ccnO5ZRZ.o: In function `signal_handler':
> metro.c:(.text+0x16): undefined reference to `jack_client_close'
> /tmp/ccnO5ZRZ.o: In function `process_silence':
> metro.c:(.text+0x81): undefined reference to `jack_port_get_buffer'
> /tmp/ccnO5ZRZ.o: In function `process_audio':
> metro.c:(.text+0xc3): undefined reference to `jack_port_get_buffer'
> /tmp/ccnO5ZRZ.o: In function `process':
> metro.c:(.text+0x214): undefined reference to `jack_transport_query'
> /tmp/ccnO5ZRZ.o: In function `main':
> metro.c:(.text+0x6e2): undefined reference to `jack_client_open'
> metro.c:(.text+0x736): undefined reference to `jack_set_process_callback'
> metro.c:(.text+0x75c): undefined reference to `jack_port_register'
> metro.c:(.text+0x772): undefined reference to `jack_get_sample_rate'
> metro.c:(.text+0xb31): undefined reference to `sin'
> metro.c:(.text+0xbaf): undefined reference to `jack_activate'
> collect2: error: ld returned 1 exit status
>
> I looked to see if Flo's suggested path to jack.pc existed and found 
> that my jack.pc is one directory farther down at: 
> /usr/lib/x86_64-linux-gnu/pkgconfig
>
> I tried setting:
>   PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig; export 
> PKG_CONFIG_PATH
> and confirmed that this setting worked:
>   printenv PKG_CONFIG_PATH
> /usr/lib/x86_64-linux-gnu/pkgconfig
>
> But, compiling again did not change the failure to find the needed 
> links to the jack.h entry points (jack_client_close etc.)
>
> I have messed with jack so much now that I may have made it impossible 
> to get a working combination of files and paths and libraries.
>
> But, I so much need further advice!
>
> Thanks in advance,
> Val Veirs
> Colorado College
> ________________________________________
> From: [hidden] 
> [[hidden]] on behalf of Florian Paul 
> Schmidt [[hidden]]
> Sent: Wednesday, August 21, 2013 6:01 AM
> To: [hidden]
> Subject: Re: [Jack-Devel] Jack beginner question
>
> On 21.08.2013 08:15, Val Veirs (R) wrote:
>> Greetings,
>>
>> I am just beginning to look at Jack.  I am running Ubuntu 13.04 and I 
>> installed the binaries and QJackCtrl seems to work just fine.  That 
>> makes me think that so far I have the deamon running as it should.
>>
>> I want to compile just the simplest of your example clients programs 
>> to get started.
>>    I download the Jack sources and put them in my user space.  There 
>> I find metro.c.  In a terminal window I try to compile and I run into 
>> path problems.
>>
>> Here is what is reported:
>>
>> val@zar:~/JackFiles/jack-1.9.9.5/example-clients$ gcc -o metronome 
>> `pkg-config --cflags --libs jack` metro.c
>>
>> Package jack was not found in the pkg-config search path.
>> Perhaps you should add the directory containing `jack.pc'
>> to the PKG_CONFIG_PATH environment variable
>> No package 'jack' found
>> metro.c:30:23: fatal error: jack/jack.h: No such file or directory
>> compilation terminated.
>>
>>
>> I guess my question is what should PKG_CONFIG_PATH point to?
>>
>> I would appreciate any suggestions.
> Like some other people mentioned, you need the -dev packages for
> libjack. But the metro client should be available in the (some) jack
> package. It's called jack_metro. You could also try tools like jack_lsp
> to check if the daemon is running fine..
>
> But just to answer your question: pkg-config looks in some default paths
> for .pc files. One of them should be /usr/lib/pkgconfig. If you want it
> to search additional paths, then you can point it to e.g.
> /usr/local/lib/pkgconfig, this is where the .pc files of packages are
> often put when you build the packages yourself from source and leave the
> default prefix /usr/local unchanged. Installing libjack-dev (or whatever
> it's called) should give you /usr/lib/pkgconfig/jack.pc. So no need to
> adjust the PKG_CONFIG_PATH..
>
> Have fun,
> Flo
>
>> Val Veirs
>> Colorado College
>> Colorado Springs
>> 
>> Jack-Devel mailing list
>> [hidden]
>> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
> 
> Jack-Devel mailing list
> [hidden]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org



On 08/20/2013 11:15 PM, Val Veirs (R) wrote:
> Greetings,
>
> I am just beginning to look at Jack.  I am running Ubuntu 13.04 and I installed the binaries and QJackCtrl seems to work just fine.  That makes me think that so far I have the deamon running as it should.
>
> I want to compile just the simplest of your example clients programs to get started.
>   I download the Jack sources and put them in my user space.  There I find metro.c.  In a terminal window I try to compile and I run into path problems.
>
> Here is what is reported:
>
> val@zar:~/JackFiles/jack-1.9.9.5/example-clients$  gcc -o metronome `pkg-config --cflags --libs jack` metro.c
>
> Package jack was not found in the pkg-config search path.
> Perhaps you should add the directory containing `jack.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'jack' found
> metro.c:30:23: fatal error: jack/jack.h: No such file or directory
> compilation terminated.
>
>
> I guess my question is what should PKG_CONFIG_PATH point to?
>
> I would appreciate any suggestions.
>
> Val Veirs
> Colorado College
> Colorado Springs
> 
> Jack-Devel mailing list
> [hidden]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
PrevNext  Index

1377123209.10153_0.ltw:2,a <52153B75.6070508 at coloradocollege dot edu>