0

I'm reposting this issue in Github in order to get more visibility.

Basically I'm trying to use liquid-dsp, I've already run the "make" command and it was successful, eventually.

But now I'm trying to run "make examples" as explained in "Installation" but I keep getting this error:

choza@chozaUbuntu:~/Documents/liquid-dsp$ make examples
gcc -lfec -lfftw3f -lc -lm   examples/agc_example.o libliquid.a   -o examples/agc_example
/usr/bin/ld: examples/agc_example.o: in function `main':
/home/choza/Documents/liquid-dsp/examples/agc_example.c:71: undefined reference to `powf'
/usr/bin/ld: /home/choza/Documents/liquid-dsp/examples/agc_example.c:94: undefined reference to `cexpf'
/usr/bin/ld: /home/choza/Documents/liquid-dsp/examples/agc_example.c:101: undefined reference to `cosf'
/usr/bin/ld: /home/choza/Documents/liquid-dsp/examples/agc_example.c:103: undefined reference to `cosf'
/usr/bin/ld: /home/choza/Documents/liquid-dsp/examples/agc_example.c:107: undefined reference to `powf'
/usr/bin/ld: /home/choza/Documents/liquid-dsp/examples/agc_example.c:158: undefined reference to `log10f'
/usr/bin/ld: /home/choza/Documents/liquid-dsp/examples/agc_example.c:157: undefined reference to `log10f'
/usr/bin/ld: /home/choza/Documents/liquid-dsp/examples/agc_example.c:156: undefined reference to `log10f'
/usr/bin/ld: /home/choza/Documents/liquid-dsp/examples/agc_example.c:155: undefined reference to `log10f'
/usr/bin/ld: libliquid.a(agc_crcf.o): in function `agc_crcf_print':
/home/choza/Documents/liquid-dsp/src/agc/src/agc.c:134: undefined reference to `log10'
/usr/bin/ld: libliquid.a(agc_crcf.o): in function `agc_crcf_set_bandwidth':
/home/choza/Documents/liquid-dsp/src/agc/src/agc.c:220: undefined reference to `sqrtf'
/usr/bin/ld: libliquid.a(agc_crcf.o): in function `agc_crcf_squelch_set_threshold':
/home/choza/Documents/liquid-dsp/src/agc/src/agc.c:354: undefined reference to `powf'
/usr/bin/ld: libliquid.a(agc_crcf.o): in function `agc_crcf_squelch_get_threshold':
/home/choza/Documents/liquid-dsp/src/agc/src/agc.c:361: undefined reference to `log10f'
/usr/bin/ld: libliquid.a(agc_crcf.o): in function `agc_crcf_estimate_input_energy':
/home/choza/Documents/liquid-dsp/src/agc/src/agc.c:399: undefined reference to `sqrtf'
/usr/bin/ld: libliquid.a(agc_crcf.o): in function `agc_crcf_estimate_gain_log':
/home/choza/Documents/liquid-dsp/src/agc/src/agc.c:431: undefined reference to `powf'
/usr/bin/ld: libliquid.a(agc_crcf.o): in function `agc_crcf_estimate_gain_true':
/home/choza/Documents/liquid-dsp/src/agc/src/agc.c:477: undefined reference to `sqrtf'
/usr/bin/ld: libliquid.a(randn.o): in function `randnf':
/home/choza/Documents/liquid-dsp/src/random/src/randn.c:44: undefined reference to `logf'
/usr/bin/ld: /home/choza/Documents/liquid-dsp/src/random/src/randn.c:44: undefined reference to `sinf'
/usr/bin/ld: /home/choza/Documents/liquid-dsp/src/random/src/randn.c:44: undefined reference to `sqrtf'
/usr/bin/ld: libliquid.a(randn.o): in function `crandnf':
/home/choza/Documents/liquid-dsp/src/random/src/randn.c:66: undefined reference to `logf'
/usr/bin/ld: /home/choza/Documents/liquid-dsp/src/random/src/randn.c:66: undefined reference to `cexpf'
/usr/bin/ld: /home/choza/Documents/liquid-dsp/src/random/src/randn.c:66: undefined reference to `sqrtf'
/usr/bin/ld: libliquid.a(randn.o): in function `randnf_pdf':
/home/choza/Documents/liquid-dsp/src/random/src/randn.c:95: undefined reference to `expf'
/usr/bin/ld: /home/choza/Documents/liquid-dsp/src/random/src/randn.c:95: undefined reference to `sqrtf'
/usr/bin/ld: libliquid.a(randn.o): in function `randnf_cdf':
/home/choza/Documents/liquid-dsp/src/random/src/randn.c:103: undefined reference to `erff'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: examples/agc_example] Error 1

I've already tried to modify the makefile, I do know that the linker flag "-lm" should be added at the end of the command, and it is.

Choza
  • 3
  • 2
  • 2
    Order of object file and libraries on the command-line matter. Put object files first, and libraries afterward. If you use the default makefile from the repository, without modifications of your own, then report this as a bug to the the repository maintainers. – Some programmer dude May 16 '22 at 17:28
  • Right, I am using the default makefile with no modifications, already posted an Issue in their Github repo, thank you. – Choza May 16 '22 at 17:33

0 Answers0