You are not logged in.

#1 11-17-2015 00:58:14

igor_ubuntu
Membre
Registered: 11-17-2015
Posts: 10

compilation error (2.1) - fatal error: libavutil/audioconvert.h:

Hi.
In my old ubuntu 10.10 I have new (last) ffmpeg and libx264
I try compile ffdiaporama. The compilation occurs and is completed, but during it I get an error.

.. ..
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -DSHARE_DIR=\"/usr\" -DQ_OS_LINUX32 -DUSETAGLIB -DHAVE_CONFIG_H -DTAGLIB_STATIC -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/qt4/QtHelp -I../ffDiaporama_lib -I/usr/include -I. -I. -o cCustomSlideTable.o MainWindow/cCustomSlideTable.cpp
In file included from ./engine/cApplicationConfig.h:42,
                 from ./engine/_Transition.h:80,
                 from ./engine/_Diaporama.h:26,
                 from MainWindow/cCustomSlideTable.h:26,
                 from MainWindow/cCustomSlideTable.cpp:21:
./engine/cDeviceModelDef.h:56: fatal error: libavutil/audioconvert.h: No such file or directory
compilation terminated.
make[1]: *** [cCustomSlideTable.o] Error 1
make[1]: Leaving directory `/home/dell/Downloads/Polygon/ffDiaporama/src/ffDiaporama'
make: *** [sub-src-ffDiaporama-make_default] Error 2
make: *** Waiting for unfinished jobs...
g++ -c -pipe -O2 -fPIC -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/qt4/QtHelp -I. -o cBaseAppConfig.o cBaseAppConfig.cpp
g++ -c -pipe -O2 -fPIC -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/qt4/QtHelp -I. -o cBaseBrushDefinition.o cBaseBrushDefinition.cpp
..


How can I fix this? Is it possible ?

Offline

#2 11-17-2015 10:46:22

gerd1028
Membre
Registered: 05-09-2014
Posts: 35

Re: compilation error (2.1) - fatal error: libavutil/audioconvert.h:

Hi,
audioconvert.h is obsolete.
Just drop the include in cDeviceModelDef.h.

Offline

#3 11-17-2015 11:37:25

igor_ubuntu
Membre
Registered: 11-17-2015
Posts: 10

Re: compilation error (2.1) - fatal error: libavutil/audioconvert.h:

gerd1028 wrote:

Hi,
audioconvert.h is obsolete.
Just drop the include in cDeviceModelDef.h.

How to do it ? Please, explain in detail.

Offline

#4 11-17-2015 12:07:34

gerd1028
Membre
Registered: 05-09-2014
Posts: 35

Re: compilation error (2.1) - fatal error: libavutil/audioconvert.h:

???
Are you kidding me?
Should i really explain how to delete a line of code in a header file?

Offline

#5 11-17-2015 13:08:29

igor_ubuntu
Membre
Registered: 11-17-2015
Posts: 10

Re: compilation error (2.1) - fatal error: libavutil/audioconvert.h:

gerd1028 wrote:

???
Are you kidding me?
Should i really explain how to delete a line of code in a header file?

I'm just not accurate asked. I meant address ..
Ok.
In
/src/ffDiaporama/engine/cDeviceModelDef.h   I had to delete
#include "libavutil/audioconvert.h:
and
#include "libavfilter/avcodec.h"

But I have new error

g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/qt4/QtHelp -I. -o moc_cBaseAppConfig.o moc_cBaseAppConfig.cpp
DlgRenderVideo/DlgRenderVideo.cpp: In member function ‘void DlgRenderVideo::s_DeviceModelCB(int)’:
DlgRenderVideo/DlgRenderVideo.cpp:747: error: ‘CODEC_ID_AMR_WB’ was not declared in this scope
DlgRenderVideo/DlgRenderVideo.cpp:750: error: ‘CODEC_ID_AMR_NB’ was not declared in this scope
DlgRenderVideo/DlgRenderVideo.cpp: In member function ‘void DlgRenderVideo::StartEncode()’:
DlgRenderVideo/DlgRenderVideo.cpp:959: error: ‘CODEC_ID_AMR_WB’ was not declared in this scope
DlgRenderVideo/DlgRenderVideo.cpp:962: error: ‘CODEC_ID_AMR_NB’ was not declared in this scope
DlgRenderVideo/DlgRenderVideo.cpp:980: error: ‘CODEC_ID_PCM_S16LE’ was not declared in this scope
DlgRenderVideo/DlgRenderVideo.cpp:990: error: ‘CODEC_ID_PCM_S16LE’ was not declared in this scope
DlgRenderVideo/DlgRenderVideo.cpp:1026: error: ‘CODEC_ID_NONE’ was not declared in this scope
make[1]: *** [DlgRenderVideo.o] Error 1
make[1]: *** Waiting for unfinished jobs...
g++ -c -pipe -O2 -fPIC -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/qt4/QtHelp -I. -o moc_cBrushComboBox.o moc_cBrushComboBox.cpp
g++ -c -pipe -O2 -fPIC -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/qt4/QtHelp -I. -o moc_cColorComboBox.o moc_cColorComboBox.cpp
make[1]: Leaving directory `/home/user/Downloads/ffDiaporama/src/ffDiaporama'
make: *** [sub-src-ffDiaporama-make_default] Error 2
make: ***  Waiting for unfinished jobs...
g++ -c -pipe -O2 -fPIC -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/qt4/QtHelp -I. -o moc_cGrdOrientationComboBox.o moc_cGrdOrientationComboBox.cpp
========================

