I have an error while building Darling
[ 48%] Built target Xcursor
[ 48%] Built target gif
[ 48%] Built target magic
[ 48%] Built target file
[ 48%] Generating ../../../certs/Certificates.bundle
File "../../../../src/external/openssl_certificates/scripts/generate-ca-bundle.py", line 106
tag: DERTag
^
SyntaxError: invalid syntax
src/external/openssl_certificates/CMakeFiles/build-security-certificates.dir/build.make:80: recipe for target 'certs/Certificates.bundle' failed
make[2]: *** [certs/Certificates.bundle] Error 1
CMakeFiles/Makefile2:31948: recipe for target 'src/external/openssl_certificates/CMakeFiles/build-security-certificates.dir/all' failed
make[1]: *** [src/external/openssl_certificates/CMakeFiles/build-security-certificates.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
I saw on this forum a solution to this problem
the first error was at ~ 48% because libdbus-1.so was not installed, I installed it from apt install libdbus-1-dev (it is not there in the docs ...)
But this did not solve my problem, libdbus-1.so was already installed. Help me, please.
P.S.
clang version 6.0.1-0+deb8u1 (tags/RELEASE_601/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Distributor ID: Debian
Description: Debian GNU/Linux 8.11 (jessie)
Release: 8.11
Codename: jessie
Do you have Python 3 installed? If not, try installing it.
Sorry, that's my bad. I originally wrote that script for Python 3 (as I though we already had it in our dependencies), but I'll rewrite it later for Python 2 (since I know that's one of our dependencies).
Yes, I have python 3:
python3 --version
Python 3.4.2
In my _dpkg --list_
rc python 2.7.9-1 amd64 interactive high-level object-oriented language
ii python-minimal 2.7.9-1 amd64 minimal subset of the Python language (default
rc python2.7 2.7.9-2+deb8u5 amd64 Interactive high-level object-oriented language
ii python2.7-minimal 2.7.9-2+deb8u5 amd64 Minimal subset of the Python language (version
rc python3 3.4.2-2 amd64 interactive high-level object-oriented language
rc python3-gi 3.14.0-1 amd64 Python 3 bindings for gobject-introspection lib
ii python3-minimal 3.4.2-2 amd64 minimal subset of the Python language (default
ii python3.4 3.4.2-1+deb8u7 amd64 Interactive high-level object-oriented language
ii python3.4-minimal 3.4.2-1+deb8u7 amd64
But can it use an old version of Python2, which may also be installed, instead of installed Python3? I deleted old version, but it is still on the list. I do not know how to remove the old version completely. And is it possible to choose a version of Python for Darling building? Or is the latest installed always used?
Ok, I should've been a bit more specific: do you have Python 3.5+? (and I already know the answer from your comment above: no). The thing is, I'm so used to strictly-typed languages that I decided to use Python 3.5's various type hinting features (in case it isn't obvious, I don't write much Python).
For now, try seeing if you can install Python 3.8. I'm going to rewrite the script for Python 2 in a bit.
since I know that's one of our dependencies
Wait, is it?
Debian 8 is also rather old - you'll likely encounter the issue about building the darling kernel module against extremely old kernel too
since I know that's one of our dependencies
Wait, is it?
Yup:
Debian 10
... libcap2-bin git python2 libglu1-mesa-dev ...
Debian Testing
... libcap2-bin git python2 libglu1-mesa-dev ...
Ubuntu 18.04/20.04
For Ubuntu 20.04, also installpython2.
Arch Linux & Manjaro
... cairo libtiff python2 mesa llvm ...
Fedora and CentOS
... dbus-devel flex python2 glibc-devel.i686 ...
I honestly don't think we should write scripts for Python 2 since it's officially deprecated, but I do think I should at least rewrite the script to remove the type hints to allow older Python 3 versions to run it.
Thanks for your advice.
It so happened that stopped at python version 3.6. Now the whole trouble is to run the command "cmake .." from official instruction.
cmake ..
-bash: / usr / local / bin / cmake: / usr / bin / python: bad interpreter: No such file or directory
The fact is that Python is installed at /usr/local/bin/python3.6, and it searches for it in another directory. How to change the default version of Python?
I honestly don't think we should write scripts for Python 2 since it's officially deprecated, but I do think I should at least rewrite the script to remove the type hints to allow older Python 3 versions to run it.
Exactly, Python 2 is loooong deprecated, any idea what do we need it for? And yeah, let's supported older Python 3's.
We use Python 2 to pyc the Apple Python 2 files we bundle.
It so happened that stopped at python version 3.6. Now the whole trouble is to run the command "cmake .." from official instruction.
cmake .. -bash: / usr / local / bin / cmake: / usr / bin / python: bad interpreter: No such file or directory
@AndJayJet Are you sure you're getting this error during configuration and not when trying to build? Because if you are getting the error during configuration, then it sounds like your system's somehow broken. We don't run any Python scripts during configuration (at least as far as I can tell).
How did you install Python 3.6? And did you uninstall Python 3.4? A temporary solution would be to create a symlink in /usr/bin to the correct executable (you said it's in /usr/local/bin/python3.6), but I would recommend reverting back to the Python your system came with and just waiting until that script is rewritten (I'm going to rewrite it right now).
Before you guys spend more time on this particular issue - debian 8 apparently ships a 3.x kernel, and @AndJayJet probably need to mention if he/she is willing to run something a lot newer. FWIW, AFAIK darling does not even support the 4.x kernels! (v5.8 is currently in RC, I think)
@AndJayJet Alright, you should be able to use your system's default Python 3 now (after updating to the latest code on master). Note that as @HinTak said, Debian 8 ships a pretty old kernel, and last I checked, Darling only builds on 5.x kernels, so you might run into an issue later when building the kernel module.
I decided to upgrade the OS from Debian 8.2 to Ubuntu latest version. Also immediately installed Python 3.7 without any problems. And the installation was successful without any errors. :)
But while running darling shell I caught an error
modprobe: FATAL: Module darling-mach not found in directory /lib/modules/4.15.0-106-generic
Failed to load the kernel module
The official documentation says
If Secure Boot is enabled you may see:
modprobe: ERROR: could not insert 'darling_mach': Operation not permitted
Failed to load the kernel module
Use the following commands to generate a key and self-sign the kernel module:
# Generate Key
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Darling LKM/"
# Enroll Key
sudo mokutil --import MOK.der
# Sign Module
sudo kmodsign sha512 MOK.priv MOK.der /lib/modules/$(uname -r)/extra/darling-mach.ko
# Reboot System and Enroll Key
But I caught an error while running sudo mokutil --import MOK.der:
EFI variables are not supported on this system
Maybe you know how to solve this problem?
@AndJayJet your messages clearly show you are using a version 4.x kernel ( the 4.15.0-106-generic part), which is too old. Besides, you did not do make lkm nor make lkm_install (which would have failed, as the old kernel issue)
Ubuntu 20.04 ships a 5.4 kernel, so it is curious why you have 4.x
Thank you very much! I updated the kernel and now darling works!
I take this opportunity to ask the following question:
When I launch the application, it displays the following:
dyld: Library not loaded: /System/Library/Frameworks/CoreAudioKit.framework/Versions/A/CoreAudioKit
Reason: image not found; code: 1
CoreAudioKit.framework really is not exists. How can I add it?
This framework exists my real MacBook, I tried to manually transfer it, but nothing worked out for me, I'm doing something wrong.
Reason: no suitable image found. Did find:
/System/Library/Frameworks/CoreAudioKit.framework/Versions/A/CoreAudioKit: stat () failed with errno = 20
/System/Library/Frameworks/CoreAudioKit.framework/Versions/A/CoreAudioKit: stat () failed with errno = 20
abort_with_payload: reason: Library not loaded: /System/Library/Frameworks/CoreAudioKit.framework/Versions/A/CoreAudioKit
Reason: no suitable image found. Did find:
/System/Library/Frameworks/CoreAudioKit.framework/Versions/A/CoreAudioKit: stat () failed with errno = 20
/System/Library/Frameworks/CoreAudioKit.framework/Versions/A/CoreAudioKit: stat () failed with errno = 20; code: 1
Abort trap: 6
That looks like a framework we haven鈥檛 created/implemented yet. Copying over frameworks from a real Mac won鈥檛 work. What you can do is try to stub it with these instructions. Note that stubs only allow the application to load; they won鈥檛 actually do what they鈥檙e supposed to do.
If everything else is working properly, I鈥檓 going to go ahead and close this issue (since it鈥檚 for a build issue).
Most helpful comment
Debian 8 is also rather old - you'll likely encounter the issue about building the darling kernel module against extremely old kernel too