All of lore.kernel.org
 help / color / mirror / Atom feed
* libGL references libX11?
@ 2016-08-21  0:40 Mark Farver
  2016-08-21  2:36 ` Mark Farver
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Farver @ 2016-08-21  0:40 UTC (permalink / raw)
  To: meta-freescale

I attempted to make a image based on core-image-weston with the
addition of just libsld2-ttf and it seems to get hung up with libGL
referencing libX11 functions:

Log data follows:
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
'arm-32', 'common-linux', 'common-glibc', 'arm-linux',
'arm-linux-gnueabi', 'common']
| DEBUG: Executing shell function do_compile
| NOTE: make -j 16
| ./arm-poky-linux-gnueabi-libtool  --tag=CC   --mode=link
arm-poky-linux-gnueabi-gcc  -march=armv7-a -marm -mfpu=neon
-mfloat-abi=hard -mcpu=cortex-a9
--sysroot=/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd
 -O2 -pipe -g -feliminate-unused-debug-types
-fdebug-prefix-map=/home/build/fsl-community-krogoth/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/libsdl2-ttf/2.0.14-r0=/usr/src/debug/libsdl2-ttf/2.0.14-r0
-fdebug-prefix-map=/home/build/fsl-community-krogoth/build/tmp/sysroots/x86_64-linux=
-fdebug-prefix-map=/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd=
 -I/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/include/freetype2
-D_REENTRANT -I/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/include/SDL2
-DHAVE_OPENGL  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o glfont
glfont.o libSDL2_ttf.la -lGL -lm -lfreetype -lSDL2
| arm-poky-linux-gnueabi-libtool: link: arm-poky-linux-gnueabi-gcc
-march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9
--sysroot=/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd
-O2 -pipe -g -feliminate-unused-debug-types
-fdebug-prefix-map=/home/build/fsl-community-krogoth/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/libsdl2-ttf/2.0.14-r0=/usr/src/debug/libsdl2-ttf/2.0.14-r0
-fdebug-prefix-map=/home/build/fsl-community-krogoth/build/tmp/sysroots/x86_64-linux=
-fdebug-prefix-map=/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd=
-I/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/include/freetype2
-D_REENTRANT -I/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/include/SDL2
-DHAVE_OPENGL -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o
.libs/glfont glfont.o  ./.libs/libSDL2_ttf.so -lGL
/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/lib/libfreetype.so
-lz /home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/lib/libSDL2.so
-ldl -lEGL /home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/lib/libwayland-cursor.so
/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/lib/libwayland-client.so
/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/lib/libffi.so
-lm /home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/lib/libxkbcommon.so
-lpthread -lrt -pthread
| /home/build/fsl-community-krogoth/build/tmp/sysroots/x86_64-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.3.0/ld:
warning: libXdamage.so.1, needed by
/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/lib/libGL.so,
not found (try using -rpath or -rpath-link)
| /home/build/fsl-community-krogoth/build/tmp/sysroots/x86_64-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.3.0/ld:
warning: libXfixes.so.3, needed by
/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/lib/libGL.so,
not found (try using -rpath or -rpath-link)
| /home/build/fsl-community-krogoth/build/tmp/sysroots/x86_64-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.3.0/ld:
warning: libXext.so.6, needed by
/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/lib/libGL.so,
not found (try using -rpath or -rpath-link)
| /home/build/fsl-community-krogoth/build/tmp/sysroots/x86_64-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.3.0/ld:
warning: libX11.so.6, needed by
/home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/lib/libGL.so,
not found (try using -rpath or -rpath-link)
| /home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/lib/libGL.so:
undefined reference to `XQueryExtension'
| /home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/lib/libGL.so:
undefined reference to `_XReply'
| /home/build/fsl-community-krogoth/build/tmp/sysroots/imx6qsabresd/usr/lib/libGL.so:
undefined reference to `XFree'
...references to many other X11 functions

This isn't the first time I've seen this when trying to get OpenGL
running without X.  Is there some other way I should be getting GL
support?

core-image-weston-sdl.bb
-------------------------------------------------------
SUMMARY = "A very basic Wayland image with a terminal"
IMAGE_FEATURES += "splash package-management ssh-server-dropbear hwcodecs"
LICENSE = "MIT"
inherit core-image distro_features_check
REQUIRED_DISTRO_FEATURES = "wayland"
CORE_IMAGE_BASE_INSTALL += "weston weston-init weston-examples
gtk+3-demo clutter-1.0-examples"
IMAGE_INSTALL += " libsdl2-ttf"

local.conf
-------------------------------------------------------
MACHINE ??= 'imx6qsabresd'
DISTRO ?= 'poky'
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K \
    ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
CONF_VERSION = "1"

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

PREFERRED_PROVIDER_jpeg = "libjpeg-turbo"
PREFERRED_PROVIDER_jpeg-native = "libjpeg-turbo-native"

DISTRO_FEATURES_LIBC = "ipv6 libc-backtrace libc-big-macros libc-bsd
libc-cxx-tests libc-catgets libc-charsets libc-crypt \
               libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt
libc-fmtmsg libc-fstab libc-ftraverse \
               libc-getlogin libc-idn libc-inet libc-inet-anl
libc-libm libc-locales libc-locale-code \
               libc-memusage libc-nis libc-nsswitch libc-rcmd
libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
               libc-utmp libc-utmpx libc-wordexp
libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
               libc-posix-wchar-io"

DISTRO_FEATURES = "alsa argp largefile usbhost wifi xattr nfs zeroconf
pci 3g ${DISTRO_FEATURES_LIBC} opengl wayland"

