<div dir="ltr"><div>Solved! I can push the required changes.</div><div><br></div><div>the failing command : </div><div><br></div><div><font face="courier new, monospace">/bin/sh ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"java-aubio\" -DPACKAGE_TARNAME=\"java-aubio\" -DPACKAGE_VERSION=\"0.2\" -DPACKAGE_STRING=\"java-aubio\ 0.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/ -I/usr/local/Cellar/aubio/0.4.1/include -Wno-strict-aliasing <font color="#999999">-I/usr/lib/jvm/java-6-sun-1.6.0.04/include -I/usr/local/lib/jvm/java-6-sun-1.6.0.04/include -I/usr/lib/jvm/java-6-sun-1.6.0.04/include/linux -I/usr/local/lib/jvm/java-6-sun-1.6.0.04/include/linux</font> -I/usr/include -I/usr/local/include -g -O2 -MT aubio_wrap.lo -MD -MP -MF .deps/aubio_wrap.Tpo -c -o aubio_wrap.lo aubio_wrap.c</font><br></div><div><br></div><div><div><font face="courier new, monospace">libtool: compile: gcc -DPACKAGE_NAME=\"java-aubio\" -DPACKAGE_TARNAME=\"java-aubio\" -DPACKAGE_VERSION=\"0.2\" "-DPACKAGE_STRING=\"java-aubio 0.2\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers <b>-I/usr/local/Cellar/aubio/0.4.1/include</b> -Wno-strict-aliasing -I/usr/lib/jvm/java-6-sun-1.6.0.04/include -I/usr/local/lib/jvm/java-6-sun-1.6.0.04/include -I/usr/lib/jvm/java-6-sun-1.6.0.04/include/linux -I/usr/local/lib/jvm/java-6-sun-1.6.0.04/include/linux -I/usr/include -I/usr/local/include -g -O2 -MT aubio_wrap.lo -MD -MP -MF .deps/aubio_wrap.Tpo -c aubio_wrap.c -fno-common -DPIC -o .libs/aubio_wrap.o</font></div></div><div><br></div><div>looking at /usr/local/Cellar/aubio/0.4.1/include/aubio/aubio.h<br></div><div>...</div><div>fvec_t * new_fvec(uint_t length);</div><div>...</div><div><br></div><div>While the generated aubio_wrap.c tries to call : </div><div><br></div><div><div>SWIGEXPORT jlong JNICALL Java_aubiowrapperJNI_new_1fvec(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {</div><div> jlong jresult = 0 ;</div><div> uint_t arg1 ;</div><div> uint_t arg2 ;</div><div> fvec_t *result = 0 ;</div><div> </div><div> (void)jenv;</div><div> (void)jcls;</div><div> arg1 = (uint_t)jarg1; </div><div> arg2 = (uint_t)jarg2; </div><div><b> result = (fvec_t *)new_fvec(arg1,arg2);</b></div><div> *(fvec_t **)&jresult = result; </div><div> return jresult;</div><div>}</div></div><div><br></div><div>So I fixed the build by removing all uint_t channels arguments in aubio.i (see below)</div><div><br></div><div>Also needed to erase all generated files and run autoreconf --install</div><div><br></div><div><br></div><div><br></div><div><div>%module aubiowrapper</div><div><br></div><div>%{</div><div>#include <aubio/aubio.h></div><div>%}</div><div><br></div><div>/* type aliases */</div><div>typedef unsigned int uint_t;</div><div>typedef int sint_t;</div><div>typedef float smpl_t;</div><div><br></div><div>/* fvec */</div><div>fvec_t * new_fvec(uint_t length);//, uint_t channels);</div><div>void del_fvec(fvec_t *s);</div><div>smpl_t fvec_read_sample(fvec_t *s, uint_t channel, uint_t position);</div><div>void fvec_write_sample(fvec_t *s, smpl_t data, uint_t channel, uint_t position);</div><div>smpl_t * fvec_get_channel(fvec_t *s);//, uint_t channel);</div><div>void fvec_put_channel(fvec_t *s, smpl_t * data, uint_t channel);</div><div>smpl_t ** fvec_get_data(fvec_t *s);</div><div><br></div><div>/* cvec */</div><div>cvec_t * new_cvec(uint_t length);//, uint_t channels);</div><div>void del_cvec(cvec_t *s);</div><div>void cvec_write_norm(cvec_t *s, smpl_t data, uint_t channel, uint_t position);</div><div>void cvec_write_phas(cvec_t *s, smpl_t data, uint_t channel, uint_t position);</div><div>smpl_t cvec_read_norm(cvec_t *s, uint_t channel, uint_t position);</div><div>smpl_t cvec_read_phas(cvec_t *s, uint_t channel, uint_t position);</div><div>void cvec_put_norm_channel(cvec_t *s, smpl_t * data, uint_t channel);</div><div>void cvec_put_phas_channel(cvec_t *s, smpl_t * data, uint_t channel);</div><div>smpl_t * cvec_get_norm_channel(cvec_t *s, uint_t channel);</div><div>smpl_t * cvec_get_phas_channel(cvec_t *s, uint_t channel);</div><div>smpl_t ** cvec_get_norm(cvec_t *s);</div><div>smpl_t ** cvec_get_phas(cvec_t *s);</div><div><br></div><div><br></div><div>/* fft */</div><div>aubio_fft_t * new_aubio_fft(uint_t size);//, uint_t channels);</div><div>void del_aubio_fft(aubio_fft_t * s);</div><div>void aubio_fft_do (aubio_fft_t *s, fvec_t * input, cvec_t * spectrum);</div><div>void aubio_fft_rdo (aubio_fft_t *s, cvec_t * spectrum, fvec_t * output);</div><div>void aubio_fft_do_complex (aubio_fft_t *s, fvec_t * input, fvec_t * compspec);</div><div>void aubio_fft_rdo_complex (aubio_fft_t *s, fvec_t * compspec, fvec_t * output);</div><div>void aubio_fft_get_spectrum(fvec_t * compspec, cvec_t * spectrum);</div><div>void aubio_fft_get_realimag(cvec_t * spectrum, fvec_t * compspec);</div><div>void aubio_fft_get_phas(fvec_t * compspec, cvec_t * spectrum);</div><div>void aubio_fft_get_imag(cvec_t * spectrum, fvec_t * compspec);</div><div>void aubio_fft_get_norm(fvec_t * compspec, cvec_t * spectrum);</div><div>void aubio_fft_get_real(cvec_t * spectrum, fvec_t * compspec);</div><div><br></div><div>/* filter */</div><div>aubio_filter_t * new_aubio_filter(uint_t order);//, uint_t channels);</div><div>void aubio_filter_do(aubio_filter_t * b, fvec_t * in);</div><div>void aubio_filter_do_outplace(aubio_filter_t * b, fvec_t * in, fvec_t * out);</div><div>void aubio_filter_do_filtfilt(aubio_filter_t * b, fvec_t * in, fvec_t * tmp);</div><div>void del_aubio_filter(aubio_filter_t * b);</div><div><br></div><div>/* a_weighting */</div><div>aubio_filter_t * new_aubio_filter_a_weighting ( uint_t samplerate); /*uint_t channels,*/</div><div>uint_t aubio_filter_set_a_weighting (aubio_filter_t * b, uint_t samplerate);</div><div><br></div><div>/* c_weighting */</div><div>aubio_filter_t * new_aubio_filter_c_weighting ( uint_t samplerate); /*uint_t channels,*/</div><div>uint_t aubio_filter_set_c_weighting (aubio_filter_t * b, uint_t samplerate);</div><div><br></div><div>/* biquad */</div><div>aubio_filter_t * new_aubio_filter_biquad(lsmp_t b1, lsmp_t b2, lsmp_t b3, lsmp_t a2, lsmp_t a3);//, uint_t channels);</div><div>uint_t aubio_filter_set_biquad (aubio_filter_t * b, lsmp_t b1, lsmp_t b2, lsmp_t b3, lsmp_t a2, lsmp_t a3);</div><div><br></div><div>/* mathutils */</div><div>fvec_t * new_aubio_window(char * wintype, uint_t size);</div><div>smpl_t aubio_unwrap2pi (smpl_t phase);</div><div>smpl_t aubio_bintomidi(smpl_t bin, smpl_t samplerate, smpl_t fftsize);</div><div>smpl_t aubio_miditobin(smpl_t midi, smpl_t samplerate, smpl_t fftsize);</div><div>smpl_t aubio_bintofreq(smpl_t bin, smpl_t samplerate, smpl_t fftsize);</div><div>smpl_t aubio_freqtobin(smpl_t freq, smpl_t samplerate, smpl_t fftsize);</div><div>smpl_t aubio_freqtomidi(smpl_t freq);</div><div>smpl_t aubio_miditofreq(smpl_t midi);</div><div>uint_t aubio_silence_detection(fvec_t * ibuf, smpl_t threshold);</div><div>smpl_t aubio_level_detection(fvec_t * ibuf, smpl_t threshold);</div><div>smpl_t aubio_zero_crossing_rate(fvec_t * input);</div><div><br></div><div>/* mfcc */</div><div>aubio_mfcc_t * new_aubio_mfcc (uint_t win_s, uint_t samplerate, uint_t n_filters, uint_t n_coefs);</div><div>void del_aubio_mfcc(aubio_mfcc_t *mf);</div><div>void aubio_mfcc_do(aubio_mfcc_t *mf, cvec_t *in, fvec_t *out);</div><div><br></div><div>/* pvoc */</div><div>aubio_pvoc_t * new_aubio_pvoc (uint_t win_s, uint_t hop_s);//, uint_t channels);</div><div>void del_aubio_pvoc(aubio_pvoc_t *pv);</div><div>void aubio_pvoc_do(aubio_pvoc_t *pv, fvec_t *in, cvec_t * fftgrain);</div><div>void aubio_pvoc_rdo(aubio_pvoc_t *pv, cvec_t * fftgrain, fvec_t *out);</div><div><br></div><div>/* pitch detection */</div><div>aubio_pitch_t *new_aubio_pitch (char *pitch_mode,</div><div> uint_t bufsize, uint_t hopsize, uint_t samplerate); /*uint_t channels,*/</div><div>void aubio_pitch_do (aubio_pitch_t * p, fvec_t * ibuf, fvec_t * obuf);</div><div>uint_t aubio_pitch_set_tolerance(aubio_pitch_t *p, smpl_t thres);</div><div>uint_t aubio_pitch_set_unit(aubio_pitch_t *p, char * pitch_unit);</div><div>void del_aubio_pitch(aubio_pitch_t * p);</div><div><br></div><div>/* tempo */</div><div>aubio_tempo_t * new_aubio_tempo (char_t * mode,</div><div> uint_t buf_size, uint_t hop_size, uint_t samplerate); // uint_t channels, </div><div>void aubio_tempo_do (aubio_tempo_t *o, fvec_t * input, fvec_t * tempo);</div><div>uint_t aubio_tempo_set_silence(aubio_tempo_t * o, smpl_t silence);</div><div>uint_t aubio_tempo_set_threshold(aubio_tempo_t * o, smpl_t threshold);</div><div>smpl_t aubio_tempo_get_bpm(aubio_tempo_t * bt);</div><div>smpl_t aubio_tempo_get_confidence(aubio_tempo_t * bt);</div><div>void del_aubio_tempo(aubio_tempo_t * o);</div></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-13 14:15 GMT+02:00 Martin Pernollet <span dir="ltr"><<a href="mailto:martin.pernollet@gmail.com" target="_blank">martin.pernollet@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Thanks for sharing this great framework!</div><div><br></div><div>I am trying to build java-aubio on MacOSX (10.8.5).</div><div><br></div><div>While running make, there are build error such as :</div><div><div><font face="courier new, monospace">aubio_wrap.c: In function 'Java_aubiowrapperJNI_new_1fvec':</font></div><div><font face="courier new, monospace">aubio_wrap.c:207: error: too many arguments to function 'new_fvec'</font></div><div><i>(see full error stack at end of mail)</i></div></div><div><br></div><div>Here were my steps to prepare the build :</div><div><br></div><div><i>Get latest binaries</i></div><div><div><font face="courier new, monospace">$ brew install aubio</font></div><div><font face="courier new, monospace">==> Downloading <a href="https://downloads.sf.net/project/machomebrew/Bottles/aubio-0.4.1.mountain_lion.bottle.tar.gz" target="_blank">https://downloads.sf.net/project/machomebrew/Bottles/aubio-0.4.1.mountain_lion.bottle.tar.gz</a></font></div><div><font face="courier new, monospace">######################################################################## 100,0%</font></div><div><font face="courier new, monospace">==> Pouring aubio-0.4.1.mountain_lion.bottle.tar.gz</font></div><div><font face="courier new, monospace"> /usr/local/Cellar/aubio/0.4.1: 61 files, 808K</font></div></div><div><br></div><div><br></div><div><i>Make jni.h be visible to gcc</i></div><div><div><font face="courier new, monospace">$ export CPPFLAGS=-I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/</font></div></div><div><br></div><div><div>NOTE : this step should be mentioned in the read me. I can commit an update if you want.</div></div><div><br></div><div><i>I also tried other jni.h folders listed with</i></div><div><div><font face="courier new, monospace">$ locate jni.h</font></div><div><font face="courier new, monospace">/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni.h</font></div><div><font face="courier new, monospace">/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni.h</font></div><div><font face="courier new, monospace">/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni.h</font></div></div><div><br></div><div><i>Build</i></div><div><font face="courier new, monospace">$ ./configure && make</font><br></div><div><br></div><div>And got this build error. Do you have any suggestions?</div><div><br></div><div>Thanks in advance for your help!</div><div><br></div><div>Martin</div><div><br></div><div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_new_1fvec':</div><div>aubio_wrap.c:207: error: too many arguments to function 'new_fvec'</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_fvec_1get_1channel':</div><div>aubio_wrap.c:267: warning: cast to pointer from integer of different size</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_new_1cvec':</div><div>aubio_wrap.c:311: error: too many arguments to function 'new_cvec'</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_cvec_1get_1norm_1channel':</div><div>aubio_wrap.c:433: warning: cast to pointer from integer of different size</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_cvec_1get_1phas_1channel':</div><div>aubio_wrap.c:449: warning: cast to pointer from integer of different size</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_cvec_1get_1norm':</div><div>aubio_wrap.c:463: warning: cast to pointer from integer of different size</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_cvec_1get_1phas':</div><div>aubio_wrap.c:477: warning: cast to pointer from integer of different size</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_new_1aubio_1fft':</div><div>aubio_wrap.c:493: error: too many arguments to function 'new_aubio_fft'</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_new_1aubio_1filter':</div><div>aubio_wrap.c:647: error: too many arguments to function 'new_aubio_filter'</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_new_1aubio_1filter_1a_1weighting':</div><div>aubio_wrap.c:713: error: too many arguments to function 'new_aubio_filter_a_weighting'</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_new_1aubio_1filter_1c_1weighting':</div><div>aubio_wrap.c:745: error: too many arguments to function 'new_aubio_filter_c_weighting'</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_new_1aubio_1filter_1biquad':</div><div>aubio_wrap.c:815: error: too many arguments to function 'new_aubio_filter_biquad'</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_new_1aubio_1pvoc':</div><div>aubio_wrap.c:1112: error: too many arguments to function 'new_aubio_pvoc'</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_new_1aubio_1pitch':</div><div>aubio_wrap.c:1176: error: too many arguments to function 'new_aubio_pitch'</div><div>aubio_wrap.c: In function 'Java_aubiowrapperJNI_new_1aubio_1tempo':</div><div>aubio_wrap.c:1260: error: too many arguments to function 'new_aubio_tempo'</div></div></div>
</blockquote></div><br></div>