|
From: Michael H. <mlh...@ya...> - 2008-03-12 21:45:09
|
Hi, I downloaded the latest CVS snapshot of SoX version 14.0.1 to fix some build issues with ffmpeg on Linux. (See discussion thread http://thread.gmane.org/gmane.comp.audio.sox/1546.) I was able to run autoreconf -i configure --with-ffmpeg=yes successfully, but the build was broken. Specifically, I got lots of undefined symbols when it tried to build libsox_fmt_ffmpeg.la. For example, some build output: /bin/sh ../libtool --silent --tag=CC --silent --mode=link gcc -Wconversion -g -O2 -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic -lltdl -Wl, -z,defs -o libsox_fmt_ffmpeg.la -rpath /usr/local/lib/sox ffmpeg.lo libsox.la -lavformat -lavcodec -lavutil -lm /usr/local/lib/libavformat.a(mov.o): In function `mov_read_cmov': /home/mike/Projects/ctv/vendor/codec/ffmpeg/libavformat/mov.c:1190: undefined reference to `uncompress' /usr/local/lib/libavformat.a(libogg.o): In function `ogg_write_trailer': /home/mike/Projects/ctv/vendor/codec/ffmpeg/libavformat/libogg.c:143: undefined reference to `ogg_stream_flush' /home/mike/Projects/ctv/vendor/codec/ffmpeg/libavformat/libogg.c:149: undefined reference to `ogg_stream_clear' /usr/local/lib/libavformat.a(libogg.o): In function `ogg_write_packet': /home/mike/Projects/ctv/vendor/codec/ffmpeg/libavformat/libogg.c:126: undefined reference to `ogg_stream_packetin' /home/mike/Projects/ctv/vendor/codec/ffmpeg/libavformat/libogg.c:128: undefined reference to `ogg_stream_pageout' /home/mike/Projects/ctv/vendor/codec/ffmpeg/libavformat/libogg.c:111: undefined reference to `ogg_stream_flush' . . . My ffmpeg build was configured to use all sorts of other codecs (e.g. ogg, vorbis, x264, etc.) and none of these were being included on the link line above. To fix the problem, I reconfigured sox as follows, adding one extra step at the start: autoreconf -i export FFMPEG_LIBS="-lz -logg -lx264 -lfaac -lfaad -lmp3lame -lmp4v2 -lvorbis -lvorbisenc -lvorbisfile" configure --with-ffmpeg=yes make That works! Please fix the configure/Makefiles, though, in Sox if you can, to pull in the necessary libs. I do not know if that is possible... When I moved the latest package back to my Mac and tried these same steps, I got a compile error: gcc -DHAVE_CONFIG_H -I. -DLADSPA_PATH="\"/usr/local/lib/ladspa\"" -DPKGLIBDIR="\"/usr/local/lib/sox\"" -Wconversion -g -O2 -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic -MT sox.o -MD -MP -MF .deps/sox.Tpo -c -o sox.o sox.c In file included from sox.c:25: sox_i.h:107: error: ‘_FILE_OFFSET_BITS’ undeclared here (not in a function) To fix, I commented out the assert statement in sox_i.h that is causing the problem. If you could please propagate (a better fix) to the original source, that would be great. Thanks! Mike |