WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [ABORTED] compile error for sox at ffmpeg  (Read 5319 times)

aus9

  • Guest
[ABORTED] compile error for sox at ffmpeg
« on: December 02, 2012, 01:38:29 AM »
Hi

EDIT 2

Our current tcz for sox , thought I might look at who the current maintainers are, and the version etc. I was going to compile a higher version but am currently stumped on ffmpeg

here is my main error IMHO

Code: [Select]
BUILD OPTIONS
Debugging build............no
Distro name ...............not specified!
Dynamic loading support....yes
Pkg-config location........$(libdir)/pkgconfig
Play and rec symlinks......yes
Symlinks enabled...........yes

OPTIONAL DEVICE DRIVERS
ao (Xiph)..................yes
alsa (Linux)...............yes
coreaudio (Mac OS X).......no
sndio (OpenBSD)............no
oss........................yes
pulseaudio.................no
sunaudio...................no
waveaudio (MS-Windows).....no

OPTIONAL FILE FORMATS
amrnb......................no
amrwb......................no
ffmpeg.....................no
flac.......................yes
gsm........................yes (external)
lpc10......................yes (in-tree)
mp2/mp3....................yes
 id3tag....................yes
 lame......................yes
 lame id3tag...............yes
 dlopen lame...............no
 mad.......................yes
 dlopen mad................no
 twolame...................yes
 dlopen twolame............no
oggvorbis..................yes
sndfile....................yes
 dlopen sndfile............no
wavpack....................yes

OTHER OPTIONS
ladspa effects.............yes
magic support..............yes
png support................yes
GOMP support...............no

I may be making too many format available but IMHO mp3 is licked but not ffmpeg

The bits that I think are important are that I have attempted to load these:
Quote
tce-load -i libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev file-dev
but it seems to make no diff to the compile at the ffmpeg section

EDIT (2)
search apps for provides ffmpeg.h not found?

thanks for reading

eventually if I get help, I will do the correct thing and pm current maintainers and post a link for testing until repository issues are resolved.

As the log is too big I have changed to code box
Code: [Select]
cat config.log | grep FFMPEG
configure:15682: checking for FFMPEG
ac_cv_env_FFMPEG_CFLAGS_set=
ac_cv_env_FFMPEG_CFLAGS_value=
ac_cv_env_FFMPEG_LIBS_set=
ac_cv_env_FFMPEG_LIBS_value=
pkg_cv_FFMPEG_CFLAGS='-I/usr/local/include  '
pkg_cv_FFMPEG_LIBS='-L/usr/local/lib -lavformat -lavcodec -lavutil  '
FFMPEG_CFLAGS='-I/usr/local/include  '
FFMPEG_LIBS='-L/usr/local/lib -lavformat -lavcodec -lavutil  '
HAVE_FFMPEG_FALSE=''
HAVE_FFMPEG_TRUE='#'
STATIC_FFMPEG_FALSE=''
STATIC_FFMPEG_TRUE='#'
« Last Edit: December 11, 2012, 04:31:13 AM by aus9 »

aus9

  • Guest
Re: compile error ffmpeg
« Reply #1 on: December 02, 2012, 01:40:19 AM »
here is build if any are interested

EDIT
aaah just discovered why my earlier simple command did not work

I had tried
Code: [Select]
sox  inputfilename.wav  outputfilename.mp3

but TC does not have libmagic according to my eyesight and so can't use discovery of the file types
instead as my input file Is a 6 channel input file I have to use
Code: [Select]
sox -c 2 -t wav 6.wav -t mp3 b.mp3


EDIT
I have updated the build file to include support for libmagic as per tinypoodle's suggestion

« Last Edit: December 14, 2012, 04:06:32 AM by aus9 »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: compile error for sox at ffmpeg
« Reply #2 on: December 02, 2012, 03:17:43 PM »
libmagic is in file.tcz
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

aus9

  • Guest
Re: compile error for sox at ffmpeg
« Reply #3 on: December 02, 2012, 05:48:38 PM »
tinypoodle

thanks heaps for that, BTW I have enabled OSS in new build but not tested

any clues on the new ffmpeg versus libav*-dev issues?

aus9

  • Guest
