Aller au contenu principal
Sujet: Compilation de Darling foireuse (émulateur Mac OSX) - build manquant (Lu 143 fois) sujet précédent - sujet suivant

Compilation de Darling foireuse (émulateur Mac OSX) - build manquant

Salut,

je tente "désespérement" de compiler le noyaux mach-lkm qui permet d'émuler MacOSX sous Linux

j'ai bien suivi les instructions situées ici https://docs.darlinghq.org/build-instructions.html

j'ai compilé en désactivant les bibliothèques 32 bits, car glibc-32bit n'est pas trouvé par le compilateur (clang, je suppose?). Je suis parvenu à compiler darling en lui-même avec sudo make && sudo make install, mais pas moyen d'installer le noyau mach-lkm.
voici le message d'erreur
unixman@tagomago:~/git/darling/build> sudo make lkm
Built target migcom
Built target migexe
Generating osfmk/mach/upl_user.c, osfmk/mach/upl.h, osfmk/mach/upl_server.c, osfmk/mach/upl_server.h, osfmk/mach/uplXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/host_notify_reply_user.c, osfmk/mach/host_notify_reply.h, osfmk/mach/host_notify_reply_server.c, osfmk/mach/host_notify_reply_server.h, osfmk/mach/host_notify_replyXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/vm32_map_user.c, osfmk/mach/vm32_map.h, osfmk/mach/vm32_map_server.c, osfmk/mach/vm32_map_server.h, osfmk/mach/vm32_mapXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/mach_notify_user.c, osfmk/mach/mach_notify.h, osfmk/mach/mach_notify_server.c, osfmk/mach/mach_notify_server.h, osfmk/mach/mach_notifyXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/mach_voucher_attr_control_user.c, osfmk/mach/mach_voucher_attr_control.h, osfmk/mach/mach_voucher_attr_control_server.c, osfmk/mach/mach_voucher_attr_control_server.h, osfmk/mach/mach_voucher_attr_controlXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/memory_entry_user.c, osfmk/mach/memory_entry.h, osfmk/mach/memory_entry_server.c, osfmk/mach/memory_entry_server.h, osfmk/mach/memory_entryXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/memory_object_control_user.c, osfmk/mach/memory_object_control.h, osfmk/mach/memory_object_control_server.c, osfmk/mach/memory_object_control_server.h, osfmk/mach/memory_object_controlXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/memory_object_user.c, osfmk/mach/memory_object.h, osfmk/mach/memory_object_server.c, osfmk/mach/memory_object_server.h, osfmk/mach/memory_objectXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/memory_object_default_user.c, osfmk/mach/memory_object_default.h, osfmk/mach/memory_object_default_server.c, osfmk/mach/memory_object_default_server.h, osfmk/mach/memory_object_defaultXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/mach_voucher_user.c, osfmk/mach/mach_voucher.h, osfmk/mach/mach_voucher_server.c, osfmk/mach/mach_voucher_server.h, osfmk/mach/mach_voucherXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/vm_map_user.c, osfmk/mach/vm_map.h, osfmk/mach/vm_map_server.c, osfmk/mach/vm_map_server.h, osfmk/mach/vm_mapXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/resource_notify_user.c, osfmk/mach/resource_notify.h, osfmk/mach/resource_notify_server.c, osfmk/mach/resource_notify_server.h, osfmk/mach/resource_notifyXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/restartable_user.c, osfmk/mach/restartable.h, osfmk/mach/restartable_server.c, osfmk/mach/restartable_server.h, osfmk/mach/restartableXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/exc_user.c, osfmk/mach/exc.h, osfmk/mach/exc_server.c, osfmk/mach/exc_server.h, osfmk/mach/excXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/mach_exc_user.c, osfmk/mach/mach_exc.h, osfmk/mach/mach_exc_server.c, osfmk/mach/mach_exc_server.h, osfmk/mach/mach_excXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/notify_user.c, osfmk/mach/notify.h, osfmk/mach/notify_server.c, osfmk/mach/notify_server.h, osfmk/mach/notifyXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/task_user.c, osfmk/mach/task.h, osfmk/mach/task_server.c, osfmk/mach/task_server.h, osfmk/mach/taskXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/clock_user.c, osfmk/mach/clock.h, osfmk/mach/clock_server.c, osfmk/mach/clock_server.h, osfmk/mach/clockXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/clock_priv_user.c, osfmk/mach/clock_priv.h, osfmk/mach/clock_priv_server.c, osfmk/mach/clock_priv_server.h, osfmk/mach/clock_privXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/processor_user.c, osfmk/mach/processor.h, osfmk/mach/processor_server.c, osfmk/mach/processor_server.h, osfmk/mach/processorXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/host_priv_user.c, osfmk/mach/host_priv.h, osfmk/mach/host_priv_server.c, osfmk/mach/host_priv_server.h, osfmk/mach/host_privXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/host_security_user.c, osfmk/mach/host_security.h, osfmk/mach/host_security_server.c, osfmk/mach/host_security_server.h, osfmk/mach/host_securityXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/lock_set_user.c, osfmk/mach/lock_set.h, osfmk/mach/lock_set_server.c, osfmk/mach/lock_set_server.h, osfmk/mach/lock_setXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/mach_port_user.c, osfmk/mach/mach_port.h, osfmk/mach/mach_port_server.c, osfmk/mach/mach_port_server.h, osfmk/mach/mach_portXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/mach_vm_user.c, osfmk/mach/mach_vm.h, osfmk/mach/mach_vm_server.c, osfmk/mach/mach_vm_server.h, osfmk/mach/mach_vmXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/mach_host_user.c, osfmk/mach/mach_host.h, osfmk/mach/mach_host_server.c, osfmk/mach/mach_host_server.h, osfmk/mach/mach_hostXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/processor_set_user.c, osfmk/mach/processor_set.h, osfmk/mach/processor_set_server.c, osfmk/mach/processor_set_server.h, osfmk/mach/processor_setXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/thread_act_user.c, osfmk/mach/thread_act.h, osfmk/mach/thread_act_server.c, osfmk/mach/thread_act_server.h, osfmk/mach/thread_actXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/mach/clock_reply_user.c, osfmk/mach/clock_reply.h, osfmk/mach/clock_reply_server.c, osfmk/mach/clock_reply_server.h, osfmk/mach/clock_replyXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/device/device_user.c, osfmk/device/device.h, osfmk/device/device_server.c, osfmk/device/device_server.h, osfmk/device/deviceXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Generating osfmk/UserNotification/UNDReplyUser.c, osfmk/UserNotification/UNDReply.h, osfmk/UserNotification/UNDReplyServer.c, osfmk/UserNotification/UNDReplyServer.h, osfmk/UserNotification/UNDReplyXtraceMig.c
clang-14.0: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
Built target lkm_generate
Built target rtsig
Built target rtsig_h
Building the Linux kernel module
make[4] : on entre dans le répertoire « /home/unixman/git/darling/src/external/lkm »
Running kernel version is 5.18.6-1-default
rm -f darling-mach.mod.o
make -C /lib/modules/5.18.6-1-default/build M=/home/unixman/git/darling/src/external/lkm modules
make[5] : on entre dans le répertoire « /home/unixman/git/darling/src/external/lkm »
make[5]: *** /lib/modules/5.18.6-1-default/build : Aucun fichier ou dossier de ce type. Arrêt.
make[5] : on quitte le répertoire « /home/unixman/git/darling/src/external/lkm »
make[4]: *** [Makefile:618 : default] Erreur 2
make[4] : on quitte le répertoire « /home/unixman/git/darling/src/external/lkm »
make[3]: *** [src/external/lkm/CMakeFiles/lkm.dir/build.make:71 : src/external/lkm/CMakeFiles/lkm] Erreur 2
make[2]: *** [CMakeFiles/Makefile2:93866 : src/external/lkm/CMakeFiles/lkm.dir/all] Erreur 2
make[1]: *** [CMakeFiles/Makefile2:93873 : src/external/lkm/CMakeFiles/lkm.dir/rule] Erreur 2
make: *** [Makefile:35542 : lkm] Erreur 2