gerd1028 wrote:

audioconvert.h is obsolete.

I wonder why ? I have 2.8 ffmpeg.  2.8-ffmpeg include  audioconvert.h .. And avcodec.h ..

Offline

#6 11-17-2015 13:47:24

gerd1028
Membre
Registered: 05-09-2014
Posts: 35

Re: compilation error (2.1) - fatal error: libavutil/audioconvert.h:

Hi,

audioconvert.h is an internal header file for ffmpeg, so its not installed in the public include-path if you install ffmpeg.
Never told you to delete the include of avcodec.h, thats a really bad idea.

Looking into your logs i see that there is no path to the ffmpeg includes. Did you build and install ffmpeg correctly? Have you called qmake for ffdiaporama after building and installing ffmpeg ? Are there any errors/messages about ffmpeg when you call qmake for ffdiaporama?

gerd

Offline

#7 11-17-2015 19:13:52

igor_ubuntu
Membre
Registered: 11-17-2015
Posts: 10

Re: compilation error (2.1) - fatal error: libavutil/audioconvert.h:

gerd1028 wrote:

Never told you to delete the include of avcodec.h, thats a really bad idea.

I removed this line because I got a mistake

In file included from ./engine/cApplicationConfig.h:42,
                 from ./engine/_Transition.h:80,
                 from ./engine/_Diaporama.h:26,
                 from MainWindow/cCustomSlideTable.h:26,
                 from MainWindow/cCustomSlideTable.cpp:21:
