Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 14751  / 2 Years ago, mon, august 1, 2022, 12:23:01

I am trying to compile qemu from source to get my hands dirty with its development. I cloned the package from the repository. I extracted the tarball and started with the configuration using



./configure


when I got the following error:



ERROR: DTC (libfdt) not present. Your options:
(1) Preferred: Install the DTC (libfdt) devel package
(2) Fetch the DTC submodule, using:
git submodule update --init dtc


I tried installing libfdt using sudo apt-get install libfdt-dev but this did not resolve the error.



There is a similar question I have seen but this too could not solve the error I am facing:





How do I fix this error to successfully compile qemu from source?



Edit:



Executing git submodule update --init dtc while I am still in the qemu package's directory returned the following error:



fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

More From » 12.10

 Answers
7

To fix this issue:




  • Cloned dtc from its repository and extract the tarball to qemu/dtc/.


  • Compile dtc from source using make


  • Restart configuring qemu using ./configure when in qemu directory.




The problem was qemu tries to search for dtc binaries in qemu/dtc. Even if you have installed dtc using sudo apt-get install device-tree-compiler, you will get the above error(mentioned in the question), so you probably need to have the binaries in qemu/dtc.


[#26874] Monday, August 1, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kroapathe

Total Points: 445
Total Questions: 117
Total Answers: 99

Location: Botswana
Member since Sun, Sep 19, 2021
3 Years ago
;