darlinghq / darling

Darwin/macOS emulation layer for Linux
http://www.darlinghq.org
GNU General Public License v3.0
11.54k stars 445 forks source link

Make error at around 96% #890

Closed winkelnp closed 3 years ago

winkelnp commented 4 years ago

Build Log Darling builds fine until 96%, but has continuous errors along the way, nothing that stops build though. It then shows this and cancels the build

make[1]: *** [CMakeFiles/Makefile2:49889: src/external/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

I did everything according to the build instructions, after the AUR builds had the same error.

System Information What system are you building with?

Software Version
Clang 10.0.1-1
CMake 3.18.4-1
Linux Kernel 5.8.18-1-MANJARO
Darling 1d3b099
LubosD commented 4 years ago

This error message is obviously useless. Please find the first error message.

winkelnp commented 4 years ago

I'm just going to run an AUR build again, and then see if I can find the original error

winkelnp commented 4 years ago
clang-10: error: unable to execute command: Killed
clang-10: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 10.0.1 
Target: x86_64-apple-darwin11
Thread model: posix
InstalledDir: /usr/bin
clang-10: note: diagnostic msg: PLEASE submit a bug report to  and include the crash backtrace, preprocessed source, and associated run script.
clang-10: note: diagnostic msg: Error generating preprocessed source(s) - cannot generate preprocessed source with multiple -arch options.
make[2]: *** [src/external/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/build.make:2071: src/external/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/bytecompiler/BytecodeGenerator.cpp.o] Error 254
make[2]: *** Waiting for unfinished jobs....
In file included from /var/tmp/pamac-build-nicolas/darling/src/darling/src/external/JavaScriptCore/bytecode/CallLinkInfo.cpp:35:
/var/tmp/pamac-build-nicolas/darling/src/darling/src/external/JavaScriptCore/bytecode/Opcode.h:105:27: warning: adding 'unsigned int' to a string does not append to the string [-Wstring-plus-int]
    return PADDING_STRING + PADDING_STRING_LENGTH - pad;
           ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~

Is this any more useful?

Sorry I am relatively new to building

facekapow commented 4 years ago

Looks like you don't have enough memory on your system to compile JavaScriptCore. Are you building with parallel jobs (i.e. make -j <some-number>)? If so, you could try building normally and see if that helps. Otherwise, you could try disabling JavaScriptCore by following the instructions here (you won't be missing out on much; we don't use JavaScriptCore for anything at the moment).

winkelnp commented 4 years ago

I have tried both (and they both take ages) and neither of them work.

By disabling JavaScriptCore, do you mean adding the -DFULL_BUILD=OFF flag to the cmake .. ?

winkelnp commented 4 years ago

I just retried and it crashed at 0% with this output:

~/.../darling/build >>> make                                          ±[master]
[  0%] Built target elfloader_dummy32
[  0%] Built target elfloader_dummy64
[  0%] Built target bsdln
[  0%] Building CXX object src/external/cctools-port/cctools/ld64/src/CMakeFiles/x86_64-apple-darwin11-ld.dir/ld/InputFiles.cpp.o
c++: error: unrecognized command-line option ‘-fblocks’
make[2]: *** [src/external/cctools-port/cctools/ld64/src/CMakeFiles/x86_64-apple-darwin11-ld.dir/build.make:82: src/external/cctools-port/cctools/ld64/src/CMakeFiles/x86_64-apple-darwin11-ld.dir/ld/InputFiles.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:10527: src/external/cctools-port/cctools/ld64/src/CMakeFiles/x86_64-apple-darwin11-ld.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
facekapow commented 3 years ago

Strange, CMake should be using clang; this error is due to it using gcc instead. Try wiping the build directory and using cmake -DFULL_BUILD=OFF <relative-path-to-source> to configure, and then build normally.

facekapow commented 3 years ago

Closing due to inactivity