./engine/cDeviceModelDef.h:87: fatal error: libavfilter/avcodec.h: No such file or directory
compilation terminated.
make[1]: *** [cCustomSlideTable.o] Error 1
make[1]: Leaving directory `/home/user/ffDiaporama/src/ffDiaporama'
make: *** [sub-src-ffDiaporama-make_default] Error 2
make: *** Waiting for unfinished jobs...
g++ -c -pipe -O2 -fPIC -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/qt4/QtHelp -I. -o cBaseBrushDefinition.o cBaseBrushDefinition.cpp

gerd1028 wrote:

Looking into your logs i see that there is no path to the ffmpeg includes. Did you build and install ffmpeg correctly? Have you called qmake for ffdiaporama after building and installing ffmpeg ? Are there any errors/messages about ffmpeg when you call qmake for ffdiaporama?


Yes, qmake for ffdiaporama after building and installing ffmpeg
$ qmake ffDiaporama.pro /PREFIX=/usr
Project MESSAGE: Install to : /usr
$:

:~$ ffmpeg -version
ffmpeg version N-76674-g7ad698e Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5.1)
configuration: --prefix=/usr/local --enable-shared --disable-static --enable-gpl --enable-nonfree --enable-libass --enable-libfreetype --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --enable-x11grab --enable-libgsm --enable-swscale --disable-stripping --enable-pthreads --enable-libx264 --enable-libfdk-aac --enable-libmp3lame --enable-avfilter --enable-libschroedinger --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3
libavutil      55.  6.100 / 55.  6.100
libavcodec     57. 15.100 / 57. 15.100
libavformat    57. 14.100 / 57. 14.100
libavdevice    57.  0.100 / 57.  0.100
libavfilter     6. 15.100 /  6. 15.100
libswscale      4.  0.100 /  4.  0.100
libswresample   2.  0.101 /  2.  0.101
libpostproc    54.  0.100 / 54.  0.100
:~$

gerd1028 wrote:

Hi,
audioconvert.h is an internal header file for ffmpeg, so its not installed in the public include-path if you install ffmpeg.

Maybe I should additionally upgrade my old-packages libav* from ubuntu 10.10?

Offline

#8 11-17-2015 20:06:31

gerd1028
Membre
Registered: 05-09-2014
Posts: 35

Re: compilation error (2.1) - fatal error: libavutil/audioconvert.h:

ffmpeg version N-76674-g7ad698e Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5.1)
configuration: --prefix=/usr/local --enable-shared --disable-static --enable-gpl --enable-nonfree --enable-libass --enable-libfreetype --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --enable-x11grab --enable-libgsm --enable-swscale --disable-stripping --enable-pthreads --enable-libx264 --enable-libfdk-aac --enable-libmp3lame --enable-avfilter --enable-libschroedinger --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3

you have build and installed your ffmpeg into /usr/local/....
This is not honored by the ffDiaporama project file.

For your setup you have to change the ffDiaporama.pro file in src/ffFiaporama.

try to replace this

        exists(/opt/ffmpeg/include/libswresample/swresample.h) {         #------ conditionnaly includes from Sam Rog packages for Ubuntu
            message("Use SAM ROG Packages from /opt/ffmpeg")
            INCLUDEPATH += /opt/ffmpeg/include/
            LIBS        += -L"/opt/ffmpeg/lib"
            DEFINES += USELIBSWRESAMPLE
            LIBS    += -lswresample                                             #------ conditionnaly include libswresample
        } else:exists(/usr/include/ffmpeg/libswresample/swresample.h) {         #------ Specific for Fedora
            message("Use ffmpeg in /usr/include/ffmpeg")

with something like this:

        exists(/opt/ffmpeg/include/libswresample/swresample.h) {         #------ conditionnaly includes from Sam Rog packages for Ubuntu
            message("Use SAM ROG Packages from /opt/ffmpeg")
            INCLUDEPATH += /opt/ffmpeg/include/
            LIBS        += -L"/opt/ffmpeg/lib"
            DEFINES += USELIBSWRESAMPLE
            LIBS    += -lswresample                                             #------ conditionnaly include libswresample
        } else:exists(/usr/local/include/ffmpeg/libswresample/swresample.h) {         #------ Specific for igor
            message("Use ffmpeg in /usr/local/include/ffmpeg")
            DEFINES += USELIBSWRESAMPLE
            LIBS        += -L"/usr/local/lib/ffmpeg/lib"
            INCLUDEPATH += /usr/local/include/ffmpeg/
            LIBS    += -lswresample                                             #------ conditionnaly include libswresample
        } else:exists(/usr/include/ffmpeg/libswresample/swresample.h) {         #------ Specific for Fedora
            message("Use ffmpeg in /usr/include/ffmpeg")

hope that helps

gerd

Offline

#9 11-17-2015 21:21:42

igor_ubuntu
Membre
Registered: 11-17-2015
Posts: 10

Re: compilation error (2.1) - fatal error: libavutil/audioconvert.h:

Unfortunately, it does not work.
https://www.dropbox.com/s/ewhn4zflvtrwy8a/ffD.png?dl=0


DlgRenderVideo/DlgRenderVideo.cpp: In member function ‘void DlgRenderVideo::s_DeviceModelCB(int)’:
DlgRenderVideo/DlgRenderVideo.cpp:747: error: ‘CODEC_ID_AMR_WB’ was not declared in this scope
DlgRenderVideo/DlgRenderVideo.cpp:750: error: ‘CODEC_ID_AMR_NB’ was not declared in this scope
DlgRenderVideo/DlgRenderVideo.cpp: In member function ‘void DlgRenderVideo::StartEncode()’:
DlgRenderVideo/DlgRenderVideo.cpp:959: error: ‘CODEC_ID_AMR_WB’ was not declared in this scope
DlgRenderVideo/DlgRenderVideo.cpp:962: error: ‘CODEC_ID_AMR_NB’ was not declared in this scope
DlgRenderVideo/DlgRenderVideo.cpp:980: error: ‘CODEC_ID_PCM_S16LE’ was not declared in this scope
DlgRenderVideo/DlgRenderVideo.cpp:990: error: ‘CODEC_ID_PCM_S16LE’ was not declared in this scope
DlgRenderVideo/DlgRenderVideo.cpp:1026: error: ‘CODEC_ID_NONE’ was not declared in this scope
make[1]: *** [DlgRenderVideo.o] Error 1

Offline

#10 11-17-2015 21:49:12

gerd1028
Membre
Registered: 05-09-2014
Posts: 35

Re: compilation error (2.1) - fatal error: libavutil/audioconvert.h:

in
src/ffdiaporama/engine/cDeviceModelDef.h
is this block:

#if !defined(FF_API_CODEC_ID)
    #define AV_CODEC_ID_NONE        CODEC_ID_NONE
    #define AV_CODEC_ID_MJPEG       CODEC_ID_MJPEG
    #define AV_CODEC_ID_MPEG2VIDEO  CODEC_ID_MPEG2VIDEO
    #define AV_CODEC_ID_MPEG4       CODEC_ID_MPEG4
    #define AV_CODEC_ID_H264        CODEC_ID_H264
    #define AV_CODEC_ID_VP8         CODEC_ID_VP8
    #define AV_CODEC_ID_FLV1        CODEC_ID_FLV1
    #define AV_CODEC_ID_THEORA      CODEC_ID_THEORA
    #define AV_CODEC_ID_WMV1        CODEC_ID_WMV1
    #define AV_CODEC_ID_WMV2        CODEC_ID_WMV2
    #define AV_CODEC_ID_WMV3        CODEC_ID_WMV3
    #define AV_CODEC_ID_PCM_S16LE   CODEC_ID_PCM_S16LE
    #define AV_CODEC_ID_MP3         CODEC_ID_MP3
    #define AV_CODEC_ID_AAC         CODEC_ID_AAC
    #define AV_CODEC_ID_AC3         CODEC_ID_AC3
    #define AV_CODEC_ID_VORBIS      CODEC_ID_VORBIS
    #define AV_CODEC_ID_MP2         CODEC_ID_MP2
    #define AV_CODEC_ID_AMR_WB      CODEC_ID_AMR_WB
    #define AV_CODEC_ID_AMR_NB      CODEC_ID_AMR_NB
    #define AV_CODEC_ID_FLAC        CODEC_ID_FLAC
    #define AV_CODEC_ID_WMAV1       CODEC_ID_WMAV1
    #define AV_CODEC_ID_WMAV2       CODEC_ID_WMAV2
#endif

This block should be completely removed (or marked as comment)

Offline

#11 11-17-2015 22:11:16

igor_ubuntu
Membre
Registered: 11-17-2015
Posts: 10

Re: compilation error (2.1) - fatal error: libavutil/audioconvert.h:

:-)

...
/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/qt4/QtHelp -I../ffDiaporama_lib -I/usr/include -I. -I. -o cBaseMediaFile.o engine/cBaseMediaFile.cpp
engine/cBaseMediaFile.cpp:39: fatal error: exiv2/exiv2.hpp: No such file or directory
compilation terminated.
make[1]: *** [cBaseMediaFile.o] Error 1
make[1]: *** Waiting for unfinished jobs...
make[1]: Leaving directory`/home/user/ffDiaporama/src/ffDiaporama'
make: *** [sub-src-ffDiaporama-make_default] Error 2
$


