Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Homebrew ebuild for qt application
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Wed Oct 04, 2017 7:11 pm    Post subject: [SOLVED] Homebrew ebuild for qt application Reply with quote

UPDATE: Actually I hadn't taken enough care to ensure the remnants of the incorrect install were removed. Once this was done, it works as expected! I'll leave this post here in case it is useful for others in the future.


Good evening all,

I have created an ebuild for a qt application (the librepilot flight software suite), but I am getting a strange error on trying to run the installed application:
Code:
paul@ohno ~ $ QT_DEBUG_PLUGINS=1 librepilot-gcs
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib64/kde4/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/bin/platforms" ...
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Reinstalling the application may fix this problem.
Aborted

The plugin is to be found in the standard location, as installed by dev-qt/qtgui:
Code:
/usr/lib64/qt5/plugins/platforms/libqxcb.so


Ironically, this problem only occurs if I build and install through the ebuild. If I build it on a user account and run "make install" as root (I know I shouldn't, but it doesn't write over anything else!), it works OK. I have taken great care to ensure there are no configuration files lying around from an "non-standard" install

I have a few queries:

  • I am not sure why the path is not found correctly
  • I am not sure why the application is looking under /usr/lib64/kde4/... above

The application compiles with qt5 without any specific configuration by me in the ebuild - do I need to add something to the ebuild to ensure the correct path for plugins is found?

Can anyone give me any pointers? Thanks in advance for your help!

For completeness, here is my ebuild - constructive tips to improve are of course most welcome!
Code:

# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit eutils
inherit git-r3

DESCRIPTION="Software suite to control for Multicopters and other RC models"
HOMEPAGE="http://librepilot.org/"

EGIT_REPO_URI="https://bitbucket.org/librepilot/librepilot.git"

if [[ "${PV}" != "9999" ]]; then
        KEYWORDS="~amd64 ~x86"  # Note: ~x86 NOT tested
fi

LICENSE="GPL-3"
SLOT="0"
REQUIRED_USE="qt5"
IUSE="doc qt5"

RDEPEND="
   sci-geosciences/osgearth
   >=dev-games/openscenegraph-3.2.1
   sci-libs/gdal
   sci-libs/geos
   x11-libs/libX11
   dev-qt/qtcore:5
   dev-qt/qtgui:5
   dev-qt/qtopengl:5
   dev-qt/qtserialport
   doc? (
        app-doc/doxygen )
   "

DEPEND="${RDEPEND}"

PATCHES=( "${FILESDIR}"/${P}-{remove_uninstall}.patch )

src_unpack() {
        if [[ "${PV}" = "9999" ]]; then
        # Current development branch
                echo "Development Branch checkout"
                git-r3_fetch
                git-r3_checkout
        else
                # Release branch
                EGIT_COMMIT="${PV}"
                git-r3_fetch "${EGIT_REPO_URI}" "${EGIT_COMMIT}"
                git-r3_checkout
        fi
}

src_prepare() {
        epatch "${FILESDIR}/${P}-remove_uninstall.patch"
        eapply_user
}

src_compile() {
    # Need to get the tools first, which don't get installed in main system
    # The following tools are assumed to be installed:
    #  - qt5
    #  - doxygen (if required - set / unset doc flag)
    #  - osg     (dev-games/openscenegraph)
    #  - osgearth (Not in main tree - see separate ebuild)
   
    # The arm_sdk package will be installed, to avoid challenges with
    # crossdev
   
    make arm_sdk_install && QT_SELECT=5 make all
}

src_install() {
    emake DESTDIR="${D}" install
}
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Wed Oct 18, 2017 12:14 am    Post subject: Reply with quote

Quote:
# Need to get the tools first, which don't get installed in main system
# The following tools are assumed to be installed:
# - qt5
# - doxygen (if required - set / unset doc flag)
# - osg (dev-games/openscenegraph)
# - osgearth (Not in main tree - see separate ebuild)

These should be in DEPEND, not assumed to be installed.

These too:
Quote:

make arm_sdk_install && QT_SELECT=5 make all


Then use emake instead of make.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum