Error Building Audacious-Qt with Kde-Neon Extension

Am trying to build this snap since February but i kept on waiting believing the KF5 extension will get fixed but its still not fixed, building this snap with gnome-extension works fine but the KF5 extensions and frameworks always gives the following error.

Successfully compiled zh_TW.po.
:: art.cc:29:10: fatal error: glib/gstdio.h: No such file or directory
::    29 | #include <glib/gstdio.h>
::       |          ^~~~~~~~~~~~~~~
:: compilation terminated.
:: Failed to compile art.cc (lib)!
:: make[5]: *** [../../buildsys.mk:419: art.lib.o] Error 1
:: make[5]: *** Waiting for unfinished jobs....
:: Compiling art-search.cc (lib)...
Leaving directory po.
:: art-search.cc:24:10: fatal error: glib.h: No such file or directory
::    24 | #include <glib.h> /* for g_dir_open, g_file_test */
::       |          ^~~~~~~~
:: compilation terminated.
:: Failed to compile art-search.cc (lib)!
:: make[5]: *** [../../buildsys.mk:420: art-search.lib.o] Error 1
:: Successfully compiled adder.cc (lib).
:: make[4]: *** [../../buildsys.mk:135: all] Error 2
:: make[3]: *** [../buildsys.mk:145: libaudcore] Error 2
:: make[2]: *** [../buildsys.mk:133: all] Error 2
:: make[1]: *** [buildsys.mk:145: src] Error 2
:: make: *** [buildsys.mk:133: all] Error 2
Failed to run the build script for part 'audacious-qt'.

Full Log : https://launchpadlibrarian.net/668494439/buildlog_snap_ubuntu_jammy_amd64_07dfaa8233ff92f96a92b2c1369288c2_BUILDING.txt.gz

Edit: Forgot to mention this occurs even if we add libglib2.0-dev as a build package

Looking into it. It could possibly be related to pkgconfig incorrect paths? I think we need to set

  • PKG_CONFIG_LIBDIR: $CRAFT_STAGE/usr/lib:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET in build environment.

FWIW I have only recently been made aware of the issue. Seems something changed in core22.

Is this complete blob needed to be directly added or in parts, if possible please expand it, i mean explain it a bit more so that i can implement it ASAP as this snap is stagnating in the wait list

parts:
   my-part:
          build-environment:
                 - PKG_CONFIG_PATH: $PKG_CONFIG_PATH:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET                   /pkgconfig:$CRAFT_STAGE/usr/lib/pkgconfig:$CRAFT_STAGE/usr/share/pkgconfig
                 - PKG_CONFIG_LIBDIR: $CRAFT_STAGE/usr/lib:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET

Hope this works. Let me know.

1 Like

Of course also the content pack version matters. This content pack is only available with the latest snapcraft in edge.

Thanks, will build soon and update you accordingly

1 Like

Do i need to specify it i mean through build-snaps etc. , i wasnt doing anything special earlier, i mean wasnt specifying anything related to the extension apart from just adding kde-neon ?

Edit: I guess i will have to use kde-105 branch just like the kde snaps ??

If you are using snapcraft from stable channel I believe it is still using kde-frameworks-5-102-qt-5-15-8-core22-sd

If you are using snapcraft from the edge channel it is using the one above. If one doesn’t work, try the other.

1 Like

Thanks for the clarification, am surely using 102 branch.

@sgmoore Still not fixed !

Here is the log ;

art.cc:29:10: fatal error: glib/gstdio.h: No such file or directory
::    29 | #include <glib/gstdio.h>
::       |          ^~~~~~~~~~~~~~~
:: compilation terminated.
:: Failed to compile art.cc (lib)!
:: make[5]: *** [../../buildsys.mk:420: art.lib.o] Error 1
:: make[5]: *** Waiting for unfinished jobs....
:: Compiling sl.po...
art-search.cc:24:10: fatal error: glib.h: No such file or directory
::    24 | #include <glib.h> /* for g_dir_open, g_file_test */
::       |          ^~~~~~~~
:: compilation terminated.
:: Failed to compile art-search.cc (lib)!
:: make[5]: *** [../../buildsys.mk:420: art-search.lib.o] Error 1
:: Successfully compiled sk.po.
:: Compiling sq.po...
Compiling sr.po...
Successfully compiled sl.po.
:: Successfully compiled sq.po.
:: Successfully compiled sr.po.
:: Compiling sr_RS.po...
Compiling ta.po...
Compiling sv.po...
Successfully compiled sr_RS.po.
:: Successfully compiled ta.po.
:: Compiling tr.po...
Successfully compiled sv.po.
:: Compiling uk.po...
Compiling uz.po...
Successfully compiled tr.po.
:: Successfully compiled uz.po.
:: Compiling zh_CN.po...
Successfully compiled uk.po.
:: Compiling zh_TW.po...
Successfully compiled zh_CN.po.
:: Successfully compiled zh_TW.po.
:: Leaving directory po.
:: Successfully compiled adder.cc (lib).
:: make[4]: *** [../../buildsys.mk:135: all] Error 2
:: make[3]: *** [../buildsys.mk:145: libaudcore] Error 2
:: make[2]: *** [../buildsys.mk:133: all] Error 2
:: make[1]: *** [buildsys.mk:145: src] Error 2
:: make: *** [buildsys.mk:133: all] Error 2
Failed to run the build script for part 'audacious-qt'. 

