Configure does not find XCB on Solaris 11.4 (Qt 5.13)
-
Hi,
I'm trying to build Qt 5.13 on Solaris 11.4 GA. It actually builds surprisingly well considering it is an unsupported platform, requiring just a few modifications, the only problem is that it seems like configure does not detect XCB properly,, causing the X11 backend to be disabled, which I obviously do not want.
Here you can see that XCB files appear to be present on the system:
root@solaris:~# ls /usr/include/xcb bigreq.h present.h sync.h xcb_event.h xcbext.h xprint.h composite.h randr.h xc_misc.h xcb_ewmh.h xevie.h xproto.h damage.h record.h xcb.h xcb_icccm.h xf86dri.h xselinux.h dpms.h render.h xcb_atom.h xcb_image.h xfixes.h xtest.h dri2.h res.h xcb_aux.h xcb_keysyms.h xia.h xv.h dri3.h screensaver.h xcb_bitops.h xcb_pixel.h xinerama.h xvmc.h ge.h shape.h xcb_cursor.h xcb_renderutil.h xinput.h glx.h shm.h xcb_errors.h xcb_util.h xkb.h root@solaris:~# ls /usr/lib/libxcb* /usr/lib/libxcb-composite.a /usr/lib/libxcb-present.so /usr/lib/libxcb-xevie.so.0 /usr/lib/libxcb-composite.la /usr/lib/libxcb-present.so.0 /usr/lib/libxcb-xevie.so.0.0.0 /usr/lib/libxcb-composite.so /usr/lib/libxcb-present.so.0.0.0 /usr/lib/libxcb-xf86dri.a /usr/lib/libxcb-composite.so.0 /usr/lib/libxcb-randr.a /usr/lib/libxcb-xf86dri.la /usr/lib/libxcb-composite.so.0.0.0 /usr/lib/libxcb-randr.la /usr/lib/libxcb-xf86dri.so /usr/lib/libxcb-cursor.so /usr/lib/libxcb-randr.so /usr/lib/libxcb-xf86dri.so.0 /usr/lib/libxcb-cursor.so.0 /usr/lib/libxcb-randr.so.0 /usr/lib/libxcb-xf86dri.so.0.0.0 /usr/lib/libxcb-cursor.so.0.0.0 /usr/lib/libxcb-randr.so.0.1.0 /usr/lib/libxcb-xfixes.a /usr/lib/libxcb-damage.a /usr/lib/libxcb-record.a /usr/lib/libxcb-xfixes.la /usr/lib/libxcb-damage.la /usr/lib/libxcb-record.la /usr/lib/libxcb-xfixes.so /usr/lib/libxcb-damage.so /usr/lib/libxcb-record.so /usr/lib/libxcb-xfixes.so.0 /usr/lib/libxcb-damage.so.0 /usr/lib/libxcb-record.so.0 /usr/lib/libxcb-xfixes.so.0.0.0 /usr/lib/libxcb-damage.so.0.0.0 /usr/lib/libxcb-record.so.0.0.0 /usr/lib/libxcb-xinerama.a /usr/lib/libxcb-dpms.a /usr/lib/libxcb-render-util.so /usr/lib/libxcb-xinerama.la /usr/lib/libxcb-dpms.la /usr/lib/libxcb-render-util.so.0 /usr/lib/libxcb-xinerama.so /usr/lib/libxcb-dpms.so /usr/lib/libxcb-render-util.so.0.0.0 /usr/lib/libxcb-xinerama.so.0 /usr/lib/libxcb-dpms.so.0 /usr/lib/libxcb-render.a /usr/lib/libxcb-xinerama.so.0.0.0 /usr/lib/libxcb-dpms.so.0.0.0 /usr/lib/libxcb-render.la /usr/lib/libxcb-xinput.a /usr/lib/libxcb-dri2.a /usr/lib/libxcb-render.so /usr/lib/libxcb-xinput.la /usr/lib/libxcb-dri2.la /usr/lib/libxcb-render.so.0 /usr/lib/libxcb-xinput.so /usr/lib/libxcb-dri2.so /usr/lib/libxcb-render.so.0.0.0 /usr/lib/libxcb-xinput.so.0 /usr/lib/libxcb-dri2.so.0 /usr/lib/libxcb-res.a /usr/lib/libxcb-xinput.so.0.1.0 /usr/lib/libxcb-dri2.so.0.0.0 /usr/lib/libxcb-res.la /usr/lib/libxcb-xkb.a /usr/lib/libxcb-dri3.a /usr/lib/libxcb-res.so /usr/lib/libxcb-xkb.la /usr/lib/libxcb-dri3.la /usr/lib/libxcb-res.so.0 /usr/lib/libxcb-xkb.so /usr/lib/libxcb-dri3.so /usr/lib/libxcb-res.so.0.0.0 /usr/lib/libxcb-xkb.so.1 /usr/lib/libxcb-dri3.so.0 /usr/lib/libxcb-screensaver.a /usr/lib/libxcb-xkb.so.1.0.0 /usr/lib/libxcb-dri3.so.0.0.0 /usr/lib/libxcb-screensaver.la /usr/lib/libxcb-xprint.so /usr/lib/libxcb-errors.so /usr/lib/libxcb-screensaver.so /usr/lib/libxcb-xprint.so.0 /usr/lib/libxcb-errors.so.0 /usr/lib/libxcb-screensaver.so.0 /usr/lib/libxcb-xprint.so.0.0.0 /usr/lib/libxcb-errors.so.0.0.0 /usr/lib/libxcb-screensaver.so.0.0.0 /usr/lib/libxcb-xtest.a /usr/lib/libxcb-ewmh.so /usr/lib/libxcb-shape.a /usr/lib/libxcb-xtest.la /usr/lib/libxcb-ewmh.so.2 /usr/lib/libxcb-shape.la /usr/lib/libxcb-xtest.so /usr/lib/libxcb-ewmh.so.2.0.0 /usr/lib/libxcb-shape.so /usr/lib/libxcb-xtest.so.0 /usr/lib/libxcb-glx.a /usr/lib/libxcb-shape.so.0 /usr/lib/libxcb-xtest.so.0.0.0 /usr/lib/libxcb-glx.la /usr/lib/libxcb-shape.so.0.0.0 /usr/lib/libxcb-xv.a /usr/lib/libxcb-glx.so /usr/lib/libxcb-shm.a /usr/lib/libxcb-xv.la /usr/lib/libxcb-glx.so.0 /usr/lib/libxcb-shm.la /usr/lib/libxcb-xv.so /usr/lib/libxcb-glx.so.0.0.0 /usr/lib/libxcb-shm.so /usr/lib/libxcb-xv.so.0 /usr/lib/libxcb-icccm.so /usr/lib/libxcb-shm.so.0 /usr/lib/libxcb-xv.so.0.0.0 /usr/lib/libxcb-icccm.so.4 /usr/lib/libxcb-shm.so.0.0.0 /usr/lib/libxcb-xvmc.a /usr/lib/libxcb-icccm.so.4.0.0 /usr/lib/libxcb-sync.a /usr/lib/libxcb-xvmc.la /usr/lib/libxcb-image.so /usr/lib/libxcb-sync.la /usr/lib/libxcb-xvmc.so /usr/lib/libxcb-image.so.0 /usr/lib/libxcb-sync.so /usr/lib/libxcb-xvmc.so.0 /usr/lib/libxcb-image.so.0.0.0 /usr/lib/libxcb-sync.so.1 /usr/lib/libxcb-xvmc.so.0.0.0 /usr/lib/libxcb-keysyms.so /usr/lib/libxcb-sync.so.1.0.0 /usr/lib/libxcb.a /usr/lib/libxcb-keysyms.so.1 /usr/lib/libxcb-util.so /usr/lib/libxcb.la /usr/lib/libxcb-keysyms.so.1.0.0 /usr/lib/libxcb-util.so.1 /usr/lib/libxcb.so /usr/lib/libxcb-present.a /usr/lib/libxcb-util.so.1.0.0 /usr/lib/libxcb.so.1 /usr/lib/libxcb-present.la /usr/lib/libxcb-xevie.so /usr/lib/libxcb.so.1.1.0
Does anyone know how configure looks up XCB and/or where the problem may be? I never worked with the Qt build system and I wasn't able to find it there. (I suspect pkg-config may play a role in this, since Solaris AFAIK does not provide the .pc files to many packages.)
-
Ah, it's the linker where the problem is, adding
-Wl,-rpath-link,/lib/64,-rpath-link,/usr/X11/lib/amd64
to QMAKE_LFLAGS fixes the problem.
Edit: This problem arose by using a custom GCC compiled to link with /usr/bin/gld (GNU ld) supplied by Oracle. The GNU ld seems like it doesn't look for shared library dependencies in the right folders, so it has to be explicitly told to do so (the folders I specified aren't all that are missing, adding /usr/lib/64 and /usr/lib/amd64 seems to fix even more libraries.)
-
Hi and welcome to devnet,
Since Qt 5.12.4, the libxkbcommon development package must be available through the system. I don't see anything related to that package in what you posted.
-
Hi and welcome to devnet,
Since Qt 5.12.4, the libxkbcommon development package must be available through the system. I don't see anything related to that package in what you posted.
Thank you for your reply. That's a good point, but in this case this is probably not the problem, since I have libxkbcommon (both headers and libraries)
and configure detects it.I think I spotted something that could be causing the problem: it's the unusual location of 64-bit libraries on modern versions of Solaris, for example the default qmake.conf for solaris-g++-64 includes this line:
QMAKE_LIBDIR_X11 = /usr/X11/lib/64
while the correct directory is /usr/X11/lib/amd64. I suspect there will be more problems like this.
Furthermore I noticed that the libxcb* files I showed in the previous post are actually some 32-bit and some 64-bit because of me stupidly installing libxcb both using the package manager and "make install" from source.
I'll roll back to the original post-installation snapshot to get rid of this crazy library mix and try it again.
-
Ah, it's the linker where the problem is, adding
-Wl,-rpath-link,/lib/64,-rpath-link,/usr/X11/lib/amd64
to QMAKE_LFLAGS fixes the problem.
Edit: This problem arose by using a custom GCC compiled to link with /usr/bin/gld (GNU ld) supplied by Oracle. The GNU ld seems like it doesn't look for shared library dependencies in the right folders, so it has to be explicitly told to do so (the folders I specified aren't all that are missing, adding /usr/lib/64 and /usr/lib/amd64 seems to fix even more libraries.)