BatchDrake / sigutils

Small signal processing utility library
https://batchdrake.github.io/sigutils
GNU General Public License v3.0
71 stars 29 forks source link

Volk makes the build fail #16

Closed mehdideveloper closed 4 years ago

mehdideveloper commented 4 years ago

Hey I am trying to build sigutils on two MacBooks from the develop branch. The main difference between the two systems is that one has GNURadio installed and the other does not. When I try to build on the machine with GNURadio, I get a link error:

Linking C shared library libsigutils.dylib
Undefined symbols for architecture x86_64:
  "_volk_32f_cos_32f", referenced from:
      ___su_ncqo_populate_precalc_buffer in ncqo.c.o
  "_volk_32f_sin_32f", referenced from:
      ___su_ncqo_populate_precalc_buffer in ncqo.c.o
  "_volk_32fc_32f_dot_prod_32fc", referenced from:
      ___su_iir_filt_eval in iir.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libsigutils.dylib] Error 1
make[1]: *** [CMakeFiles/sigutils.dir/all] Error 2

On the other machine, it builds without any issues. The difference between the two machine's CMake settings is that the first one has one extra entry for volk named pkgcfg_lib_VOLK_volk with the value set to /usr/local/lib/libvolk.dylib

By removing the Volk requirement from CMakeLists on the first machine, it also compiles without issues.

P.S: The linker is looking for "_volk_32f_cos_32f" while there's only "___volk_32f_cos_32f" in the libvolk.dylib

BatchDrake commented 4 years ago

Just edited CMakeLists.txt in develop to properly link against volk when found. Could you try again?

mehdideveloper commented 4 years ago

Fixed !