This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM335X: Adding GTK+3 and gtkmm to Arago build

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

My company wish to develop GTK application in C++, after few modifications to gtk+3 recipe in arago I was able to build it and include in rootfs. However I have a problem with gtkmm library - the build brakes on cairomm-1.11.2 at linking stage:

MACHINE=am335x-evm bitbake cairomm

| /bin/grep: /mnt/Build_disk/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabihf/lib/libstdc++.la: No such file or directory
| sed: can't read /mnt/Build_disk/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabihf/lib/libstdc++.la: No such file or directory
| arm-linux-gnueabi-libtool:   error: '/mnt/Build_disk/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabihf/lib/libstdc++.la' is not a valid libtool archive
| Makefile:510: recipe for target 'libcairomm-1.0.la' failed

It looks like the libpath is too long with unexpected home dir in the middle. I've tried also newer version cairomm-1.15.5 but it fails on configuration stage.
Did anybody included gtkmm and all its dependencies into arago?

These are the changes i had to make in gtk+3:

diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc
index 83e9b92..f9962af 100644
--- a/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -49,7 +49,7 @@ PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fon
# this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build
PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,libepoxy"
PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl"
-PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/mesa wayland-native"
+PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon wayland-native"

do_install_append() {
        mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0
@@ -100,7 +100,7 @@ GTKBASE_RRECOMMENDS ?= "liberation-fonts \
                         shared-mime-info \
                         adwaita-icon-theme-symbolic \
                         "
-GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1"
+GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc"

RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}"
RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}"

I know that i should do that in bbappend file, I'll clear everything out when it works.

  • The software team have been notified. They will respond here.
  • Hello Peter,

    Go to build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm/lib and type ln -sf libstdc++.so.6 libstdc++.so
    Open build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm/usr/lib/libsigc-2.0.la file and cut the /home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabihf and left =/lib/libstdc++.la part.

    Best regards,
    Kemal

  • Thanks!
    This kind of works. I had to do this for many other files to build gtkmm_3.20.1 and the fix is relatively transitory because it's in build directory - i have to do it each time i change version of a package or do cleansstate or run build on different machine. Do you know how i can fix that in sources? is it a problem with automake or gtkmm packages?
  • In
    tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/gtkmm/3.20.1-r3/deploy-ipks/armv7ahf-neon
    I can see the gtkmm-dev_3.20.1-r3_armv7ahf-neon.ipk
    How can I add this to my SDK's sysroot folder so I can develop against it?
  • This kind of works. I had to do this for many other files to build gtkmm_3.20.1 and the fix is relatively transitory because it's in build directory - i have to do it each time i change version of a package or do cleansstate or run build on different machine. Do you know how i can fix that in sources? is it a problem with automake or gtkmm packages?
  • It is so easy. Remove the /home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabihf and left /lib part in toolchain $HOME/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/lib/libstdc++.la. Comment out # rm -f ${D}${base_libdir}/libstdc++.so in sources/meta-linaro/meta-linaro-toolchain/recipes-devtools/external-linaro-toolchain/external-linaro-toolchain.bb and add IMAGE_INSTALL_append = " cairomm" line to build/conf/local.conf

  • Ok that helped, i can now rebuild whole gtkmm-3.20.1 package but i'm missing dev packages in sdk. In tisdk-rootfs-image.bb I've added:
    IMAGE_INSTALL+= \
    gtk+3 \
    gtkmm \
    sqlite3 \
    and i do see libs and pkgconfig files in arago-core-tiskd-image for sqlite3 but not for gtkmm.

    Also in arago-core-tisdk-image.inc I've tried:
    TOOLCHAIN_TARGET_TASK += "gtkmm-dev"
    SDKIMAGE_FEATURES += "dev-pkgs"

    Am i something missing? Here's my bb file for gtkmm:

    SUMMARY = "C++ bindings for the GTK+ toolkit"
    HOMEPAGE = "http://www.gtkmm.org/"
    SECTION = "libs"
    LICENSE = "LGPLv2.1 & GPLv2"
    LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
    file://COPYING.tools;md5=751419260aa954499f7abaabaa882bbe"
    PR = "r3"
    DEPENDS = "atkmm pangomm glibmm gtk+3 cairomm"
    inherit gnome autotools pkgconfig distro_features_check
    ANY_OF_DISTRO_FEATURES = "x11 wayland"
    GNOME_COMPRESS_TYPE = "xz"
    #SRC_URI[archive.md5sum] = "883e9046768b3a5afc8e365988823e77"
    SRC_URI[archive.sha256sum] = "051de1b8756ca6ec61f26264338cfc3060af936fd70bf4558bfe1e115418c612"
    EXTRA_OECONF = " --disable-documentation "
    FILES_${PN}-dev += "${libdir}/*/include ${libdir}/*/proc/m4"
    BBCLASSEXTEND = "native nativesdk"
  • Append "gtkmm" to IMAGE_INSTALL_append and "dev-pkgs" to EXTRA_IMAGE_FEATURES in your local.conf file.

  • Well I don't want to put dev packages to my target rootfs but to sdk. Anyway after i put dev-pkgs do_rootfs fails and in log i see this:
    Collected errors:
    * check_conflicts_for: The following packages conflict with openssh:
    * check_conflicts_for: dropbear *
    * opkg_solver_install: Cannot install package openssh-dev.

    I've tried removing openssh-dev by:
    IMAGE_INSTALL_remove = "openssh"
    IMAGE_INSTALL_remove = "openssh-dev"
    in local.conf with no result. I'm curious why libsqlite3-dev package went into SDK without any problem.
  • dropbear is in conflict with openssh. IMAGE_INSTALL_remove = "openssh" is not enough, you need to BBMASK="oe-core/meta/recipes-connectivity/openssh/openssh_7.3p1.bb" recipe too.

  • After adding openssh to BBMASK I got the image but as I suspected the gtkmm-dev went into rootfs image for target instead of sdk. But I found different solution.

    I've appended packagegroup-arago-tisdk-addons-sdk-target.bb with:
    UTILS += "gtkmm-dev"


    Thanks Kemal for help!