Here is the YAML :

Edit: fixed the space error maybe in the buildenv part ??

I had the same issue and this is the hack I had to apply, try to take a look and see if it helps. It’s basically snapcraft expand-extension and manual copy/paste of the result + removal of kde-neon extension + fix what is wrong. https://github.com/canonical/gazebo_snap/commit/d5e7611a411aa3ea497c8682f9b5179576861c83

Also, the kde snap repository is not using the kde-neon extension so this error does not apply there, see for example lines 10-11 here https://invent.kde.org/packaging/snapcraft-kde-applications/-/commit/4935b779ea1cc12b9ca70c8ad603ef9ae9f28d19 the kde-neon was commented out.

Thanks, so i have to adapt all parts of the reference yaml ??

(Note that mine was just a quick hack, I am still trying to find the real issue inside how the kde-neon extension is built/used. ) My suggestion is to make heavy use of snapcraft expand-extension with and without the kde-neon and iterate until the output is exactly the same except for the broken lines. I will attach here the broken output and the working output as a reference.

working:

name: gazebo
version: fortress
summary: Simulate before you build.
description: 'Gazebo (formerly known as Ignition [1]) is an open source robotics simulator
    maintained by Open Robotics [2].
    '
issues: https://github.com/canonical/ignition_snap
source-code: https://github.com/canonical/ignition_snap
license: Apache-2.0
grade: devel
confinement: strict
base: core22
package-repositories:
-   type: apt
    url: http://repo.ros2.org/ubuntu/main
    components:
    - main
    formats:
    - deb
    key-id: C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
    key-server: keyserver.ubuntu.com
    suites:
    - jammy
-   components:
    - main
    formats:
    - deb
    key-id: D2486D2DD83DB69272AFE98867170598AF249743
    key-server: keyserver.ubuntu.com
    suites:
    - focal
    type: apt
    url: http://packages.osrfoundation.org/gazebo/ubuntu-stable