Anyone have any suggestions... or is this impossible becuase
libsdl2-ttf generally users FreeType (I think)?

I have an app that was written to use SDL2 on X windows to render a
GUI, and then used mplayer to superimpose a h264 video on top.  I need
accelerated video support, and apparently NXP doesn't have XV support
in the Vivante X11 driver and probably never will.  Is there any way I
can use both SDL and a video playback engine to render hardware
accelerated video?


Thank you
Mark Farver


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libGL references libX11?
  2016-08-21  0:40 libGL references libX11? Mark Farver
@ 2016-08-21  2:36 ` Mark Farver
  2016-08-21 22:40   ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Farver @ 2016-08-21  2:36 UTC (permalink / raw)
  To: meta-freescale

On Sat, Aug 20, 2016 at 8:40 PM, Mark Farver <mfarver@mindbent.org> wrote:
> I attempted to make a image based on core-image-weston with the
> addition of just libsld2-ttf and it seems to get hung up with libGL
> referencing libX11 functions:

It seems like libSDL2-ttf has an ability to render fonts using OpenGL.
This feature is enabled by the successful compilation of a test
program in .configure.

Why if I remove x11 from DISTRO_FEATURES does
sysroots/imx6qsabresd/usr/lib/libGL.so still get linked against X
libraries?  How do I find out which package was responsible for
creating that library file?

Mark Farver


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libGL references libX11?
  2016-08-21  2:36 ` Mark Farver
@ 2016-08-21 22:40   ` Burton, Ross
  2016-08-23 17:47     ` Mark Farver
  0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2016-08-21 22:40 UTC (permalink / raw)
  To: Mark Farver; +Cc: meta-freescale Mailing List

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

On 21 August 2016 at 03:36, Mark Farver <mfarver@mindbent.org> wrote:

> It seems like libSDL2-ttf has an ability to render fonts using OpenGL.
> This feature is enabled by the successful compilation of a test
> program in .configure.
>
> Why if I remove x11 from DISTRO_FEATURES does
> sysroots/imx6qsabresd/usr/lib/libGL.so still get linked against X
> libraries?  How do I find out which package was responsible for
> creating that library file?
>

So libGL is explicitly GLX, so obviously needs X11.

Yes, removing x11 from DISTRO_FEATURES will remove every trace of X11 from
your build (remove your tmp after changing the distro features though).

Ross

[-- Attachment #2: Type: text/html, Size: 1161 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libGL references libX11?
  2016-08-21 22:40   ` Burton, Ross
@ 2016-08-23 17:47     ` Mark Farver
  2016-08-23 19:44       ` Mark Farver
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Farver @ 2016-08-23 17:47 UTC (permalink / raw)
  To: meta-freescale Mailing List

[-- Attachment #1: Type: text/plain, Size: 967 bytes --]

On Aug 21, 2016 6:40 PM, "Burton, Ross" <ross.burton@intel.com> wrote:
>
> So libGL is explicitly GLX, so obviously needs X11.
> Yes, removing x11 from DISTRO_FEATURES will remove every trace of X11
from your build (remove your tmp after changing the distro features though).

I reduced my DISTRO_CONFIG and libGL is no longer built.  Not really sure
how it was being created.

Now I can build with weston, but weston itself won't start.

# tail /var/log/weston.log

[16:11:21.285] Calculating pixman format from:

                - type: 0 (aux: 0)

                - visual: 2

                - bpp: 24 (grayscale: 0)

                - red: offset: 16, length: 8, MSB: 0

                - green: offset: 8, length: 8, MSB: 0

                - blue: offset: 0, length: 8, MSB: 0

                - transp: offset: 0, length: 0, MSB: 0

[16:11:21.285] failed to create egl surface

[16:11:21.285] gl_renderer_output_create failed.

[-- Attachment #2: Type: text/html, Size: 1326 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libGL references libX11?
  2016-08-23 17:47     ` Mark Farver
@ 2016-08-23 19:44       ` Mark Farver
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Farver @ 2016-08-23 19:44 UTC (permalink / raw)
  To: meta-freescale Mailing List

On Tue, Aug 23, 2016 at 1:47 PM, Mark Farver <mfarver@mindbent.org> wrote:
> Now I can build with weston, but weston itself won't start.
>
> # tail /var/log/weston.log
>
> [16:11:21.285] Calculating pixman format from:
>                 - type: 0 (aux: 0)
>                 - visual: 2
>                 - bpp: 24 (grayscale: 0)
>                 - red: offset: 16, length: 8, MSB: 0
>                 - green: offset: 8, length: 8, MSB: 0
>                 - blue: offset: 0, length: 8, MSB: 0
>                 - transp: offset: 0, length: 0, MSB: 0
> [16:11:21.285] failed to create egl surface
> [16:11:21.285] gl_renderer_output_create failed.

Just for posterity's sake, the fix for the above issue was that the
"default_bpp" setting in the mxcfb1 device tree entry of my custom
kernel was set to 24.  Changing it to 16 resolved the issue.

    mxcfb1: fb@0 {
        compatible = "fsl,mxc_sdc_fb";
        disp_dev = "ldb";
        interface_pix_fmt = "RGB24";
        mode_str = "LDB-WVGA";
        default_bpp = <16>;
        int_clk = <0>;
        late_init = <0>;
        status = "okay";
    };

Thanks to this forum post for the solution:
https://community.nxp.com/thread/390594


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-23 19:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-21  0:40 libGL references libX11? Mark Farver
2016-08-21  2:36 ` Mark Farver
2016-08-21 22:40   ` Burton, Ross
2016-08-23 17:47     ` Mark Farver
2016-08-23 19:44       ` Mark Farver

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.