MaurycyLiebner / enve

Flexible, user expandable 2D animation software for Linux and Windows.
https://MaurycyLiebner.github.io/
GNU General Public License v3.0
1.1k stars 83 forks source link

Building enve on Fedora 31 (unknown system, python3) #60

Open omac777 opened 4 years ago

omac777 commented 4 years ago

BUG: When running install dependencies script, it returns the following error on fedora 31:

davidm@io02fedora31 2020-01-07_09:56:39_EST : ~/Downloads/enve/third_party/skia
 $ tools/install_dependencies.sh
unknown system

FIX: there should be another install dependencies script for fedora linux systems. the packages it wants to install I believe are the following: dnf install freeglut freeglut-devel fontconfig fontconfig-devel freetype freetype-devel giflib giflib-devel mesa-libGL mesa-libGL-devel mesa-libGLU mesa-libGLU-devel harfbuzz harfbuzz-devel libicu libicu-devel openjpeg2-tools openjpeg2-devel libpng libpng-devel libwebp libwebp-devel

I'm giving it a go.

omac777 commented 4 years ago

Getting another error:

 $ bin/gn gen out/Release --args='is_official_build=true is_debug=false extra_cflags=["-Wno-error"] target_os="linux" target_cpu="x64" skia_use_system_expat=false skia_use_system_freetype2=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_system_harfbuzz=false cc="gcc" cxx="g++"'
ERROR at //gn/BUILDCONFIG.gn:80:14: Script returned non-zero exit code.
  is_clang = exec_script("gn/is_clang.py",
             ^----------
Current dir: /home/davidm/Downloads/enve/third_party/skia/out/Release/
Command: python -- /home/davidm/Downloads/enve/third_party/skia/gn/is_clang.py gcc g++
Returned 1.
stderr:

  File "/home/davidm/Downloads/enve/third_party/skia/gn/is_clang.py", line 14
    print 'true'
               ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('true')?

It's related to the default python3 install.

Temporarily to build enve I changed the default to python2 by doing the following:

 $ ls -lht /usr/bin/python
lrwxrwxrwx. 1 root root 9 Dec 15 12:19 /usr/bin/python -> ./python3

cd /usr/bin
rm python
ln -s -T python2 python

$ ls -lht python
lrwxrwxrwx. 1 root root 7 Jan  7 10:28 python -> python2

 $ cd /home/davidm/Downloads/enve/third_party/skia
davidm@io02fedora31 2020-01-07_10:29:04_EST : ~/Downloads/enve/third_party/skia
 $ bin/gn gen out/Release --args='is_official_build=true is_debug=false extra_cflags=["-Wno-error"] target_os="linux" target_cpu="x64" skia_use_system_expat=false skia_use_system_freetype2=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_system_harfbuzz=false cc="gcc" cxx="g++"'
Done. Made 58 targets from 40 files in 75ms
davidm@io02fedora31 2020-01-07_10:29:11_EST : ~/Downloads/enve/third_party/skia
 $ 

ninja -C out/Release -j 8
omac777 commented 4 years ago

In order to build libmypaint successfully on fedora, https://github.com/MaurycyLiebner/enve#libmypaint

I believe we need to install the following packages: dnf install json-c-devel json-c intltool python3-pkgconfig

MaurycyLiebner commented 4 years ago

59

Problem when preparing for enve build on fedora 31:

davidm@io02fedora31 2020-01-07_09:45:27_EST : ~/Downloads/enve/third_party/skia
 $ python tools/git-sync-deps
  File "tools/git-sync-deps", line 209
    print 'Skipping "%s".' % directory
                         ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Skipping "%s".' % directory)?
davidm@io02fedora31 2020-01-07_09:45:34_EST : ~/Downloads/enve/third_party/skia

That's because fedora 31 defaults to python3.

FIX...run the same tools using python2.

 $ python2 tools/git-sync-deps
Skipping '../src'.
third_party/externals/piex           @ bb217acdca1cc0c16b704669dd6f91a1b509c406
common                               @ 9737551d7a52c3db3262db5856e6bcd62c462b92
buildtools                           @ 505de88083136eefd056e5ee4ca0f01fe9b33de8
third_party/externals/opencl-lib     @ 4e6d30e406d2e5a65e1d65e404fe6df5f772a32b
third_party/externals/zlib           @ 47af7c547f8551bd25424e56354a2ae1e9062859
third_party/externals/spirv-headers  @ 661ad91124e6af2272afd00f804d8aa276e17107
third_party/externals/dng_sdk        @ c8d0c9b
third_party/externals/egl-registry   @ a0bca08de07c7d7651047bedc0b653cfaaa4f2ae
third_party/externals/microhttpd     @ 748945ec6f1c67b7efc934ab0808e1d32f2fb98d
third_party/externals/spirv-tools    @ e9e4393b1c5aad7553c05782acefbe32b42644bd
third_party/externals/wuffs          @ 6ad7d00a262e862549e4963b4a43d148a8285e50
third_party/externals/expat          @ android-6.0.1_r55
third_party/externals/dawn           @ 2d4b5294432f254c8ab093ff399cdf9aa59260a6
third_party/externals/sfntly         @ b55ff303ea2f9e26702b514cf6a3196a2e3e2974
third_party/externals/lua            @ v5-3-4
third_party/externals/libwebp        @ v1.0.3-rc1
warning: remote HEAD refers to nonexistent ref, unable to checkout.

third_party/externals/harfbuzz       @ 1bada656a86e9cb27d4a6b9fcc50748f0bd9c1d9
third_party/externals/opencl-regi... @ 932ed55c85f887041291cef8019e54280c033c35
third_party/externals/freetype       @ 05439f5cc69eaa3deaf3db52a7999af09a2c293a
third_party/externals/sdl            @ 5d7cfcca344034aff9327f77fc181ae3754e7a90
third_party/externals/imgui          @ d38d7c6628bebd02692cfdd6fa76b4d992a35b75
third_party/externals/libpng         @ 386707c6d19b974ca2e3db7f5c61873813c6fe44
third_party/externals/libjpeg-turbo  @ 2.0.0
third_party/externals/opengl-regi... @ 14b80ebeab022b2c78f84a573f01028c96075553
third_party/externals/angle2         @ 6a02f06dfd4ec5e0f9efb553059ce65535f4b312
third_party/externals/swiftshader    @ ee98b422d00439c36ed359e384593c17b211be7e
third_party/externals/icu            @ 407b39301e71006b68bd38e770f35d32398a7b14
MaurycyLiebner commented 4 years ago

Thank you for describing the build process for Fedora 31, it could be useful for other users. Adding build instructions for other distributions will require a more robust website.