[Buildroot] Not able to enable GUI library on Buildroot

Peter Seiderer ps.report at gmx.net
Wed Mar 16 19:49:22 UTC 2022


Hello Avijit,

please keep buildroot at busybox.net in CC

On Wed, 16 Mar 2022 12:39:04 -0600, Avijit Das <avijitnsec at gmail.com> wrote:

> Hi Peter,
> 
> I have compiled the X11 library when I got this error.
> 
> make xlib_libX11 && make

So the gtk3 compile/test was from another defconfig?

Did you start the X11 server before running the gtk3-demo?

But not much run-time help/advice from my side as I have no suitable hardware
for testing myself...

Regards,
Peter


> 
> Thanks,
> Avijit
> 
> On Wed, Mar 16, 2022 at 12:36 PM Peter Seiderer <ps.report at gmx.net> wrote:
> 
> > Hello Avijit,
> >
> > On Tue, 15 Mar 2022 19:04:02 -0600, Avijit Das <avijitnsec at gmail.com>
> > wrote:
> >  
> > > Hi,
> > >
> > > I am building Buildroot for an imx8mm board. The HDMI display is up. I
> > > validated the display using the fb-test. I am trying to enable a graphics
> > > library, either gtk3 or qt5.
> > >
> > > *gtk3 *
> > > When I am enabling the gtk3 library, if I run the demo application, I am
> > > getting the following error.
> > >
> > > # /usr/bin/gtk3-demo
> > >
> > > (gtk3-demo:350): Gtk-WARNING **: 01:21:03.518: cannot open display:
> > > #
> > >
> > > I have tried setting the display to localhost:0.0, did not work.
> > >
> > > *QT5*
> > > The widget library is not building. There is a compilation error:
> > >
> > > qkeyeventtransition.o .obj/qmouseeventtransition.o
> > > .obj/qbasickeyeventtransition.o .obj/qbasicmouseeventtransition.o
> > > .obj/qgraphicseffect.o .obj/qpixmapfilter.o .obj/qrc_qstyle.o
> > > .obj/qrc_qmessagebox.o .obj/moc_qwidgetrepaintmanager_p.o
> > > .obj/moc_qwidget_p.o .obj/moc_qpixmapstyle_p.o  -latomic
> > >  
> > /home/avijit/buildroot/output/build/qt5base-d16bf02a11953dcac01dca73e6f3778f293adefe/lib/libQt5Gui.so  
> > >  
> > /home/avijit/buildroot/output/build/qt5base-d16bf02a11953dcac01dca73e6f3778f293adefe/lib/libQt5Core.so  
> > > -lpthread  -lrt -lpthread -ldl
> > > ln -s libQt5Widgets.so.5.15.8 libQt5Widgets.so
> > > ln -s libQt5Widgets.so.5.15.8 libQt5Widgets.so.5
> > > ln -s libQt5Widgets.so.5.15.8 libQt5Widgets.so.5.15
> > > rm -f ../../lib/libQt5Widgets.so.5.15.8
> > > mv -f libQt5Widgets.so.5.15.8 ../../lib/libQt5Widgets.so.5.15.8
> > > rm -f ../../lib/libQt5Widgets.so
> > > rm -f ../../lib/libQt5Widgets.so.5
> > > rm -f ../../lib/libQt5Widgets.so.5.15
> > > mv -f libQt5Widgets.so ../../lib/libQt5Widgets.so
> > > mv -f libQt5Widgets.so.5 ../../lib/libQt5Widgets.so.5
> > > mv -f libQt5Widgets.so.5.15 ../../lib/libQt5Widgets.so.5.15
> > > make[2]: *** [Makefile:51: sub-src-make_first] Error 2
> > > make[1]: *** [package/pkg-generic.mk:292:
> > >  
> > /home/avijit/buildroot/output/build/qt5base-d16bf02a11953dcac01dca73e6f3778f293adefe/.stamp_built]  
> > > Error 2
> > > make: *** [Makefile:84: _all] Error 2
> > >
> > > I have attached the config file. Can you please suggest?  
> >
> > With your defconfig I get the following error (a lot of lines above in the
> > log):
> >
> >   qeglconvenience.cpp: In function ‘bool q_hasEglExtension(EGLDisplay,
> > const char*)’:
> >   qeglconvenience.cpp:418:23: error: variable ‘QList<QByteArray>
> > extensions’ has initializer but incomplete type
> >     418 |     QList<QByteArray> extensions =
> >         |                       ^~~~~~~~~~
> >   qeglconvenience.cpp:420:65: error: invalid use of incomplete type ‘class
> > QList<QByteArray>’
> >     420 |             (eglQueryString(display, EGL_EXTENSIONS))).split('
> > ');
> >         |
> >
> >
> > This can be (compile) fixed by this (buildroot) patch:
> >
> >
> > https://patchwork.ozlabs.org/project/buildroot/patch/20220316182440.17393-1-ps.report@gmx.net/
> >
> >
> > Despite of this error I get (with your provided defconfig):
> >
> >   [4/5] Compiling C object src/libepoxy.so.0.0.0.p/dispatch_common.c.o
> >   FAILED: src/libepoxy.so.0.0.0.p/dispatch_common.c.o
> >   .../host/bin/aarch64-buildroot-linux-gnu-gcc -Isrc/libepoxy.so.0.0.0.p
> > -Isrc -I../src -Iinclude -I../include -Iinclude/epoxy
> > -fdiagnostics-color=always -Wall -Winvalid-pch -std=gnu99 -O3
> > -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0
> > -fPIC -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes
> > -Wmissing-prototypes -Wnested-externs -Wbad-function-cast
> > -Wold-style-definition -Wdeclaration-after-statement -Wunused
> > -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute
> > -Wredundant-decls -Wlogical-op -Werror=implicit -Werror=nonnull
> > -Werror=init-self -Werror=main -Werror=missing-braces
> > -Werror=sequence-point -Werror=return-type -Werror=trigraphs
> > -Werror=array-bounds -Werror=write-strings -Werror=address
> > -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
> > -fno-strict-aliasing -Wno-int-conversion -fvisibility=hidden -MD -MQ
> > src/libepoxy.so.0.0.0.p/dispatch_common.c.o -MF
> > src/libepoxy.so.0.0.0.p/dispatch_common.c.o.d -o
> > src/libepoxy.so.0.0.0.p/dispatch_common.c.o -c ../src/dispatch_common.c
> >   In file included from include/epoxy/egl_generated.h:11,
> >                    from ../include/epoxy/egl.h:46,
> >                    from ../src/dispatch_common.h:59,
> >                    from ../src/dispatch_common.c:174:
> >
> > .../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL/eglplatform.h:145:10:
> > fatal error: X11/Xlib.h: No such file or directory
> >     145 | #include <X11/Xlib.h>
> >         |          ^~~~~~~~~~~~
> >   compilation terminated.
> >   ninja: build stopped: subcommand failed.
> >   make[1]: *** [package/pkg-generic.mk:292:
> > /home/seiderer/Work/Buildroot/build_imx8mmevk_qt5_001/build/libepoxy-1.5.9/.stamp_built]
> > Error 1
> >   make: *** [Makefile:23: _all] Error 2
> >
> > Regards,
> > Peter
> >  
> > >
> > > Thanks,
> > > Avijit  
> >
> >  




More information about the buildroot mailing list