Re: compile error for sox at ffmpeg
« Reply #4 on: December 02, 2012, 06:57:45 PM »
rather than upload a huge config.log I have a code output above and from the log for ffmpeg I have
Quote
configure:15682: checking for FFMPEG
configure:15689: $PKG_CONFIG --exists --print-errors "libavformat libavcodec libavutil"
configure:15692: $? = 0
configure:15705: $PKG_CONFIG --exists --print-errors "libavformat libavcodec libavutil"
configure:15708: $? = 0
configure:15745: result: yes
configure:15779: checking libavformat/avformat.h usability
configure:15779: gcc -c -march=i486 -mtune=i686 -Os -pipe -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic -I/usr/local/include    -I/usr/local/include   conftest.c >&5
configure:15779: $? = 0
configure:15779: result: yes
configure:15779: checking libavformat/avformat.h presence
configure:15779: gcc -E  -I/usr/local/include   conftest.c
configure:15779: $? = 0
configure:15779: result: yes
configure:15779: checking for libavformat/avformat.h
configure:15779: result: yes
configure:15784: checking for av_open_input_file in -lavformat
configure:15809: gcc -o conftest -march=i486 -mtune=i686 -Os -pipe -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic -I/usr/local/include    -I/usr/local/include   -Wl,-O1 -Wl,-z,defs conftest.c -lavformat  -lm  -L/usr/local/lib -lavformat -lavcodec -lavutil   >&5
conftest.c:82:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
conftest.c:84:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
/tmp/cc6v9JxN.o: In function `main':
conftest.c:(.text.startup+0x10): undefined reference to `av_open_input_file'
collect2: ld returned 1 exit status
configure:15809: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "SoX"
| #define PACKAGE_TARNAME "sox"
| #define PACKAGE_VERSION "14.4.0"
| #define PACKAGE_STRING "SoX 14.4.0"
| #define PACKAGE_BUGREPORT "sox-devel@lists.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "sox"
| #define VERSION "14.4.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define STDC_HEADERS 1
| #define HAVE_FCNTL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_BYTESWAP_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TIMEB_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_UTSNAME_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_GLOB_H 1
| #define HAVE_STRCASECMP 1
| #define HAVE_STRDUP 1
| #define HAVE_POPEN 1
| #define HAVE_VSNPRINTF 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE_MKSTEMP 1
| #define HAVE_FMEMOPEN 1
| #define HAVE_LIBM 1
| #define _FILE_OFFSET_BITS 64
| #define HAVE_FSEEKO 1
| #define _LARGEFILE_SOURCE 1
| #define HAVE_LTDL_H 1
| #define HAVE_LIBLTDL 1
| #define HAVE_OMP_H 1
| #define HAVE_MAGIC 1
| #define HAVE_PNG_H 1
| #define HAVE_PNG 1
| #define HAVE_LADSPA_H 1
| #define HAVE_MAD_H 1
| #define HAVE_ID3TAG 1
| #define HAVE_LAME_LAME_H 1
| #define HAVE_LAME_ID3TAG 1
| #define HAVE_TWOLAME_H 1
| #define HAVE_GSM_GSM_H 1
| #define EXTERNAL_GSM 1
| #define HAVE_OGG_VORBIS 1
| #define STATIC_OGG_VORBIS 1
| #define HAVE_FLAC 1
| #define STATIC_FLAC 1
| #define HAVE_WAVPACK 1
| #define STATIC_WAVPACK 1
| #define HAVE_ALSA 1
| #define STATIC_ALSA 1
| #define HAVE_AO 1
| #define STATIC_AO 1
| #define HAVE_SNDFILE_H 1
| #define HAVE_SNDFILE_1_0_18 1
| #define HAVE_SFC_SET_SCALE_INT_FLOAT_WRITE 1
| #define HAVE_SNDFILE 1
| #define STATIC_SNDFILE 1
| #define HAVE_LIBAVFORMAT_AVFORMAT_H 1
| /* end confdefs.h.  */

aus9

  • Guest
Re: compile error for sox at ffmpeg
« Reply #5 on: December 10, 2012, 10:22:34 AM »
ok lets try again but different command
Code: [Select]
./configure --prefix=/usr/local --with-ffmpeg=dyn

Code: [Select]
checking for FFMPEG... yes
checking libavformat/avformat.h usability... yes
checking libavformat/avformat.h presence... yes
checking for libavformat/avformat.h... yes
checking for av_open_input_file in -lavformat... no
configure: error: in `/tmp/sox-14.4.0':
configure: error: cannot find ffmpeg
See `config.log' for more details

ok what is the check?

Probably ffmeg.m4

Quote
dnl SOX_PATH_FFMPEG
dnl cbagwell@users.sourceforge.net 1-3-2007
dnl
# SOX_PATH_FFMPEG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
# Test for libavformat, and define FFMPEG_CFLAGS and FFMPEG_LIBS
AC_DEFUN([SOX_PATH_FFMPEG],
[dnl
# Step 1: Use PKG_CHECK_MODULES if available
m4_ifdef([PKG_CHECK_MODULES],
  [# PKG_CHECK_MODULES available
  PKG_CHECK_MODULES(FFMPEG, [libavformat libavcodec libavutil],
                    have_ffmpeg="maybe",
                    have_ffmpeg="no")],
  [# Step 2: Use pkg-config manually if available
  AC_PATH_PROG([PKGCONFIG], [pkg-config], [none])
  if test "$PKGCONFIG" != "none" && `$PKGCONFIG --exists libavformat libavcodec libavutil`
  then
    FFMPEG_CFLAGS=`$PKGCONFIG --cflags libavformat`
    FFMPEG_LIBS=`$PKGCONFIG --libs libavformat libavcodec libavutil`
    have_ffmpeg="maybe"
  else
    have_ffmpeg="no"
  fi])

# Step 3: Even if pkg-config says its not installed, user may have
# manually installed libraries with no pkg-config support
if test "$have_ffmpeg" = "no"
then
  # Some packages distribute a <package>-config which we could check
  # for but libavformat doesn't have that.  We could use AC_PATH_PROG()
  # similar to above for finding pkg-config.

  # As a last resort, just hope that header and library can
  # be found in default paths and that it doesn't need
  # to link against any other libraries.
  FFMPEG_LIBS="-lavformat -lavcodec -lavutil"
  have_ffmpeg="maybe"
fi

# Even if pkg-config or similar told us how to find the library,
# do a safety check.
if test "$have_ffmpeg" != "no"
then
  ac_save_CFLAGS="$CFLAGS"
  ac_save_CPPFLAGS="$CPPFLAGS"
  ac_save_LIBS="$LIBS"
  CFLAGS="$CFLAGS $FFMPEG_CFLAGS"
  CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
  LIBS="$LIBS $FFMPEG_LIBS"
  have_ffmpeg="no"
  AC_CHECK_HEADERS([libavformat/avformat.h ffmpeg/avformat.h],
    [AC_CHECK_LIB(avformat, av_open_input_file,
      [AC_CHECK_HEADERS([libavcodec/avcodec.h ffmpeg/avcodec.h],
        [AC_CHECK_LIB(avcodec, avcodec_decode_audio3, have_ffmpeg=yes)])])
    break])
  CFLAGS="$ac_save_CFLAGS"
  CPPFAGS="$ac_save_CPPFLAGS"
  LIBS="$ac_save_LIBS"
fi

if test "$have_ffmpeg" != "yes"
then
  ifelse([$2], , :, [$2])
fi
])dnl SOX_PATH_FFMPEG

ok log snippet

