I recently did a fresh install of Fedora 31 on my virtual machine. However, I seem to be running into issues with getting Darling to compile. Contrast that to my laptop and ITX desktop (which were upgraded to Fedora 31 from Fedora 30), Darling builds just fine.
After installing the dependencies from the wiki, I get this error:
In file included from /home/user/Downloads/darling/src/external/compiler-rt/lib/builtins/absvdi2.c:15:
/home/user/Downloads/darling/src/external/compiler-rt/lib/builtins/int_lib.h:70:12: fatal error: 'float.h' file not found
# include <float.h>
^~~~~~~~~
1 error generated.
Installing gcc-x86_64-linux-gnu seems to have gotten rid of that issue, but now cmake does not even work...
$ cmake ..
-- The C compiler identification is Clang 9.0.0
-- The CXX compiler identification is Clang 9.0.0
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/usr/bin/clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/user/Downloads/darling/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_a4c39/fast && /usr/bin/gmake -f CMakeFiles/cmTC_a4c39.dir/build.make CMakeFiles/cmTC_a4c39.dir/build
gmake[1]: Entering directory '/home/user/Downloads/darling/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a4c39.dir/testCCompiler.c.o
/usr/bin/clang -o CMakeFiles/cmTC_a4c39.dir/testCCompiler.c.o -c /home/user/Downloads/darling/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_a4c39
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a4c39.dir/link.txt --verbose=1
/usr/bin/clang -rdynamic CMakeFiles/cmTC_a4c39.dir/testCCompiler.c.o -o cmTC_a4c39
/usr/bin/ld: cannot find -lgcc_s
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_a4c39.dir/build.make:87: cmTC_a4c39] Error 1
gmake[1]: Leaving directory '/home/user/Downloads/darling/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_a4c39/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:23 (project)
-- Configuring incomplete, errors occurred!
See also "/home/user/Downloads/darling/build/CMakeFiles/CMakeOutput.log".
See also "/home/user/Downloads/darling/build/CMakeFiles/CMakeError.log".
CMakeError.log
CMakeOutput.log
I am going to try to do some research into why Darling is failing to build on my virtual machine, but any help would be appreciated.
This error also appears to happen on Manjaro Linux (which is based on Arch, both using pacman).
[ 0%] Building C object src/external/compiler-rt/lib/builtins/CMakeFiles/compiler_rt_i386.dir/absvdi2.o
In file included from /mnt/ldata/Bernd/Repos/darling/src/external/compiler-rt/lib/builtins/absvdi2.c:15:
/mnt/ldata/Bernd/Repos/darling/src/external/compiler-rt/lib/builtins/int_lib.h:70:12: fatal error: 'float.h' file not found
# include <float.h>
^~~~~~~~~
1 error generated.
make[2]: *** [src/external/compiler-rt/lib/builtins/CMakeFiles/compiler_rt_i386.dir/build.make:133: src/external/compiler-rt/lib/builtins/CMakeFiles/compiler_rt_i386.dir/absvdi2.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:17008: src/external/compiler-rt/lib/builtins/CMakeFiles/compiler_rt_i386.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
➜ build git:(master)
I'm at d615079594e7992ba7434245c65862c1cab0da66 (which is currently HEAD).
@Bernd-L Interesting... I did a test on Ubuntu 19.10, and it seems to work fine. It makes me wonder if this issue has to do with a newer library.
It makes me wonder if this issue has to do with a newer library.
@CuriousTommy It probably does. One of the main problems with Linux software development is the inconsistency with libraries.
Which is why Flatpacks and Appimages exist. Does anyone know when we are going to see those, or at least get more detailed instructions on how to build this project from source?
Which is why Flatpacks and Appimages exist.
You have to keep in mind that there is also a kernel component to Darling that you can't stick in a Flatpak or Appimage. Plus, I personally wouldn't stick Darling in a Flatpak or Appimage unless I am bundling an app with it.
Does anyone know when we are going to see those, or at least get more detailed instructions on how to build this project from source?
For what it is worth, I think the wiki instructions are pretty detailed on what you need to do to install Darling.
You have to keep in mind that there is also a kernel component to Darling
I completely forgot about that.
But the Wiki really needs some work. The instructions are of no use to me. Following them produced the same errors as the ones outlined above.
I really want to try Darling, but I just can't compile it.
This was supposedly fixed in early 2019: https://github.com/darlinghq/darling/commit/278d22a2f2e327b1ba23b79f4bddafe79fa3e2dd
Installing Fedora 31 now to investigate
Most helpful comment
This was supposedly fixed in early 2019: https://github.com/darlinghq/darling/commit/278d22a2f2e327b1ba23b79f4bddafe79fa3e2dd
Installing Fedora 31 now to investigate