3

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).
  • did you run "git submodule update --init dtc" – Panther Feb 21 '14 at 20:51
  • @bodhi.zazen: Ran the command but got an error. – jobin Feb 21 '14 at 20:54
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.

6

From the 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

See item (2): use git submodule update --init dtc

Try get the qemu source code from the git:

# git clone git://git.qemu.org/qemu.git
# cd qemu
# git submodule init
# git submodule update --recursive
# git submodule status --recursive
65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf dtc (v1.4.0)
87eea99e443b389c978cf37efc52788bf03a0ee0 pixman (pixman-0.32.6)
b4c93802a5b2c72f096649c497ec9ff5708e4456 roms/SLOF (qemu-slof-20141202-63-gb4c9380)
4e03af8ec2d497e725566a91fd5c19dd604c18a6 roms/ipxe (v1.0.0-2016-g4e03af8)
3caee1794ac3f742315823d8447d21f33ce019e9 roms/openbios (3caee17)
c559da7c8eec5e45ef1f67978827af6f0b9546f5 roms/openhackware (heads/master)
c87a92639b28ac42bc8f6c67443543b405dc479b roms/qemu-palcode (heads/master)
33fbe13a3e2a01e0ba1087a8feed801a0451db21 roms/seabios (rel-1.8.2)
23d474943dcd55d0550a3d20b3d30e9040a4f15b roms/sgabios (heads/master)
2072e7262965bb48d7fffb1e283101e6ed8b21a8 roms/u-boot (v2014.07-rc1-79-g2072e72)
19ea12c230ded95928ecaef0db47a82231c2e485 roms/vgabios (heads/master)

And after it you can call ./configure.

  • Sorry deleting comment. My case was special. – Warren P Dec 20 '15 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.