I see in source code in engine/cBaseMediaFile.cpp
..
// EXIV2 PART
//****************************************************************************************************************************************************************
#include <exiv2/exif.hpp>
#if (EXIV2_MAJOR_VERSION>=0)||((EXIV2_MAJOR_VERSION==0)&&(EXIV2_MINOR_VERSION>20))
    #include <exiv2/exiv2.hpp>
    bool Exiv2WithPreview=true;
#else
    bool Exiv2WithPreview=false;
    #include <exiv2/image.hpp>
#endif

int  Exiv2MajorVersion=EXIV2_MAJOR_VERSION;
int  Eviv2MinorVersion=EXIV2_MINOR_VERSION;
int  Exiv2PatchVersion=EXIV2_PATCH_VERSION;

#if defined(LIBAV) && (LIBAVVERSIONINT<=8)


What I should do ?

Offline

#12 11-18-2015 01:07:37

gerd1028
Membre
Registered: 05-09-2014
Posts: 35

Re: compilation error (2.1) - fatal error: libavutil/audioconvert.h:

did you install exiv2-devel packages?
from the ffDiaporama readme that should be something like

sudo apt-get install libexiv2-dev

Offline

#13 11-18-2015 09:09:40

igor_ubuntu
Membre
Registered: 11-17-2015
Posts: 10

Re: compilation error (2.1) - fatal error: libavutil/audioconvert.h:

gerd1028 wrote:

did you install exiv2-devel packages?
from the ffDiaporama readme that should be something like

sudo apt-get install libexiv2-dev

Yes , of course.

Offline

#14 11-18-2015 14:42:32

gerd1028
Membre
Registered: 05-09-2014
Posts: 35

Re: compilation error (2.1) - fatal error: libavutil/audioconvert.h:

Try to find the exif.hpp in your include-pathes.
Try to find the exiv2.hpp in your include-pathes.
If you didn't find exiv2.hpp anywhere there seems to be something wrong with the exiv2 installation.
If you found both and they are at the same place it may help to change the line

#include <exiv2/exiv2.hpp>

to

#include <exiv2.hpp>

As this seems to bee ubuntu related i have no chance to give you more help here.

gerd

Offline

Board footer