MathAnimation icon indicating copy to clipboard operation
MathAnimation copied to clipboard

Add Linux Support

Open ambrosiogabe opened this issue 2 years ago • 10 comments
trafficstars

This is just to track progress on Linux support. Once support and README instructions get added for building on Linux, this issue can be resolved.

ambrosiogabe avatar Jan 02 '23 23:01 ambrosiogabe

I was just trying to build this on linux, mainly get stuck on finding the following libraries:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIB_AVCODEC
    linked by target "MathAnimations" in directory /home/dreamer/Sources/_downloads/MathAnimation
LIB_AVDEVICE
    linked by target "MathAnimations" in directory /home/dreamer/Sources/_downloads/MathAnimation
LIB_AVFILTER
    linked by target "MathAnimations" in directory /home/dreamer/Sources/_downloads/MathAnimation
LIB_AVFORMAT
    linked by target "MathAnimations" in directory /home/dreamer/Sources/_downloads/MathAnimation
LIB_AVUTIL
    linked by target "MathAnimations" in directory /home/dreamer/Sources/_downloads/MathAnimation
LIB_SWRESAMPLE
    linked by target "MathAnimations" in directory /home/dreamer/Sources/_downloads/MathAnimation
LIB_SWSCALE
    linked by target "MathAnimations" in directory /home/dreamer/Sources/_downloads/MathAnimation

dromer avatar Jan 03 '23 12:01 dromer

@dromer I solved the ffmpeg issue First build ffmpeg in Animations/vendor/ffmpeg with:

./configure
make -j<CPUs>

Then in cmakelists:

find_library(LIB_AVCODEC avcodec HINTS ${CMAKE_SOURCE_DIR}/Animations/vendor/ffmpeg/libavcodec)
find_library(LIB_AVDEVICE avdevice HINTS ${CMAKE_SOURCE_DIR}/Animations/vendor/ffmpeg/libavdevice)
find_library(LIB_AVFILTER avfilter HINTS ${CMAKE_SOURCE_DIR}/Animations/vendor/ffmpeg/libavfilter)
find_library(LIB_AVFORMAT avformat HINTS ${CMAKE_SOURCE_DIR}/Animations/vendor/ffmpeg/libavformat)
find_library(LIB_AVUTIL avutil HINTS ${CMAKE_SOURCE_DIR}/Animations/vendor/ffmpeg/libavutil)
find_library(LIB_SWRESAMPLE swresample HINTS ${CMAKE_SOURCE_DIR}/Animations/vendor/ffmpeg/libswresample)
find_library(LIB_SWSCALE swscale HINTS ${CMAKE_SOURCE_DIR}/Animations/vendor/ffmpeg/libswscale)

Because thats where the .a files are supposed to be, and find_library adds the lib prefix itself.

arf20 avatar Jan 03 '23 21:01 arf20

Animations/vendor/nativeFileDialog/src/nfd_win.cpp depends in the <crtdbg.h> Windows header.

arf20 avatar Jan 03 '23 21:01 arf20

Line 180 of CMakeLists, nfd_win.cpp -> nfd_gtk.cpp, solved

arf20 avatar Jan 03 '23 22:01 arf20

cppUtils.hpp:254: g++ doesn't find <format>, requires C++20 (god damn new). so we

set(CMAKE_CXX_STANDARD 20)

but in CMakeLists.txt, but turns out that Luau can't be build in C++20 because it defines lerp(), which conflicts with the STL.

arf20 avatar Jan 03 '23 22:01 arf20

Okay so apparently <format> is not required, so we can just comment it lol. No C++20 required. Next problem is in the same file, cppUtils.hpp:548, localtime_s and fopen_s are not declared, windows ffs.

arf20 avatar Jan 03 '23 22:01 arf20

Hi @arf20 thanks for the comments! I should have included that Linux support is currently being added and in progress here: https://github.com/ambrosiogabe/MathAnimation/pull/47 , so most of these issues are being addressed.

ambrosiogabe avatar Jan 03 '23 22:01 ambrosiogabe

Oh damn, you are already much more ahead of me, apparently builds. Sorry, gl with the port.

arf20 avatar Jan 03 '23 22:01 arf20

No worries, Toby, a community member, is actually the one implementing the changes. Sorry for not addressing this earlier!

ambrosiogabe avatar Jan 03 '23 23:01 ambrosiogabe

I'm the Toby, and I'm slooowly getting there ^^;

Toby222 avatar Jan 04 '23 15:01 Toby222