miegl / PiFmAdv

Advanced Raspberry Pi FM transmitter with RDS encoding
GNU General Public License v3.0
484 stars 82 forks source link

Additional library needed for soxr.h #90

Closed profiluefter closed 2 years ago

profiluefter commented 2 years ago

Hi, I just tried to compile this on a fresh Raspberry Pi OS (2022-01-28) and got this message while compiling:

pi@raspberrypi:~/PiFmAdv/src $ make
gcc -Wall -Wno-multichar -std=gnu99 -c -O2 -march=armv7-a -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -ffast-math -DRASPI=2 rds.c
rds.c: In function ‘set_rds_rt’:
rds.c:240:5: warning: ‘strncpy’ specified bound 64 equals destination size [-Wstringop-truncation]
  240 |     strncpy(rds_params.rt, rt, 64);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rds.c: In function ‘set_rds_ps’:
rds.c:247:5: warning: ‘strncpy’ specified bound 8 equals destination size [-Wstringop-truncation]
  247 |     strncpy(rds_params.ps, ps, 8);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -Wall -Wno-multichar -std=gnu99 -c -O2 -march=armv7-a -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -ffast-math -DRASPI=2 waveforms.c
gcc -Wall -Wno-multichar -std=gnu99 -c -O2 -march=armv7-a -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -ffast-math -DRASPI=2   -c -o pi_fm_adv.o pi_fm_adv.c
gcc -Wall -Wno-multichar -std=gnu99 -c -O2 -march=armv7-a -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -ffast-math -DRASPI=2 fm_mpx.c
fm_mpx.c:13:10: fatal error: soxr.h: No such file or directory
   13 | #include <soxr.h>
      |          ^~~~~~~~
compilation terminated.
make: *** [Makefile:54: fm_mpx.o] Error 1

I then installed the libsoxr-dev package with sudo apt install libsoxr-dev and it compiled successfully afterwards. Could you update the install instructions in the README?

ryanginn commented 2 years ago

Thank you so much! That worked!

miegl commented 2 years ago

Fixed with https://github.com/miegl/PiFmAdv/commit/be57ad4a7d8932cb3400e4f013a870f45053e02c.