-
Notifications
You must be signed in to change notification settings - Fork 354
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
Ubuntu 14.04: compile error #594
Comments
Do you have the ffmpeg libraries installed? That's what that error points to; it can't find the FFMPEG development libraries. |
Ubuntu does not use FFMPEG but libav fork...FFMPEG is no more available in the Ubuntu official depot. |
Indeed. Therefore you need to add Severinsson's PPA if you want movie support. If you don't need it you can just do -D WITH_MOVIES=OFF in the cmake step. Otherwise the compile instructions link you to his site: https://launchpad.net/~jon-severinsson/+archive/ubuntu/ffmpeg |
Ok, so I went ahead a created that small script. It looks like this: cmake . Try to fix bug in luasocket 3.0-rc1sudo sed -i 's/ PROXY/ _M.PROXY/g' /usr/share/lua/5.1/socket/http.lua I'll add that to the compile wiki page. |
Since I already had started on such a script I have now made a pull request about it here: #595 |
Thank you Lego for your answer. But I don't think it's a good idea to install ffmpeg on a distribution that took the decision to use a fork of it: it could appear incompatibilities or others non yet unidentifed bugs...Another idea: use the libav fork. I don't know how adapt the corsix code to use the libav, but libav code's similare to ffmpeg code and has same librairies name. Somewhere in the Corsix code: If distribution=Ubuntu |
This has been discussed a few Times. However, using libav would require a lot of code changes, and according to some sources ffmpeg might be available in the next version of Ubuntu. |
You are right, ffmpeg will return in the 15.04. But to not interfer with libav librairies, ffmpeg files will be renamed. Will Corsix-th find this renamed librairies? |
Another point, like said here http://www.webupd8.org/2014/11/ffmpeg-returns-to-official-ubuntu.html: "Jon Severinsson's FFmpeg PPA was pretty popular but:
Ubuntu softwares are compiled to use libav instead of ffmpeg, if you break Ubuntu libav, a lot of software could no more be runnable. |
When you run cmake you may need to point to the proper location. Incidentally for personal use you don't need that ppa, you can just copy ffmpeg libs to some local path and compile against that. |
I tried to compile it without video option, compilation finished ok. |
Could you also paste your CMakeCache.txt |
this is my CMakeCache.txt |
Alright, you're getting linker errors with swresample.a. I'm not sure it's valid to be mixing libav and ffmpeg libraries like that, it seems likely that swresample.a would have unsatisfied dependencies so you might first try switching all your libav libraries to ffmpeg ones. |
This is my new CMakeCache.txt, now I think all FFMPEG dirs are right: Compile still failed at 100 % but the errors messages changed: |
Remove the versions numbers from your CMakeCache.txt, they are not needed. |
Done, but I obtained the same errors messagest: My last CMakeCache.txt: Is Corsix-th compatible with last ffmpeg git? |
I would try to use stable releases, instead of git revisions. |
I believe if you can add -lz to your compile flags it should fix that error. Not entirely clear if that dependency only comes up because of the static linking or git ffmpeg, or some other reason. |
too difficult for me to link static FFMPEG librairies to Corsix-th. I think my FFMPEG compilation is not entirely static and ask for zlib librairies wich is external...and I don't know how to add zlib librairie in FFMPEG (and if it is possible...). But I don't have the level to go further...So I will install the Jefferson PPA when I would like to play Corsix-th and do a ppa-purge when I don't play...But it's a pity to penalize/annoying all Ubuntu/Debian users who want to use Corsix-th. |
The whole situation is extremely unfortunate, but we're not trying to penalize debian/ubuntu users. The ffmpeg/libav fork was extremely messy, with a lot of fud and misinformation being spread by both sides, and both sides claiming that they were the true ffmpeg so neither would change their library names to avoid collision. Further developers on the libav side held positions of authority at Debian/Ubuntu which lead to an overly hasty fragmentation of distros as well. The resampling libraries (libavresample from libav and libswresample from ffmpeg) were the worst affected because they were developed right at the beginning of the fork when the sides were most bitterly opposed. Anyway despite the information at the time it seems that ffmpeg is maintaining their libavresample library and switching to it would probably be a good choice - I may eventually do it my self as I'm no longer as fed up with it all as I was a year ago. |
Another good project like Performous, a Karaoke app for Linux, found a way to have compatibility for FFMPEG and LIBAV: performous/performous#115 Retroarch use FFMPEG and is Ubuntu compatible too. |
Did you read that link you posted, they spent 3 months porting from libswresample to libavresample, which is exactly what I said was needed above. |
No, we spend 3 month porting from a state before there was any dedicated resample library (audio_resample in libavcodec) to libavresample. IIRC XBMC/Kodi has a shim that translates between avresample and swresample since they are very similar in interface. We just used libavresample since at that time both projects provided it and only ffmpeg has libswresample... OTOH, both Debian and Ubuntu have ffmpeg back in their repository... |
Thanks for clearing that up @TobiX |
Sadly the zeranoe builds of ffmpeg for windows which we have been using do not contain libavresample. If I do decide to support libav it seems like I'd want to implement with both libraries and make cmake ask for one or the other. |
And I am open to other people implementing this if anyone has any interest. |
My pull request above solves this issue, pass -DWITH_LIBAV to cmake. |
Hello TheCycoOne, happy to read you :) I just tried: configure OK but I have an compilation error: |
Interesting. I was writing this using libav-11.1 Which version are you using? |
Even in the oldest version of libav with documentation (0.5) av_recale_rnd is defined (https://libav.org/doxygen/release/0.5/mathematics_8h.html#ad686ab94939ed4c65218309e94bdca72) which should have been included by the |
I tried to compile CorsixTH on another computer where I have never installed FFMPEG ppa (or other fmmpeg packages), same Ubuntu version (14.04 LTS), I obtain a similar error message: |
My CMakeCache.txt: My libavutil package version: |
I looked at that version and it appears that mathematics.h is actually not being pulled in. Would you mind testing my theory? In the extern "C" block at the top of CorsixTH\src\th_movie.cpp, just below |
Just tested your theory: This message means (google translation): WARNING: clock skew detected. The construction may be incomplete. Anyway I obtained an executable and I can launch it. |
I just compiled CorsixTH-54e392b7b3a08b6c8169661972f1377c08fdae1c at home: Terminal log: |
If you disable movies in your config.txt does the game work fine with that compile? I think I'm going to have to install Ubuntu somewhere |
I changed the option in config.txt: and I can play the game. |
I have Arch Linux and Windows machines. For libav I've been using Windows because Arch uses ffmpeg. |
@legluondunet Just to eliminate certain possibilities;
and
|
/Theme Hospital/HOSPITAL/ANIMS /Theme Hospital/HOSPITAL/INTRO |
Alright, so we've confirmed your movies are not corrupt. That's good. I'm working on getting an Ubuntu 14.04.1 LTS vm up and running, and maybe a 14.10 one while I'm at it. Will report back when I know more. |
I'm seeing the same behaviour as you in my Ubuntu 14.04.1 LTS VM. At least in my VM it appears that avplay (from libav-tools) can't play the intro properly either which doesn't inspire much confidence in that version. (I don't get a black screen, but I get the video with no sound, followed by the video being frozen with only the sound playing.) Do you see the same thing? If so I think there's a bug with smacker playback that's only fixed in a later version. |
I just trying to play intro.sm4 with avplay: |
Alright, that's the same as what I'm seeing with that libav version. So between that and the the "max analyze duration reached" error it looks like the smacker video codec in that version of libav is buggy. When I next have time to sit with this there are a couple things I will check: If we can't easily produce a workaround then we might just target Ubuntu 14.10 and higher for movies. |
I've confirmed that with my patch movies are working perfectly in Ubuntu 14.10. |
Good news, you done a very nice work! 👍 I will submit a bug to Ubuntu and ask them to update libav on last LTS. |
this is my bug report on launchpad: |
Closing. |
Hello,
I tried to compile the last git code on Ubuntu 14.04 and I obtain this error:
$ cmake .
Note: Using SDL as renderer (default)
Note: SDL audio is enabled (default)
Note: FFMPEG video is enabled (default)
Note: FreeType2 is enabled (default)
Building CorsixTH
SDL found
-- Found LuaJIT library: /usr/lib/x86_64-linux-gnu/libluajit-5.1.so
LuaJIT found
SDL_mixer found
-- CMAKE_MODULE_PATH=/home/legluondunet/Applications_persos/Jeux/DOS/Theme_Hospital/Corsix-th/CorsixTH-master03012015/CMake
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
Could NOT find FFmpeg (missing: SWRESAMPLE_LIBRARIES
SWRESAMPLE_INCLUDE_DIRS)
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
CMake/FindFFmpeg.cmake:145 (find_package_handle_standard_args)
CorsixTH/CMakeLists.txt:142 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
See also "/home/legluondunet/Applications_persos/Jeux/DOS/Theme_Hospital/Corsix-th/CorsixTH-master03012015/CMakeFiles/CMakeOutput.log".
See also "/home/legluondunet/Applications_persos/Jeux/DOS/Theme_Hospital/Corsix-th/CorsixTH-master03012015/CMakeFiles/CMakeError.log".
Could you help me?
LGDN
The text was updated successfully, but these errors were encountered: