FreeSWITCH: mod_shout error
При компиляции с модулем mod_shout, возникает ошибка:
make[4]: Entering directory /usr/src/freeswitch/src/mod/formats/mod_shout' Makefile:803: *** You must install libmpg123-dev to build mod_shout. Stop. make[4]: Leaving directory/usr/src/freeswitch/src/mod/formats/mod_shout' make[3]: *** [mod_shout-all] Error 1 make[3]: Leaving directory /usr/src/freeswitch/src/mod' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory/usr/src/freeswitch/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/freeswitch' make: *** [all] Error 2
несмотря на то, что libmpg123-devel установлен.
В этом случает требуется экспортировать переменную оболочки PKG_CONFIG_PATH, перед выполнением ./configure:
найдем libmpg123.pc :
# find /usr/* -name 'libmpg123.pc' /usr/lib64/pkgconfig/libmpg123.pc /usr/local/lib/pkgconfig/libmpg123.pc
выполним export PKG_CONFIG_PATH= указав директории в которых нашлись libmpg123.pc
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib64/pkgconfig
а затем выполним configure и тд:
./configure
making all mod_shout
Дополнительно:
до export:
# pkg-config --libs libmpg123 -lmpg123
# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib64/pkgconfig
после:
# pkg-config --libs --cflags libmpg123 -L/usr/local/lib -I/usr/local/include -lmpg123
пути указаны в файле libmpg123.pc - Libs: -L${libdir} -lmpg123,Cflags: -I${includedir}:
# cat /usr/lib64/pkgconfig/libmpg123.pc prefix=/usr exec_prefix=/usr libdir=/usr/lib64 includedir=/usr/include Name: libmpg123 Description: An optimised MPEG Audio decoder Requires: Version: 1.15.1 Libs: -L${libdir} -lmpg123 Cflags: -I${includedir}
очевидно, что после экспорта окружения, configure записывает в Makefile:
MPG123_CFLAGS = -I/usr/local/include -lmpg123
MPG123_LIBS = -L/usr/local/lib -lmpg123
SHOUT_CFLAGS = -pthread
SHOUT_LIBS = -lshout -lvorbis -lm -ltheora -lspeex -logg