[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] undefined reference to `XOpenDisplay'

From: Peter Maydell
Subject: Re: [Qemu-discuss] undefined reference to `XOpenDisplay'
Date: Fri, 5 Jul 2019 09:57:31 +0100

On Thu, 4 Jul 2019 at 20:24, Mahmood Naderan <address@hidden> wrote:
> Hi,
> On a centos 7 based system, I hit the following error while "make install"
> is executed.
>   GEN     trace/generated-helpers.c
>   CC      m68k-softmmu/trace/control-target.o
>   CC      m68k-softmmu/gdbstub-xml.o
>   CC      m68k-softmmu/trace/generated-helpers.o
>   LINK    m68k-softmmu/qemu-system-m68k
> [root@compute-0-4 qemu-3.1.0]# make install
>     CHK version_gen.h
>   LINK    qemu-img
>   LINK    lm32-softmmu/qemu-system-lm32
> hw/lm32/milkymist.o: In function `milkymist_tmu2_create':
> /root/qemu-3.1.0/hw/lm32/milkymist-hw.h:114: undefined reference to
> `XOpenDisplay'
> /root/qemu-3.1.0/hw/lm32/milkymist-hw.h:140: undefined reference to `XFree'
> /root/qemu-3.1.0/hw/lm32/milkymist-hw.h:141: undefined reference to
> `XCloseDisplay'
> /root/qemu-3.1.0/hw/lm32/milkymist-hw.h:130: undefined reference to
> `XCloseDisplay'
> ../hw/display/milkymist-tmu2.o: In function `tmu2_glx_init':
> /root/qemu-3.1.0/hw/display/milkymist-tmu2.c:112: undefined reference to
> `XOpenDisplay'
> /root/qemu-3.1.0/hw/display/milkymist-tmu2.c:123: undefined reference to
> `XFree'
> collect2: error: ld returned 1 exit status
> make[1]: *** [qemu-system-lm32] Error 1
> make: *** [subdir-lm32-softmmu] Error 2
> [root@compute-0-4 qemu-3.1.0]#
> I found this topic
> https://stackoverflow.com/questions/2975304/undefined-reference-to-xopendisplay-in-a-qt-project

QEMU is supposed to pull in the X libraries automatically -- if it
didn't find them in configure then something is wrong. (Perhaps the
-dev versions of the xlib packages aren't installed?) We should
ideally have detected the problem in configure rather than running
on to try the build, though.

It looks like what happened here was we decided we could build
the OpenGL dependent bits of the code (in this case the milkymist-tmu2
device), which implicitly depends on X11, but we don't seem to have
been building against X11.

What were your configure arguments?

If you don't care about milkymist at all then you could just
add --disable-opengl which will definitely cause us to not try to
build this bit of the code.

You might also try a newer QEMU version.

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]