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

This works now, do `cmake .. -DTARGET_i386=off` #925

Closed ghost closed 3 years ago

ghost commented 3 years ago

This works now, do cmake .. -DTARGET_i386=off

Originally posted by @ahyattdev in https://github.com/darlinghq/darling/issues/877#issuecomment-776259522

[marina@Exaella build]$ cmake .. -DTARGET_i386=off
-- The C compiler identification is Clang 3.4.2
-- The CXX compiler identification is Clang 3.4.2
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is Clang
-- Found assembler: /usr/bin/clang
-- The ASM-ATT compiler identification is GNU
-- Found assembler: /usr/bin/as
CMake Warning at cmake/dsym.cmake:40 (message):
  Cannot find llvm-dsymutil, will not produce debug information
Call Stack (most recent call first):
  CMakeLists.txt:81 (FindDsymutil)

-- Found Setcap: /usr/sbin/setcap  
-- Compiler include path detected as /usr/bin/../lib/clang/3.4.2/include/
-- Found BISON: /usr/bin/bison (found version "3.0.4") 
-- Found FLEX: /usr/bin/flex (found version "2.5.37") 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1") 
-- Checking for module 'fuse'
--   Found fuse, version 2.9.2
-- Checking for module 'libavcodec'
--   Found libavcodec, version 57.107.100
-- Checking for module 'libavformat'
--   Found libavformat, version 57.83.100
-- Checking for module 'libavutil'
--   Found libavutil, version 55.78.100
-- Found FFMPEG or Libav: /usr/lib64/libavcodec.so;/usr/lib64/libavformat.so;/usr/lib64/libavutil.so, /usr/include/ffmpeg
-- Found FFmpeg: /usr/lib64/libavcodec.so;/usr/lib64/libavformat.so;/usr/lib64/libavutil.so  
-- Found PulseAudio: /usr/lib64/libpulse.so  
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Checking for one of the modules 'openssl'
-- Performing Test CFLAG_Wall
-- Performing Test CFLAG_Wall - Failed
-- Performing Test CFLAG_Wno_unknown_pragmas
-- Performing Test CFLAG_Wno_unknown_pragmas - Failed
-- Performing Test CFLAG_Wno_unused_variable
-- Performing Test CFLAG_Wno_unused_variable - Failed
-- Checking for module 'cairo'
--   Found cairo, version 1.15.12
-- Checking for module 'egl'
--   Found egl, version 18.3.4
-- Found Freetype: /usr/lib64/libfreetype.so (found version "2.8.0") 
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7") 
-- Found PNG: /usr/lib64/libpng.so (found version "1.5.13") 
-- Found TIFF: /usr/lib64/libtiff.so (found version "4.0.3") 
-- Found JPEG: /usr/lib64/libjpeg.so (found version "62") 
-- Performing Test GIF_GifFileType_UserData
-- Performing Test GIF_GifFileType_UserData - Failed
-- Found GIF: /usr/lib64/libgif.so (found version "3") 
-- Checking for module 'fontconfig'
--   Found fontconfig, version 2.13.0
-- Found OpenGL: /usr/lib64/libOpenGL.so   
-- Checking for module 'dbus-1'
--   Found dbus-1, version 1.10.24
-- Configuring done
-- Generating done
-- Build files have been written to: /home/marina/Development/Projects/darling/build
[marina@Exaella build]$ make
Scanning dependencies of target elfloader_dummy32
[  0%] Building C object src/libelfloader/native/CMakeFiles/elfloader_dummy32.dir/elfcalls.c.o
warning: unknown warning option '-Wno-nullability-completeness'; did you mean '-Wno-delete-incomplete'? [-Wunknown-warning-option]
In file included from /home/marina/Development/Projects/darling/src/libelfloader/native/elfcalls.c:1:
In file included from /usr/include/dlfcn.h:23:
In file included from /usr/include/features.h:399:
/usr/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found
# include <gnu/stubs-32.h>
          ^
1 warning and 1 error generated.
make[2]: *** [src/libelfloader/native/CMakeFiles/elfloader_dummy32.dir/build.make:82: src/libelfloader/native/CMakeFiles/elfloader_dummy32.dir/elfcalls.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:10442: src/libelfloader/native/CMakeFiles/elfloader_dummy32.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

It still requires a 32-bit library, I got to install "glibc-devel.i686", but it doesn't work.

CuriousTommy commented 3 years ago

Hi @mari486, what branch are you using?

ahyattdev commented 3 years ago

Yes, you might need the update-sources branch, but it will be merged in soon

ghost commented 3 years ago

@CuriousTommy I used the commands:

git clone --recursive git pull git submodule init git submodule update

But it seems that the branch I need is not yet available.

ahyattdev commented 3 years ago

You can try it out now with git checkout update-sources && git submodule update

ghost commented 3 years ago

I finished the procedures and tried to build, but ...

[  0%] Building C object src/libelfloader/native/CMakeFiles/elfloader_dummy64.dir/elfcalls.c.o
clang: error: the clang compiler does not support '-mmacosx-version-min=10.15'
clang: error: the clang compiler does not support '-mmacosx-version-min=10.15'
make[2]: ** [src/libelfloader/native/CMakeFiles/elfloader_dummy64.dir/elfcalls.c.o] Erro 1
make[1]: ** [src/libelfloader/native/CMakeFiles/elfloader_dummy64.dir/all] Erro 2
make: ** [all] Erro 2
ahyattdev commented 3 years ago

huh, what clang version do you have?

magiruuvelvet commented 3 years ago

it literally says in the cmake output

-- The C compiler identification is Clang 3.4.2
-- The CXX compiler identification is Clang 3.4.2

that's an painfully outdated clang version, we are at 11 (stable release) now

ahyattdev commented 3 years ago

Yes that is 6 years old and not supported.

CuriousTommy commented 3 years ago

I was able to build and run Darling on OpenSUSE. I'm going to update the install instructions to include the dependencies needed for OpenSUSE users.

Screen Shot 2021-02-13 at 6 26 43 PM