Author Topic: [Linux] make error "‘AV_CODEC_ID_H265’ was not declared in this scope"  (Read 4327 times)

Favdeacon

  • Sr. Member
  • ****
  • Posts: 129
    • View Profile
Hi,

on my Kubuntu 14.04, make aborts with this error:

Code: [Select]
src/media.cpp:1378:19: error: ‘AV_CODEC_ID_H265’ was not declared in this scope
   { FeMedia::qsv, AV_CODEC_ID_H265,       "h265_qsv",  NULL },
                   ^
make: *** [obj/media.o] Error 1

I have installed all the dependencies mentioned in the wiki:

Code: [Select]
$ sudo apt-get -y install git libsfml-dev libopenal-dev libavformat-dev libfontconfig1-dev libfreetype6-dev libswscale-dev libavresample-dev libarchive-dev libjpeg-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libjpeg-dev is already the newest version.
libopenal-dev is already the newest version.
libsfml-dev is already the newest version.
git is already the newest version.
libarchive-dev is already the newest version.
libfontconfig1-dev is already the newest version.
libfreetype6-dev is already the newest version.
libavformat-dev is already the newest version.
libavresample-dev is already the newest version.
libswscale-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I hope that it's not an issue with *buntu 14.04 …

Thanks for any advice
Favdeacon


Favdeacon

  • Sr. Member
  • ****
  • Posts: 129
    • View Profile
Update: I looked into src/media.cpp and found the line 1378 about AV_CODEC_ID_265. With this line commented out the compilation completes without errors.

It's a workaround, but since this line is part of the preprocessor directive #ifdev USE_GLES and I don't want to run the executable on embedded systems (see https://en.wikipedia.org/wiki/OpenGL_ES), it should be of no consequence for my purposes.

Any ideas how to circumvent this error without tampering in media.cpp would very welcome, though.

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
What are you trying to make (compile)? Attract mode?

Using Kubuntu you shouldn't have any problems..as it is just ubuntu..and thus supported.

Have you installed the restricted-extras package?
People want life easy..then complain about it

Favdeacon

  • Sr. Member
  • ****
  • Posts: 129
    • View Profile
Hello and thanks for the reply.

What are you trying to make (compile)? Attract mode?

Yes, as you can see from my link to the attract git wiki. I thought it obvious in this forum, but you're right, mentioning it wouldn't have hurt. :)

edit: It's the latest version 2.2.1-50.

Quote
Using Kubuntu you shouldn't have any problems..as it is just ubuntu..and thus supported.

I hope so, but although 14.04 has an EOS of 2019, many people have already moved on to 16.04, like the Ubuntu PPA for mame >0.164 or the attract mode compiling instructions for Ubuntu I linked above. So, I fear that this error may occur only on 14.04, and that the attract devs only tested it on 16.04 as, like you said, "it is just Ubuntu". This is just a educated guess, though, from my experience as a 14.04 user in a growing 16.04-only world.

In case you wonder why I don't just upgrade to 16.04: KDE Plasma 5 still has too many issues for my taste, so I plan to skip 16.04 and hope that KDE is fully usable again by the next LTS 18.04. Until then, it's "never change a running system" for me.

Quote
Have you installed the restricted-extras package?

Yes, I have. I even tried to installed it (again) for safety's sake. Same error.
« Last Edit: June 12, 2017, 11:05:11 PM by Favdeacon »

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Well I was assuming you mean AM..or you wouldn't be asking. But you know what they say about assuming. :P

Well I guess I missed that part about you running 14.04 still. There are packages for sdl mame on the website that are made for 14.04. You'll have to install the mame packages manually then lock the version. However that doesn't solve your problem...

Hmm..I'll try compiling in a VB on 14.04 I guess and see if I can help you out better..give me a couple of days?

Yes I understand the problems with plasma 5..thus why I went to another desktop...miss my kde somewhat though :(
People want life easy..then complain about it

Favdeacon

  • Sr. Member
  • ****
  • Posts: 129
    • View Profile
Well I was assuming you mean AM..or you wouldn't be asking. But you know what they say about assuming. :P

Absolutely. :)

Quote
Well I guess I missed that part about you running 14.04 still. There are packages for sdl mame on the website that are made for 14.04. You'll have to install the mame packages manually then lock the version. However that doesn't solve your problem...

Do you mean http://sdlmame.wallyweek.org/? It only has packages for 14.04 up to mame 0.164. If you have a source for later versions, bring it on. Although I already compiled mame 0.185, it would be good to know for other 14.04 users I come across.

Quote
Hmm..I'll try compiling in a VB on 14.04 I guess and see if I can help you out better..give me a couple of days?

Of course, thank you very much!