Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi i am trying to compile a program, but it gives this output:
Code:
In file included from ../src/include/impl_layers.h:48,
from freej.cpp:38:
../src/include/video_layer.h:34: error: ISO C++ forbids declaration of ‘AVPicture’ with no type
../src/include/video_layer.h:34: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:46: error: ISO C++ forbids declaration of ‘AVCodec’ with no type
../src/include/video_layer.h:46: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:47: error: ISO C++ forbids declaration of ‘AVInputFormat’ with no type
../src/include/video_layer.h:47: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:48: error: ISO C++ forbids declaration of ‘AVFormatContext’ with no type
../src/include/video_layer.h:48: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:49: error: ISO C++ forbids declaration of ‘AVStream’ with no type
../src/include/video_layer.h:49: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:50: error: ISO C++ forbids declaration of ‘AVPicture’ with no type
../src/include/video_layer.h:50: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:51: error: ‘AVPacket’ does not name a type
../src/include/video_layer.h:52: error: ISO C++ forbids declaration of ‘AVCodecContext’ with no type
../src/include/video_layer.h:52: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:53: error: ISO C++ forbids declaration of ‘AVCodec’ with no type
../src/include/video_layer.h:53: error: expected ‘;’ before ‘*’ token
../src/include/video_layer.h:54: error: ‘AVFrame’ does not name a type
../src/include/video_layer.h:100: error: ‘AVPicture’ has not been declared
../src/include/video_layer.h:103: error: ‘AVPicture’ has not been declared
../src/include/video_layer.h:104: error: ‘AVPicture’ has not been declared
make[3]: ** [freej.o] Erro 1
make[3]: Saindo do diretório `/home/livre/Desktop/AUR/freej/src/freej-0.10/src'
make[2]: ** [all-recursive] Erro 1
make[2]: Saindo do diretório `/home/livre/Desktop/AUR/freej/src/freej-0.10/src'
make[1]: ** [all-recursive] Erro 1
make[1]: Saindo do diretório `/home/livre/Desktop/AUR/freej/src/freej-0.10'
make: ** [all] Erro 2
==> ERRO: Compilação Falhou.
Abortando...
it is probably a gcc version problem, but i could make a patch. i just need to know what to type.
Those undeclared AV's are defined by ffmpeg. Do you have ffmpeg installed including the development files? If so, it may be too new. ffmpeg used to install its headers in /usr/include/ffmpeg, but that has changed to /usr/include/libavcodec. I don't know when it changed, I only know that I had problems recently trying to build a package against ffmpeg.
Looking at the freej file video_layer.h I see the following
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
If you look at the lines, where the errors start,
you will see : missing avcodec.h, avformat.h,
swscale.h
It might be solved by running the 'autogen.sh'
to make a better 'configure' EDIT. : No, 'autogen.sh' didn't solve that
problem, but solved issues appearing later.
Lines 25,26,28 in freej-x.x/src/include/video_layer.h
can be edited to
If you look at the lines, where the errors start,
you will see : missing avcodec.h, avformat.h,
swscale.h
You must have actually tried to build freej because I don't see those in the OP's post. Or am I completely losing it?
Quote:
Originally Posted by knudfl
The executeable 'freej' will look for libs in
/usr/lib only, so it might be an idea to have
--prefix=/usr
Passing --prefix=/usr to the configure script sets the prefix that freej will be installed in, not the prefix for freej to look for libraries when it is linking.
Do you have /usr/local/lib in your /etc/ld.so.conf? If so, freej should find its own library once ldconfig is executed (usually executed by the install target, but not always). If not, add it and execute ldconfig, then freej should pick up its library in /usr/local. However, there's nothing wrong with putting it in /usr.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
I'd guess, it's a gcc 4.3 problem, or more correct : the
freej code has not yet been fixed, to be used with 4.3.x
Suggest : Set up 'gcc-4.2.3' and 'g++-4.2.3' ,
then use something like
'CC=gcc-4.2.3 CXX=g++-4.2.3 ./configure --prefix=/usr'
to configure freej. (no problem having more than 1 compiler)
Replace with actual names, ( see 'ls /usr/bin | grep g++' ,
etc. ) to use the "new" compiler.
Don't know if it is necessary, but you can do likewise
with 'make' : 'CC=gcc-4.2.3 CXX=g++-4.2.3 make'
....
I'd guess, it's a gcc 4.3 problem, or more correct : the
freej code has not yet been fixed, to be used with 4.3.x
Suggest : Set up 'gcc-4.2.3' and 'g++-4.2.3' ,
then use something like
'CC=gcc-4.2.3 CXX=g++-4.2.3 ./configure --prefix=/usr'
to configure freej. (no problem having more than 1 compiler)
Replace with actual names, ( see 'ls /usr/bin | grep g++' ,
etc. ) to use the "new" compiler.
Don't know if it is necessary, but you can do likewise
with 'make' : 'CC=gcc-4.2.3 CXX=g++-4.2.3 make'
....
hmm seems to be a bit complicated for me.
but couldnt it be just a problem with ffmpeg's img_convert?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.