aubio / ofxAubio

openFrameworks addon for aubio, estimates beat, onset, pitch, and a few other things
https://aubio.org/ofxAubio
GNU General Public License v3.0
59 stars 18 forks source link

improve linux build #2

Open edne opened 8 years ago

edne commented 8 years ago

Now there are installing instructions and scripts only for the MacOs/Darwin environment

xseignard commented 8 years ago

Hello there, AFAIK, to install ofxAubio under linux (ubuntu in my case), I had to install aubio before:

sudo apt-get install libaubio-dev aubio-tools

Now it finds the aubio headers, but still cannot compile the example project.

Here is the kind of compile errors:

ofxAubioBeat.cpp:(.text+0xd4): référence indéfinie vers « new_aubio_tempo »
ofxAubioBeat.cpp:(.text+0xe8): référence indéfinie vers « aubio_tempo_set_silence »

And much more of this style (undefined reference).

Any idea? I'm running ubuntu 15.04

Regards

Xavier

jnlsn commented 8 years ago

Hey edne, I just tried your directions for Linux, but when I try building the example project, I have the following error, any ideas?

[...]/ofxAubio/src/ofxAubioOnset.cpp: In member function ‘void ofxAubioOnset::setup(std::string, int, int, int)’: [...]/ofxAubio/src/ofxAubioOnset.cpp:41:52: error: ‘aubio_onset_get_threshold’ was not declared in this scope threshold = aubio_onset_get_threshold(onset);

piem commented 8 years ago

hi all,

@edne, thanks for the patch! i'll have a look ASAP. @jayarnielsen, what version of libaubio-dev do you have installed?

jnlsn commented 8 years ago

@piem I have 0.4.0-1 installed

piem commented 8 years ago

@jayarnielsen ok, you would need 0.4.1 to get aubio_onset_get_threshold, but for now you can just remove that line and set the default threshold to 0.3 at line 41 of src/ofxAubioOnset.cpp, like so:

-        threshold = aubio_onset_get_threshold(onset);
+        threshold = 0.3; //aubio_onset_get_threshold(onset);

this should get you rolling. let us know how it goes!

jnlsn commented 8 years ago

@piem So that worked, but then I got a whole slew of new errors that I am guessing are also related to using the older 0.4.0 version.

piem commented 8 years ago

what do these errors look like?

On 2/29/16 9:40 PM, JR wrote:

@piem https://github.com/piem So that worked, but then I got a whole slew of new errors that I am guessing are also related to using the older 0.4.0 version.

— Reply to this email directly or view it on GitHub https://github.com/aubio/ofxAubio/issues/2#issuecomment-190377234.

jnlsn commented 8 years ago

@piem lots of undefined references. new_aubio_tempo, aubio_tempo_set_silence, del_aubio_tempo, aubio_temp_do, aubio_tempo_get_bpm, aubio_temp_get_last_s, and so on.

Well this is embarrassing, I guess I hadn't added the -laubio linker flag after all.