il semblerait qu'il échoue à trouver au moment du passage du compilateur par les modules (pas de "build' - comment obtenir ce répertoire?), mais il y a peut être aussi une étape que j'ai loupé, sait-on jamais? J'ai bien installé les kernel-source, kernel-devel && co

donc voila si quelqu'un peut me filer un coup de main ce serait vraiment apprécié.

Bon dimanche à tous et toutes!
Lucky

Re : Compilation de Darling foireuse (émulateur Mac OSX) - build manquant

Répondre #1
Dans ton tuto, on trouve :
Citer
Kernel Module

Darling also requires a kernel module named darling-mach:

$ make lkm
$ sudo make lkm_install

If module installation produces warnings such as SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175, then these can be usually ignored, unless you configured your system to enforce secure boot.

The kernel module is an experimental piece of code; it's likely to have many bugs and vulnerabilities. Be prepared for kernel hangups and crashes, and run Darling on a virtual machine if possible.
Le mieux serait peut-être de faire un rapport sur leur github non ?

 

Re : Compilation de Darling foireuse (émulateur Mac OSX) - build manquant

Répondre #2
@chalu oui sûrement, mais ça n'a pas l'air d'être une erreur liée à openssl
je pense que ça foire car il n'y a pas de répertoire "build" dans /lib/modules/"uname-r"/build
lkm ne le trouve pas, et pour cause il n'y est pas! donc je cherche un moyen de créer ce répertoire build sous SUSE.
j'ai essayé avec plusieurs noyaux: kernel-défault, kernel-vanilla et kernel-preempt, même résultat à chaque fois (même si j'ai eu le build sous vanilla et preempt.)
je commence à me demander si je ne dois pas recompiler le noyau pour que ça fonctionne, mais bon ça ne fait pas parti de mes talents!

Mais je vais essayer de faire un rapport là bas et je vous tiens au jus.