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

building on linux #40

Open
gucio321 opened this issue Jan 19, 2021 · 11 comments
Open

building on linux #40

gucio321 opened this issue Jan 19, 2021 · 11 comments

Comments

@gucio321
Copy link

Hi there,
I've just tried to build on my Fedora 32 and have it:

/home/username/git/d2/DGEngine/src/sfeMovie/AudioStream.cpp:31:10: fatal error: libswresample/swresample.h: No such file or directory
   31 | #include <libswresample/swresample.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/DGEngine.dir/build.make:1968: CMakeFiles/DGEngine.dir/src/sfeMovie/AudioStream.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/DGEngine.dir/all] Error 2
make: *** [Makefile:104: all] Error 2
@ghost
Copy link

ghost commented Jan 20, 2021

Hi, that is an ffmpeg include file. Maybe the version included is not supported (I think ffmpeg 3 and 4 should work).

The provided Cmake file will use video support if it detects FFMPEG.

run this: cmake CMakeLists.txt -DDGENGINE_MOVIE_SUPPORT:BOOL=FALSE to skip movie support and see if it compiles. You need GCC 10+.

@gucio321
Copy link
Author

Hi,
Now it works. Thanx,
BUT should works, I suppose:
ffmpeg version 4.2.4 Copyright (c) 2000-2020 the FFmpeg developers
gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)

@gucio321
Copy link
Author

gucio321 commented Jan 21, 2021

And one more question:
in main.json of gamefilesd we can see:

  "action": {
    "name": "if.equal",
    "param1": { "name": "file.exists", "file": "ui_art/title.pcx" },
    "param2": true,
    "then": { "name": "load", "file": "ui/loadMain.json" },
    "else": { "name": "load", "file": ["ui/dataMissing.json", "DIABDAT"] }
  }

but file ui_art/tile.pcx deosn't exist, so wehere should I get it from?

@ghost
Copy link

ghost commented Jan 21, 2021

You can find more information here: https://github.com/dgengin/DGEngine/wiki

Basically, you need the files that are inside DIABDAT.MPQ, which comes with the original game to be in a DIABDAT folder next to the gamefilesd folder or you can compile with the physfs project here: https://github.com/dgengin/physfs and then you can use that file directly without extracting it.

@gucio321
Copy link
Author

ok, works, thanx for help

@gucio321
Copy link
Author

@dgengin but why video doesn't work?
It should be all good.
ffmpeg version 4.3.1
OS: Fedora 33

@gucio321 gucio321 reopened this Jan 25, 2021
@ghost
Copy link

ghost commented Jan 25, 2021

I don't know. I'll try and find out. Probably the cmake_modules/FindFFmpeg.cmake file is not setting the paths properly.

Edit: did you try the fedora equivalent of this command from BUILD.txt?
sudo apt install libavdevice-dev libavformat-dev libavfilter-dev libavcodec-dev libswscale-dev libavutil-dev

You need to install the development libs, not the binary.

@gucio321
Copy link
Author

I did, but this packages (libs) doesn't exist in fedora's package manager. As I see, they are included to ffmpeg.

  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100

@ghost
Copy link

ghost commented Jan 27, 2021

I found this: https://computingforgeeks.com/how-to-install-ffmpeg-on-fedora/.

It says to install the development libs you do: sudo dnf -y install ffmpeg-devel.

@gucio321
Copy link
Author

gucio321 commented Feb 5, 2021

--  Found avcodec: /usr/include/ffmpeg /usr/local/lib/libavcodec.a
--  Found avdevice: /usr/include/ffmpeg /usr/local/lib/libavdevice.a
--  Found avfilter: /usr/include/ffmpeg /usr/local/lib/libavfilter.a
--  Found avformat: /usr/include/ffmpeg /usr/local/lib/libavformat.a
--  Found avutil: /usr/include/ffmpeg /usr/local/lib/libavutil.a
--  Found swresample: /usr/include/ffmpeg /usr/lib64/libswresample.so
--  Found swscale: /usr/include/ffmpeg /usr/local/lib/libswscale.a
-- Found SFML 2.5.1 in /usr/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mszeptuch/git/d2/DGEngine

I installed, but still crashes
It looks like cmake finds all av* libs

@ghost
Copy link

ghost commented Feb 7, 2021

I built successfully in fedora 32 using these instructions: https://tecadmin.net/install-ffmpeg-on-fedora/
no errors.

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

1 participant