parts:
    gazebo:
        plugin: colcon
        source: .
        colcon-cmake-args:
        - -DBUILD_TESTING=OFF
        - -DBUILD_DOCS=OFF
        - -DCMAKE_BUILD_TYPE=Release
        - -DCMAKE_C_COMPILER_LAUNCHER=ccache
        - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
        - -DSKIP_usd=true
        - -DSKIP_optix=true
        - -DCMAKE_SKIP_RPATH=TRUE
        - -DCMAKE_PREFIX_PATH=$(echo $SNAPCRAFT_CMAKE_ARGS | awk -F= '{printf("%s/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/cmake/Qt5",
            $2)}')
        - --event-handlers=console_direct+
        build-environment:
        - &id001
            ROS_VERSION: '2'
        - &id002
            ROS_DISTRO: humble
        - &id003
            PATH: /snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/bin${PATH:+:$PATH}
        - &id004
            XDG_DATA_DIRS: $CRAFT_STAGE/usr/share:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}
        - &id005
            ACLOCAL_PATH: /snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/share/aclocal${ACLOCAL_PATH:+:$ACLOCAL_PATH}
        - &id006
            SNAPCRAFT_CMAKE_ARGS: -DCMAKE_FIND_ROOT_PATH=/snap/kf5-5-105-qt-5-15-9-core22-sdk/current${SNAPCRAFT_CMAKE_ARGS:+:$SNAPCRAFT_CMAKE_ARGS}
        -   IGNITION_VERSION: fortress
        -   GZ_VERSION: fortress
        build-packages:
        - wget
        - git
        - python3-vcstool
        - ccache
        - binutils-dev
        - build-essential
        - cmake
        - curl
        - freeglut3-dev
        - libavdevice-dev
        - libbenchmark-dev
        - libcurl4-openssl-dev
        - libdart-collision-bullet-dev
        - libdart-collision-ode-dev
        - libdart-dev
        - libdart-external-ikfast-dev
        - libdart-external-odelcpsolver-dev
        - libdart-utils-urdf-dev
        - libeigen3-dev
        - libfreeimage-dev
        - libgflags-dev
        - libglew-dev
        - libgts-dev
        - libjsoncpp-dev
        - libogre-1.9-dev
        - libogre-2.2-dev
        - libprotobuf-dev
        - libprotoc-dev
        - libsqlite3-dev
        - libtinyxml2-dev
        - liburdfdom-dev
        - libwebsockets-dev
        - libxi-dev
        - libxml2-utils
        - libxmu-dev
        - libyaml-dev
        - libzip-dev
        - libzmq3-dev
        - pkg-config
        - protobuf-compiler
        - python3-distutils
        - python3-psutil
        - python3-pybind11
        - python3-yaml
        - rubocop
        - ruby
        - ruby-dev
        - ruby-ronn
        - swig
        - uuid-dev
        - xvfb
        stage-packages:
        - libcurl4
        - libyaml-dev
        - libjsoncpp25
        - libassimp5
        - libboost-regex1.74.0
        - libboost-thread1.74.0
        - libboost-iostreams1.74.0
        - libboost-program-options1.74.0
        - libboost-filesystem1.74.0
        - libccd2
        - libconsole-bridge1.0
        - libev4
        - libfcl0.7
        - libfreeimage3
        - libbinutils
        - libgts-0.7-5
        - libilmbase25
        - libjxr0
        - libnorm1
        - liboctomap1.9
        - libode8
        - libopenexr25
        - libpgm-5.3-0
        - libprotobuf23
        - libraw20
        - libruby3.0
        - libsodium23
        - libtinyxml2-9
        - libtinyxml2.6.2v5
        - liburdfdom-model3.0
        - libwebsockets16
        - libxaw7
        - libxmu6
        - libxpm4
        - libzmq5
        - libdart6.12
        - libdart-collision-bullet6.12
        - libdart-collision-ode6.12
        - libdart-external-odelcpsolver6.12
        - libogre-1.9.0v5
        - libogre-2.2
        - ros-humble-ros-environment
        - ros-humble-ros2-controllers
        override-pull: 'craftctl default

            scripts/override_pull.sh

            '
        override-build: "craftctl default\nfor entry in \"$SNAPCRAFT_PART_INSTALL/opt/ros/snap/share/ignition\"\
            /*.yaml; do\n  sed -i \"s|$SNAPCRAFT_PART_INSTALL|/snap/$SNAPCRAFT_PROJECT_NAME/current|\"\
            \ \"$entry\"\ndone\n"
    fastdds-no-shared-memory:
        plugin: dump
        source: snap/local/
        organize:
            fastdds_no_shared_memory.xml: usr/share/
        build-environment:
        - *id001
        - *id002
        - *id003
        - *id004
        - *id005
        - *id006
    cleanup:
        after:
        - gazebo
        plugin: nil
        build-packages:
        - fd-find
        override-prime: '/root/project/snap/local/cleanup.sh

            '
        build-environment:
        - *id001
        - *id002
        - *id003
        - *id004
        - *id005
        - *id006
    kde-neon/sdk:
        source: /snap/snapcraft/current/share/snapcraft/extensions/desktop/kde-neon
        plugin: make
        make-parameters:
        - PLATFORM_PLUG=kf5-5-105-qt-5-15-9-core22
        build-snaps:
        - kf5-5-105-qt-5-15-9-core22-sdk
        build-environment:
        - *id001
        - *id002
    ros2-humble/ros2-launch:
        source: /snap/snapcraft/x1/share/snapcraft/extensions/ros2
        plugin: make
        build-packages:
        - ros-humble-ros-environment
        - ros-humble-ros-workspace
        - ros-humble-ament-index-cpp
        - ros-humble-ament-index-python
apps:
    gz:
        environment:
            RUBYLIB: $SNAP/usr/local/lib/site_ruby/3.0.0:$SNAP/usr/local/lib/$SNAPCRAFT_ARCH_TRIPLET/site_ruby:$SNAP/usr/local/lib/site_ruby:$SNAP/usr/lib/ruby/vendor_ruby/3.0.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ruby/vendor_ruby/3.0.0:$SNAP/usr/lib/ruby/vendor_ruby:$SNAP/usr/lib/ruby/3.0.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ruby/3.0.0
            IGN_HOMEDIR: $SNAP_USER_DATA
            GZ_HOMEDIR: $SNAP_USER_DATA
            IGN_CONFIG_PATH: $SNAP/opt/ros/snap/share/ignition
            GZ_CONFIG_PATH: $SNAP/opt/ros/snap/share/ignition
            IGN_RENDERING_RESOURCE_PATH: $SNAP/opt/ros/snap/share/ignition/ignition-rendering6
            GZ_RENDERING_RESOURCE_PATH: $SNAP/opt/ros/snap/share/ignition/ignition-rendering6
            IGN_GAZEBO_PHYSICS_ENGINE_PATH: $SNAP/opt/ros/snap/lib/ign-physics-5/engine-plugins
            GZ_SIM_PHYSICS_ENGINE_PATH: $SNAP/opt/ros/snap/lib/ign-physics-5/engine-plugins
            OGRE2_RESOURCE_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/OGRE-2.2/OGRE
            OGRE_RESOURCE_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/OGRE-1.9.0
            IGN_GAZEBO_SYSTEM_PLUGIN_PATH: $SNAP/opt/ros/snap/lib
            GZ_SIM_SYSTEM_PLUGIN_PATH: $SNAP/opt/ros/snap/lib
            IGN_RENDERING_PLUGIN_PATH: $SNAP/opt/ros/snap/lib:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/OGRE-2.2/OGRE:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/OGRE-1.9.0
            GZ_RENDERING_PLUGIN_PATH: $SNAP/opt/ros/snap/lib:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/OGRE-2.2/OGRE:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/OGRE-1.9.0
            IGN_SENSORS_PLUGIN_PATH: $SNAP/opt/ros/snap/lib
            GZ_SENSORS_PLUGIN_PATH: $SNAP/opt/ros/snap/lib
            LD_LIBRARY_PATH: $SNAP/usr/local/lib/:$SNAP/usr/local/lib/$SNAPCRAFT_ARCH_TRIPLET/:$SNAP/usr/lib/:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/:$SNAP/usr/local/lib/site_ruby/3.0.0:$SNAP/usr/local/lib/$SNAPCRAFT_ARCH_TRIPLET/site_ruby:$SNAP/usr/local/lib/site_ruby:$SNAP/usr/lib/ruby/vendor_ruby/3.0.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ruby/vendor_ruby/3.0.0:$SNAP/usr/lib/ruby/vendor_ruby:$SNAP/usr/lib/ruby/3.0.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ruby/3.0.0:/snap/kf5-5-105-qt-5-15-9-core22/current/lib/$CRAFT_ARCH_TRIPLET:/snap/kf5-5-105-qt-5-15-9-core22/current/usr/lib/$CRAFT_ARCH_TRIPLET:/snap/kf5-5-105-qt-5-15-9-core22/current/usr/lib:/snap/kf5-5-105-qt-5-15-9-core22/current/usr/lib/vala-current:/snap/kf5-5-105-qt-5-15-9-core22/current/usr/lib/$CRAFT_ARCH_TRIPLET/pulseaudio${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
            IGN_GAZEBO_RENDER_ENGINE_PATH: $SNAP/opt/ros/snap/lib/ign-rendering-6/engine-plugins/
            GZ_SIM_RENDER_ENGINE_PATH: $SNAP/opt/ros/snap/lib/ign-rendering-6/engine-plugins/
            ROS_VERSION: '2'
            ROS_DISTRO: humble
            PYTHONPATH: $SNAP/opt/ros/humble/lib/python3.10/site-packages:$SNAP/usr/lib/python3/dist-packages:${PYTHONPATH}
            ROS_HOME: $SNAP_USER_DATA/ros
        command: usr/bin/ruby $SNAP/opt/ros/snap/bin/ign
        plugs:
        - desktop
        - desktop-legacy
        - opengl
        - wayland
        - x11
        - network
        - network-bind
        - home
        command-chain:
        - snap/command-chain/ros2-launch
        - snap/command-chain/desktop-launch
    ros-gz-create:
        command: opt/ros/humble/bin/ros2 run ros_ign_gazebo create
        environment:
            FASTRTPS_DEFAULT_PROFILES_FILE: ${SNAP}/usr/share/fastdds_no_shared_memory.xml
            ROS_VERSION: '2'
            ROS_DISTRO: humble
            PYTHONPATH: $SNAP/opt/ros/humble/lib/python3.10/site-packages:$SNAP/usr/lib/python3/dist-packages:${PYTHONPATH}
            ROS_HOME: $SNAP_USER_DATA/ros
        plugs:
        - network
        - network-bind
        - home
        command-chain: &id007
        - snap/command-chain/ros2-launch
    ros-gz-bridge:
        command: opt/ros/humble/bin/ros2 run ros_ign_bridge
        environment:
            FASTRTPS_DEFAULT_PROFILES_FILE: ${SNAP}/usr/share/fastdds_no_shared_memory.xml
            ROS_VERSION: '2'
            ROS_DISTRO: humble
            PYTHONPATH: $SNAP/opt/ros/humble/lib/python3.10/site-packages:$SNAP/usr/lib/python3/dist-packages:${PYTHONPATH}
            ROS_HOME: $SNAP_USER_DATA/ros
        plugs:
        - network
        - network-bind
        - home
        command-chain: *id007
assumes:
- snapd2.43
compression: lzo
plugs:
    desktop:
        mount-host-font-cache: false
    icon-themes:
        interface: content
        target: $SNAP/data-dir/icons
        default-provider: gtk-common-themes
    sound-themes:
        interface: content
        target: $SNAP/data-dir/sounds
        default-provider: gtk-common-themes
    kf5-5-105-qt-5-15-9-core22:
        content: kf5-5-105-qt-5-15-9-core22-all
        interface: content
        default-provider: kf5-5-105-qt-5-15-9-core22
        target: $SNAP/kf5
environment:
    SNAP_DESKTOP_RUNTIME: $SNAP/kf5
hooks:
    configure:
        plugs:
        - desktop
        command-chain:
        - snap/command-chain/hooks-configure-desktop
layout:
    /usr/share/X11:
        symlink: $SNAP/kf5/usr/share/X11
lint:
    ignore:
    -   unused-library:
        - opt/ros/*
        - lib/*/libcrypt.so*
        - lib/*/libexpat.so*
        - lib/*/libtirpc.so*
        - lib/*/libz.so*
        - usr/lib/*libatomic.so*
        - usr/lib/*libconsole_bridge.so*
        - usr/lib/*libfmt.so*
        - usr/lib/*libicui18n.so*
        - usr/lib/*libicuio.so*
        - usr/lib/*libicutest.so*
        - usr/lib/*libicutu.so*
        - usr/lib/*libpython3.10.so*
        - usr/lib/*libspdlog.so*
        - usr/lib/*libtinyxml2.so*

broken:

name: gazebo
version: fortress
summary: Simulate before you build.
description: 'Gazebo (formerly known as Ignition [1]) is an open source robotics simulator
    maintained by Open Robotics [2].
    '
issues: https://github.com/canonical/ignition_snap
source-code: https://github.com/canonical/ignition_snap
license: Apache-2.0
grade: devel
confinement: strict
base: core22
package-repositories:
-   type: apt
    url: http://repo.ros2.org/ubuntu/main
    components:
    - main
    formats:
    - deb
    key-id: C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
    key-server: keyserver.ubuntu.com
    suites:
    - jammy
-   components:
    - main
    formats:
    - deb
    key-id: D2486D2DD83DB69272AFE98867170598AF249743
    key-server: keyserver.ubuntu.com
    suites:
    - focal
    type: apt
    url: http://packages.osrfoundation.org/gazebo/ubuntu-stable
parts:
    gazebo:
        plugin: colcon
        source: .
        colcon-cmake-args:
        - -DBUILD_TESTING=OFF
        - -DBUILD_DOCS=OFF
        - -DCMAKE_BUILD_TYPE=Release
        - -DCMAKE_C_COMPILER_LAUNCHER=ccache
        - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
        - -DSKIP_usd=true
        - -DSKIP_optix=true
        - -DCMAKE_SKIP_RPATH=TRUE
        - -DCMAKE_PREFIX_PATH=$(echo $SNAPCRAFT_CMAKE_ARGS | awk -F= '{printf("%s/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/cmake/Qt5",
            $2)}')
        - --event-handlers=console_direct+
        build-environment:
        - &id001
            ROS_VERSION: '2'
        - &id002
            ROS_DISTRO: humble
        - &id003
            PATH: /snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/bin${PATH:+:$PATH}
        - &id004
            XDG_DATA_DIRS: $CRAFT_STAGE/usr/share:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}
        - &id005
            LD_LIBRARY_PATH: /snap/kf5-5-105-qt-5-15-9-core22-sdk/current/lib/$CRAFT_ARCH_TRIPLET:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib/vala-current:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET/pulseaudio${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
        - &id006
            PKG_CONFIG_PATH: /snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET/pkgconfig:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib/pkgconfig:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/share/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
        - &id007
            ACLOCAL_PATH: /snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/share/aclocal${ACLOCAL_PATH:+:$ACLOCAL_PATH}
        - &id008
            SNAPCRAFT_CMAKE_ARGS: -DCMAKE_FIND_ROOT_PATH=/snap/kf5-5-105-qt-5-15-9-core22-sdk/current${SNAPCRAFT_CMAKE_ARGS:+:$SNAPCRAFT_CMAKE_ARGS}
        -   IGNITION_VERSION: fortress
        -   GZ_VERSION: fortress
        build-packages:
        - wget
        - git
        - python3-vcstool
        - ccache
        - binutils-dev
        - build-essential
        - cmake
        - curl
        - freeglut3-dev
        - libavdevice-dev
        - libbenchmark-dev
        - libcurl4-openssl-dev
        - libdart-collision-bullet-dev
        - libdart-collision-ode-dev
        - libdart-dev
        - libdart-external-ikfast-dev
        - libdart-external-odelcpsolver-dev
        - libdart-utils-urdf-dev
        - libeigen3-dev
        - libfreeimage-dev
        - libgflags-dev
        - libglew-dev
        - libgts-dev
        - libjsoncpp-dev
        - libogre-1.9-dev
        - libogre-2.2-dev
        - libprotobuf-dev
        - libprotoc-dev
        - libsqlite3-dev
        - libtinyxml2-dev
        - liburdfdom-dev
        - libwebsockets-dev
        - libxi-dev
        - libxml2-utils
        - libxmu-dev
        - libyaml-dev
        - libzip-dev
        - libzmq3-dev
        - pkg-config
        - protobuf-compiler
        - python3-distutils
        - python3-psutil
        - python3-pybind11
        - python3-yaml
        - rubocop
        - ruby
        - ruby-dev
        - ruby-ronn
        - swig
        - uuid-dev
        - xvfb
        stage-packages:
        - libcurl4
        - libyaml-dev
        - libjsoncpp25
        - libassimp5
        - libboost-regex1.74.0
        - libboost-thread1.74.0
        - libboost-iostreams1.74.0
        - libboost-program-options1.74.0
        - libboost-filesystem1.74.0
        - libccd2
        - libconsole-bridge1.0
        - libev4
        - libfcl0.7
        - libfreeimage3
        - libbinutils
        - libgts-0.7-5
        - libilmbase25
        - libjxr0
        - libnorm1
        - liboctomap1.9
        - libode8
        - libopenexr25
        - libpgm-5.3-0
        - libprotobuf23
        - libraw20
        - libruby3.0
        - libsodium23
        - libtinyxml2-9
        - libtinyxml2.6.2v5
        - liburdfdom-model3.0
        - libwebsockets16
        - libxaw7
        - libxmu6
        - libxpm4
        - libzmq5
        - libdart6.12
        - libdart-collision-bullet6.12
        - libdart-collision-ode6.12
        - libdart-external-odelcpsolver6.12
        - libogre-1.9.0v5
        - libogre-2.2
        - ros-humble-ros-environment
        - ros-humble-ros2-controllers
        override-pull: 'craftctl default

            scripts/override_pull.sh

            '
        override-build: "craftctl default\nfor entry in \"$SNAPCRAFT_PART_INSTALL/opt/ros/snap/share/ignition\"\
            /*.yaml; do\n  sed -i \"s|$SNAPCRAFT_PART_INSTALL|/snap/$SNAPCRAFT_PROJECT_NAME/current|\"\
            \ \"$entry\"\ndone\n"
    fastdds-no-shared-memory:
        plugin: dump
        source: snap/local/
        organize:
            fastdds_no_shared_memory.xml: usr/share/
        build-environment:
        - *id001
        - *id002
        - *id003
        - *id004
        - *id005
        - *id006
        - *id007
        - *id008
    cleanup:
        after:
        - gazebo
        plugin: nil
        build-packages:
        - fd-find
        override-prime: '/root/project/snap/local/cleanup.sh

            '
        build-environment:
        - *id001
        - *id002
        - *id003
        - *id004
        - *id005
        - *id006
        - *id007
        - *id008
    kde-neon/sdk:
        source: /snap/snapcraft/x1/share/snapcraft/extensions/desktop/kde-neon
        plugin: make
        make-parameters:
        - PLATFORM_PLUG=kf5-5-105-qt-5-15-9-core22
        build-snaps:
        - kf5-5-105-qt-5-15-9-core22-sdk
        build-environment:
        - *id001
        - *id002
    ros2-humble/ros2-launch:
        source: /snap/snapcraft/x1/share/snapcraft/extensions/ros2
        plugin: make
        build-packages:
        - ros-humble-ros-environment
        - ros-humble-ros-workspace
        - ros-humble-ament-index-cpp
        - ros-humble-ament-index-python
apps:
    gz:
        environment:
            RUBYLIB: $SNAP/usr/local/lib/site_ruby/3.0.0:$SNAP/usr/local/lib/$SNAPCRAFT_ARCH_TRIPLET/site_ruby:$SNAP/usr/local/lib/site_ruby:$SNAP/usr/lib/ruby/vendor_ruby/3.0.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ruby/vendor_ruby/3.0.0:$SNAP/usr/lib/ruby/vendor_ruby:$SNAP/usr/lib/ruby/3.0.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ruby/3.0.0
            IGN_HOMEDIR: $SNAP_USER_DATA
            GZ_HOMEDIR: $SNAP_USER_DATA
            IGN_CONFIG_PATH: $SNAP/opt/ros/snap/share/ignition
            GZ_CONFIG_PATH: $SNAP/opt/ros/snap/share/ignition
            IGN_RENDERING_RESOURCE_PATH: $SNAP/opt/ros/snap/share/ignition/ignition-rendering6
            GZ_RENDERING_RESOURCE_PATH: $SNAP/opt/ros/snap/share/ignition/ignition-rendering6
            IGN_GAZEBO_PHYSICS_ENGINE_PATH: $SNAP/opt/ros/snap/lib/ign-physics-5/engine-plugins
            GZ_SIM_PHYSICS_ENGINE_PATH: $SNAP/opt/ros/snap/lib/ign-physics-5/engine-plugins
            OGRE2_RESOURCE_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/OGRE-2.2/OGRE
            OGRE_RESOURCE_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/OGRE-1.9.0
            IGN_GAZEBO_SYSTEM_PLUGIN_PATH: $SNAP/opt/ros/snap/lib
            GZ_SIM_SYSTEM_PLUGIN_PATH: $SNAP/opt/ros/snap/lib
            IGN_RENDERING_PLUGIN_PATH: $SNAP/opt/ros/snap/lib:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/OGRE-2.2/OGRE:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/OGRE-1.9.0
            GZ_RENDERING_PLUGIN_PATH: $SNAP/opt/ros/snap/lib:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/OGRE-2.2/OGRE:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/OGRE-1.9.0
            IGN_SENSORS_PLUGIN_PATH: $SNAP/opt/ros/snap/lib
            GZ_SENSORS_PLUGIN_PATH: $SNAP/opt/ros/snap/lib
            LD_LIBRARY_PATH: $SNAP/usr/local/lib/:$SNAP/usr/local/lib/$SNAPCRAFT_ARCH_TRIPLET/:$SNAP/usr/lib/:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/:$SNAP/usr/local/lib/site_ruby/3.0.0:$SNAP/usr/local/lib/$SNAPCRAFT_ARCH_TRIPLET/site_ruby:$SNAP/usr/local/lib/site_ruby:$SNAP/usr/lib/ruby/vendor_ruby/3.0.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ruby/vendor_ruby/3.0.0:$SNAP/usr/lib/ruby/vendor_ruby:$SNAP/usr/lib/ruby/3.0.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ruby/3.0.0:/snap/kf5-5-105-qt-5-15-9-core22/current/lib/$CRAFT_ARCH_TRIPLET:/snap/kf5-5-105-qt-5-15-9-core22/current/usr/lib/$CRAFT_ARCH_TRIPLET:/snap/kf5-5-105-qt-5-15-9-core22/current/usr/lib:/snap/kf5-5-105-qt-5-15-9-core22/current/usr/lib/vala-current:/snap/kf5-5-105-qt-5-15-9-core22/current/usr/lib/$CRAFT_ARCH_TRIPLET/pulseaudio${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
            IGN_GAZEBO_RENDER_ENGINE_PATH: $SNAP/opt/ros/snap/lib/ign-rendering-6/engine-plugins/
            GZ_SIM_RENDER_ENGINE_PATH: $SNAP/opt/ros/snap/lib/ign-rendering-6/engine-plugins/
            ROS_VERSION: '2'
            ROS_DISTRO: humble
            PYTHONPATH: $SNAP/opt/ros/humble/lib/python3.10/site-packages:$SNAP/usr/lib/python3/dist-packages:${PYTHONPATH}
            ROS_HOME: $SNAP_USER_DATA/ros
        command: usr/bin/ruby $SNAP/opt/ros/snap/bin/ign
        plugs:
        - desktop
        - desktop-legacy
        - opengl
        - wayland
        - x11
        - network
        - network-bind
        - home
        command-chain:
        - snap/command-chain/ros2-launch
        - snap/command-chain/desktop-launch
    ros-gz-create:
        command: opt/ros/humble/bin/ros2 run ros_ign_gazebo create
        environment:
            FASTRTPS_DEFAULT_PROFILES_FILE: ${SNAP}/usr/share/fastdds_no_shared_memory.xml
            ROS_VERSION: '2'
            ROS_DISTRO: humble
            PYTHONPATH: $SNAP/opt/ros/humble/lib/python3.10/site-packages:$SNAP/usr/lib/python3/dist-packages:${PYTHONPATH}
            ROS_HOME: $SNAP_USER_DATA/ros
        plugs:
        - network
        - network-bind
        - home
        command-chain: &id009
        - snap/command-chain/ros2-launch
    ros-gz-bridge:
        command: opt/ros/humble/bin/ros2 run ros_ign_bridge
        environment:
            FASTRTPS_DEFAULT_PROFILES_FILE: ${SNAP}/usr/share/fastdds_no_shared_memory.xml
            ROS_VERSION: '2'
            ROS_DISTRO: humble
            PYTHONPATH: $SNAP/opt/ros/humble/lib/python3.10/site-packages:$SNAP/usr/lib/python3/dist-packages:${PYTHONPATH}
            ROS_HOME: $SNAP_USER_DATA/ros
        plugs:
        - network
        - network-bind
        - home
        command-chain: *id009
assumes:
- snapd2.43
compression: lzo
plugs:
    desktop:
        mount-host-font-cache: false
    icon-themes:
        interface: content
        target: $SNAP/data-dir/icons
        default-provider: gtk-common-themes
    sound-themes:
        interface: content
        target: $SNAP/data-dir/sounds
        default-provider: gtk-common-themes
    kf5-5-105-qt-5-15-9-core22:
        content: kf5-5-105-qt-5-15-9-core22-all
        interface: content
        default-provider: kf5-5-105-qt-5-15-9-core22
        target: $SNAP/kf5
environment:
    SNAP_DESKTOP_RUNTIME: $SNAP/kf5
hooks:
    configure:
        plugs:
        - desktop
        command-chain:
        - snap/command-chain/hooks-configure-desktop
layout:
    /usr/share/X11:
        symlink: $SNAP/kf5/usr/share/X11
lint:
    ignore:
    -   unused-library:
        - opt/ros/*
        - lib/*/libcrypt.so*
        - lib/*/libexpat.so*
        - lib/*/libtirpc.so*
        - lib/*/libz.so*
        - usr/lib/*libatomic.so*
        - usr/lib/*libconsole_bridge.so*
        - usr/lib/*libfmt.so*
        - usr/lib/*libicui18n.so*
        - usr/lib/*libicuio.so*
        - usr/lib/*libicutest.so*
        - usr/lib/*libicutu.so*
        - usr/lib/*libpython3.10.so*
        - usr/lib/*libspdlog.so*
        - usr/lib/*libtinyxml2.so*

a diff between the 2:

118,121d117
<             LD_LIBRARY_PATH: /snap/kf5-5-105-qt-5-15-9-core22-sdk/current/lib/$CRAFT_ARCH_TRIPLET:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib/vala-current:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET/pulseaudio${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
<         - &id006
<             PKG_CONFIG_PATH: /snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET/pkgconfig:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/lib/pkgconfig:/snap/kf5-5-105-qt-5-15-9-core22-sdk/current/usr/share/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
<         - &id007
123c119
<         - &id008
---
>         - &id006
243,244d238
<         - *id007
<         - *id008
261,262d254
<         - *id007
<         - *id008
264c256
<         source: /snap/snapcraft/x1/share/snapcraft/extensions/desktop/kde-neon
---
>         source: /snap/snapcraft/current/share/snapcraft/extensions/desktop/kde-neon
333c325
<         command-chain: &id009
---
>         command-chain: &id007
347c339
<         command-chain: *id009
---
>         command-chain: *id007

So yeah, you have to slowly compare and adapt and get rid of those LD_LIBRARY_PATH and PKG_CONFIG_PATH (or at least it’s how I made it work)

1 Like

Thanks, ok i will try to implent this in my snap.

@sgmoore (I am available in charmhub snapcraft if you wanna chat) the new core22 version changed and added both PKG_CONFIG and LD_LIBRARY paths, I am trying to understand why you needed to add those lines 180-200 here

compared to the old

I went off the gnome extension and it appears this has had some unintended side effects. I will remove all but the original env vars from the extension. Sorry about this.

I have created the PR to remove these env var settings in the extension.

@sgmoore Is this issue fixed ??, i am experiencing same issues for building webcamoid and audacious qt is still stuck at limbo.

Somehow fixed…