0

I'm trying to install Qemu in Ubuntu 18.04 but I guess there is a problem with the Makefile.

./configure runs fine, but when i try to 'make' it, it exits with an error:

contrib/elf2dmp/download.c:9:10: fatal error: curl/curl.h: Arquivo ou diretório inexistente
 #include <curl/curl.h>
          ^~~~~~~~~~~~~
compilation terminated.
/home/usr/Programas/qemu-4.1.0-rc1/rules.mak:69: recipe for target 'contrib/elf2dmp/download.o' failed

I would gladly accept some help to solve this, since I cannot figure it out. Thanks!

1 Answer 1

0

The compiler is looking for a system header file (provided by the libcurl library) which isn't present on your system. For Ubuntu 18.04 this should be in the libcurl4-gnutls-dev package, so if you install that and then do a 'make clean' and then repeat configure and make it ought to build OK.

In theory configure should have noticed that you don't have the curl library dev package installed and just disabled the parts of QEMU that require it. I suspect this is an upstream bug. I haven't been able to reproduce your setup, but I have a good guess about what the problem is, and I think this patch to QEMU should fix it: https://patchew.org/QEMU/[email protected]/ -- so if you could test that that would be helpful.

NB: If your /etc/apt/sources.list has the correct deb-src lines in it, then you can use "apt build-dep qemu" to install all the -dev packages that would be needed to build the official Ubuntu QEMU. This might help you to avoid surprises in future where it turns out that the QEMU you've compiled yourself is missing some optional functionality because a -dev package wasn't present at compile time.

3
  • Hmm. I can't repro this compile failure with libcurl4-gnutls-dev not installed, and I've found the configure check that only adds it to the things to be compiled if configure found curl/curl.h; so I'm not sure what's going wrong for you. Perhaps installing the package will help anyway? Jul 19, 2019 at 9:38
  • I am going to look into it, thanks for taking the time to answer. Jul 19, 2019 at 15:12
  • The patch I linked to is going to be in QEMU 4.1 rc2. Jul 22, 2019 at 15:01

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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