Quote
configure:15682: checking for FFMPEG
configure:15689: $PKG_CONFIG --exists --print-errors "libavformat libavcodec libavutil"
configure:15692: $? = 0
configure:15705: $PKG_CONFIG --exists --print-errors "libavformat libavcodec libavutil"
configure:15708: $? = 0
configure:15745: result: yes
configure:15779: checking libavformat/avformat.h usability
configure:15779: gcc -c -g -O2 -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic -I/usr/local/include    -I/usr/local/include   conftest.c >&5
configure:15779: $? = 0
configure:15779: result: yes
configure:15779: checking libavformat/avformat.h presence
configure:15779: gcc -E  -I/usr/local/include   conftest.c
configure:15779: $? = 0
configure:15779: result: yes
configure:15779: checking for libavformat/avformat.h
configure:15779: result: yes
configure:15784: checking for av_open_input_file in -lavformat
configure:15809: gcc -o conftest -g -O2 -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic -I/usr/local/include    -I/usr/local/include    -Wl,-z,defs conftest.c -lavformat  -lm  -L/usr/local/lib -lavformat -lavcodec -lavutil   >&5
conftest.c:82:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
conftest.c:84:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
/tmp/cc6cnAl9.o: In function `main':
/tmp/sox-14.4.0/conftest.c:86: undefined reference to `av_open_input_file'
collect2: ld returned 1 exit status
configure:15809: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "SoX"
| #define PACKAGE_TARNAME "sox"
| #define PACKAGE_VERSION "14.4.0"
| #define PACKAGE_STRING "SoX 14.4.0"
| #define PACKAGE_BUGREPORT "sox-devel@lists.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "sox"
| #define VERSION "14.4.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define STDC_HEADERS 1
| #define HAVE_FCNTL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_BYTESWAP_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TIMEB_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_UTSNAME_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_GLOB_H 1
| #define HAVE_STRCASECMP 1
| #define HAVE_STRDUP 1
| #define HAVE_POPEN 1
| #define HAVE_VSNPRINTF 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE_MKSTEMP 1
| #define HAVE_FMEMOPEN 1
| #define HAVE_LIBM 1
| #define _FILE_OFFSET_BITS 64
| #define HAVE_FSEEKO 1
| #define _LARGEFILE_SOURCE 1
| #define HAVE_LTDL_H 1
| #define HAVE_LIBLTDL 1
| #define HAVE_OMP_H 1
| #define HAVE_MAGIC 1
| #define HAVE_PNG_H 1
| #define HAVE_PNG 1
| #define HAVE_LADSPA_H 1
| #define HAVE_MAD_H 1
| #define HAVE_ID3TAG 1
| #define HAVE_LAME_LAME_H 1
| #define HAVE_LAME_ID3TAG 1
| #define HAVE_TWOLAME_H 1
| #define HAVE_GSM_GSM_H 1
| #define EXTERNAL_GSM 1
| #define HAVE_OGG_VORBIS 1
| #define STATIC_OGG_VORBIS 1
| #define HAVE_FLAC 1
| #define STATIC_FLAC 1
| #define HAVE_WAVPACK 1
| #define STATIC_WAVPACK 1
| #define HAVE_ALSA 1
| #define STATIC_ALSA 1
| #define HAVE_AO 1
| #define STATIC_AO 1
| #define HAVE_SNDFILE_H 1
| #define HAVE_SNDFILE_1_0_18 1
| #define HAVE_SFC_SET_SCALE_INT_FLOAT_WRITE 1
| #define HAVE_SNDFILE 1
| #define STATIC_SNDFILE 1
| #define HAVE_LIBAVFORMAT_AVFORMAT_H 1
| /* end confdefs.h.  */
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char av_open_input_file ();
| int
| main ()
| {
| return av_open_input_file ();
|   ;
|   return 0;
| }
configure:15818: result: no
configure:15891: error: in `/tmp/sox-14.4.0':
configure:15893: error: cannot find ffmpeg
See `config.log' for more details


aus9

  • Guest
Re: compile error for sox at ffmpeg
« Reply #6 on: December 10, 2012, 06:46:48 PM »
google shows an openbsd has ffmpeg detected and he used
Quote
With CPPFLAGS/LDFLAGS, all my external audio stuff is detected OK:
env CPPFLAGS='-I/usr/local/include' LDFLAGS='-L/usr/local/lib' ./configure
http://old.nabble.com/-ANNOUNCE--SoX-14.4.0rc3-Released-td33354567.html

edit
I used env CPPFLAGS='-I/usr/local/include' LDFLAGS='-L/usr/local/lib'

no joy

when I run
Code: [Select]
./configure --help

I can see
Quote
FFMPEG_CFLAGS
              C compiler flags for FFMPEG, overriding pkg-config
  FFMPEG_LIBS linker flags for FFMPEG, overriding pkg-config

but not sure how to use them

2) I might just compile without ffmpeg as the existing one does not mention it in the info file
« Last Edit: December 10, 2012, 07:25:21 PM by aus9 »

aus9

  • Guest
Re: [ABORTED] compile error for sox at ffmpeg
« Reply #7 on: December 11, 2012, 04:31:56 AM »
compiled without ffmpeg

main conversion wav to mp3 and ogg is a success so thread now aborted

EDIT

current maintainer gives permission for me to have a go and bumping version
« Last Edit: December 11, 2012, 05:56:07 PM by aus9 »