Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variables with different names in PPSSPP causes compilation failure on Linux when using system ffmpeg from upstream [SOLVED] #7955

Closed
DistantThunder opened this issue Sep 10, 2015 · 6 comments

Comments

@DistantThunder
Copy link

Affected variables are:
PIX_FMT_RGBA and CODEC_ID_H264, respectively renamed AV_PIX_FMT_RGBA and AV_CODEC_ID_H264.

They're called there and two line onward: https://github.com/hrydgard/ppsspp/blob/master/Core/HLE/sceMpeg.cpp#L771

After renaming them, compilation was successful for me, on Arch Linux with ffmpeg compiled from git:

> ffmpeg 
ffmpeg version N-75147-g9d742d2 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 5.2.0 (GCC)
  configuration: --prefix=/usr --shlibdir=/usr/lib --pkg-config-flags=--static --disable-static --enable-gpl --enable-gnutls --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-shared --enable-x11grab --enable-avresample --enable-network --enable-protocol=tcp --enable-protocol=udp --enable-demuxer=rtsp
  libavutil      55.  1.100 / 55.  1.100
  libavcodec     57.  1.100 / 57.  1.100
  libavformat    57.  0.100 / 57.  0.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6.  1.100 /  6.  1.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
@DistantThunder DistantThunder changed the title Renamed variables in latest FFMPEG sources causes compilation failure on Linux when using "system ffmpeg" Renamed variables in latest FFMPEG sources causes compilation failure on Linux when using system ffmpeg Sep 10, 2015
@hrydgard
Copy link
Owner

Ugh, what a pain.

Although, I suppose you could just #define the new names into the old ones, as a workaround. Pull requests accepted :)

@DistantThunder
Copy link
Author

I'll be glad to do that but I'm a noob at programming.
I actually understood what you suggested with the #define stuff but I realised it's going to be a problem for older ffmpeg version.

I then proceeded I tried to implement a way to detect libavutil version and do the #define upon result but as I was testing, I didn't understand how to use the have the avutil_version() function detected in my test code with Cmake and linking to libavutil.so...

@DistantThunder
Copy link
Author

I finally nailed it... I hope...:

#7959

In fact I had to rephrase the title of this issue as it's PPSSPP that keeps the old names rather than upstream introducing API breakage (looks like they changed the names quite some time ago).

@DistantThunder DistantThunder changed the title Renamed variables in latest FFMPEG sources causes compilation failure on Linux when using system ffmpeg Variables with a different names in PPSSPP causes compilation failure on Linux when using system ffmpeg from upstream Sep 12, 2015
@DistantThunder DistantThunder changed the title Variables with a different names in PPSSPP causes compilation failure on Linux when using system ffmpeg from upstream Variables with different names in PPSSPP causes compilation failure on Linux when using system ffmpeg from upstream Sep 12, 2015
hrydgard added a commit that referenced this issue Sep 12, 2015
@hrydgard
Copy link
Owner

I simply changed PPSSPP's usage of the old names to the new ones instead in 33c3963 .

Please confirm if it solves the problem.

@DistantThunder
Copy link
Author

It indeed does. Also, It taught me a lot crafting my patch but you tackled it in an even better way since I lost sight that the new names were also available in the ffmpeg submodule anyway, so there was no need to be extra careful about it.

@DistantThunder DistantThunder changed the title Variables with different names in PPSSPP causes compilation failure on Linux when using system ffmpeg from upstream Variables with different names in PPSSPP causes compilation failure on Linux when using system ffmpeg from upstream [SOLVED] Sep 12, 2015
@hrydgard
Copy link
Owner

@DistantThunder Great!

Sorry, I should have tried this from the start. Glad you learned something though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants