Update the build guide for Fedora
Camilotk opened this issue · 4 comments
I'm currently using Fedora release 34 and made a native build using esy 0.6.10 and OCaml 4.12 following the instructions in Building & Installing, but after install all the listed deps in the Fedora additional packages section still I had to install some dependencies when build failed:
Fail 1:
error: build failed with exit code: 1
build log:
# esy-build-package: building: @onivim/reason-native-crash-utils@1.0.2
# esy-build-package: pwd: /home/ccazevedo/.esy/source/i/onivim__s__reason_native_crash_utils__1.0.2__fe3be0cf
# esy-build-package: running: 'dune' 'build' '-p' 'reason-native-crash-utils'
ocamlopt asan/Asan.cmxs (exit 2)
(cd /home/ccazevedo/.esy/3/b/onivim__s__reason_native_crash_utils-1.0.2-271040c5/default && /home/ccazevedo/.esy/3_______________________________________________________________/i/ocaml-4.12.0-bfdfbfff/bin/ocamlopt.opt -w -40 -g -shared -linkall -I asan -o asan/Asan.cmxs asan/Asan.cmxa)
/usr/bin/ld: cannot find /usr/lib64/libasan.so.6.0.0
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking (exit code 1)
error: command failed: 'dune' 'build' '-p' 'reason-native-crash-utils' (exited with 1)
esy-build-package: exiting with errors above...
building @onivim/reason-native-crash-utils@1.0.2
esy: exiting due to errors above
Fix: sudo dnf install libasan
Fail 2:
error: build failed with exit code: 1
build log:
# esy-build-package: building: esy-cmake@0.3.5
# esy-build-package: pwd: /home/ccazevedo/.esy/3/b/esy_cmake-0.3.5-725db80a
# esy-build-package: running: 'bash' '-c' './build.sh'
which: no cmake in (/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin)
Using builddir: /home/ccazevedo/.esy/3/b/esy_cmake-0.3.5-725db80a/_build
Using prefix: /home/ccazevedo/.esy/3_______________________________________________________________/s/esy_cmake-0.3.5-725db80a
Cloning into '/home/ccazevedo/.esy/3/b/esy_cmake-0.3.5-725db80a/_build/cmake'...
fatal: unable to open /home/ccazevedo/.esy/3/b/esy_cmake-0.3.5-725db80a/_build/cmake/.git/objects/pack/tmp_pack_PYCFEa: No such file or directory
fatal: fetch-pack: invalid index-pack output
./build.sh: line 12: cd: /home/ccazevedo/.esy/3/b/esy_cmake-0.3.5-725db80a/_build/cmake: No such file or directory
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
./build.sh: line 13: cd: /home/ccazevedo/.esy/3/b/esy_cmake-0.3.5-725db80a/_build/cmake: No such file or directory
./build.sh: line 13: ./bootstrap: No such file or directory
./build.sh: line 14: cd: /home/ccazevedo/.esy/3/b/esy_cmake-0.3.5-725db80a/_build/cmake: No such file or directory
mkdir -p
mkdir: missing operand
Try 'mkdir --help' for more information.
make: *** [Makefile:3: cmake] Error 1
./build.sh: line 15: cd: /home/ccazevedo/.esy/3/b/esy_cmake-0.3.5-725db80a/_build/cmake: No such file or directory
make: *** No rule to make target 'install'. Stop.
error: command failed: 'bash' '-c' './build.sh' (exited with 2)
esy-build-package: exiting with errors above...
building esy-cmake@0.3.5
esy: exiting due to errors above
Fix: sudo dnf install cmake
Fail 3
esy_libjpeg_turbo-e4385a3b'
buildtools @ 505de88083136eefd056e5ee4ca0f01fe9b33de8
third_party/externals/angle2 @ b001528ffa00e7c15a5002124f707570e59a5697
third_party/externals/dng_sdk @ 96443b262250c390b0caefbf3eed8463ba35ecae
third_party/externals/expat @ android-6.0.1_r55
third_party/externals/freetype @ fa6da7bf6dcbcfa22d2464259ad1cccee3233189
third_party/externals/googletest @ dd43b9998e9a44a579a7aba6c1309407d1a5ed95
third_party/externals/harfbuzz @ 1.4.2
third_party/externals/icu @ ec9c1133693148470ffe2e5e53576998e3650c1d
third_party/externals/imgui @ 6384eee34f08cb7eab8d835043e1738e4adcdf75
third_party/externals/jsoncpp @ 1.0.0
third_party/externals/libjpeg-turbo @ 1.5.3
third_party/externals/libpng @ v1.6.33
third_party/externals/libwebp @ v0.6.1
third_party/externals/lua @ v5-3-4
third_party/externals/microhttpd @ 748945ec6f1c67b7efc934ab0808e1d32f2fb98d
third_party/externals/piex @ bb217acdca1cc0c16b704669dd6f91a1b509c406
third_party/externals/rapidjson @ af223d44f4e8d3772cb1ac0ce8bc2a132b51717f
third_party/externals/sdl @ 5d7cfcca344034aff9327f77fc181ae3754e7a90
third_party/externals/sfntly @ b18b09b6114b9b7fe6fc2f96d8b15e8a72f66916
third_party/externals/spirv-headers @ 661ad91124e6af2272afd00f804d8aa276e17107
third_party/externals/spirv-tools @ e9e4393b1c5aad7553c05782acefbe32b42644bd
third_party/externals/swiftshader @ cbb80f5f0078a9941f3ec43e83e52c3d15a43bea
third_party/externals/zlib @ e7afdfe128e01ca480a28f757b571957befdd962
Manually activating llvm toolset 7.0...
./esy/build.sh: line 42: /opt/rh/llvm-toolset-7.0/enable: No such file or directory
-- clang version:
./esy/build.sh: line 46: clang: command not found
-- clang++ version:
./esy/build.sh: line 48: clang++: command not found
ERROR at //gn/BUILDCONFIG.gn:92:14: Script returned non-zero exit code.
is_clang = exec_script("gn/is_clang.py",
^----------
Current dir: /home/ccazevedo/.esy/3/b/esy_skia-d4e4b9f0/out/Static/
Command: python2 -- /home/ccazevedo/.esy/3/b/esy_skia-d4e4b9f0/gn/is_clang.py clang --gcc-toolchain=/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -stdlib=libstdc++ clang++ --gcc-toolchain=/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -I/usr/include/c++/4.8.5 -I/usr/include/c++/4.8.5/x86_64-redhat-linux -std=c++11 -stdlib=libstdc++
Returned 1.
stderr:
/bin/sh: line 1: clang: command not found
Traceback (most recent call last):
File "/home/ccazevedo/.esy/3/b/esy_skia-d4e4b9f0/gn/is_clang.py", line 12, in <module>
if ('clang' in subprocess.check_output('%s --version' % cc, shell=True) and
File "/usr/lib64/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'clang --gcc-toolchain=/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -stdlib=libstdc++ --version' returned non-zero exit status 127
error: command failed: 'bash' './esy/build.sh' 'linux' '/home/ccazevedo/.esy/3_______________________________________________________________/i/esy_libjpeg_turbo-e4385a3b' (exited with 255)
esy-build-package: exiting with errors above...
building esy-skia@github:revery-ui/esy-skia#66db8c5
esy: exiting due to errors above
Fix: sudo dnf install clang
My suggestion is I make a PR improving the Building & Installing guide Fedora section adding this deps in this list, I'm makig this issue just to ask if it's make sense add libasan, cmake and clang (clang is already in Ubuntu and Arch deps list) as deps for Fedora. It makes sense? Can I do it?
I try on a empty fedora 34 box: clang+libasan are needed, CMake was not needed so very strange. Does GitHub allow to open PR for Building & Installing page ?
If isn't a folder or a repo for the wiki content and the CI makes the magic of keep updated, sadly, no.
But anyone with right access can do it without problems. I think it can help fedora users to build without errors.
Thanks
I have updated and cmake is listed here https://github.com/revery-ui/revery/wiki/Building-&-Installing#for-linux-users thanks however it seem we have old dependencies (need to be double checked)