Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 457024

Summary: [qt overlay] dev-qt/qttools: new Qt5 tools module
Product: Gentoo Linux Reporter: Eugene Shalygin <eugene.shalygin>
Component: [OLD] LibraryAssignee: Qt Bug Alias <qt>
Status: RESOLVED FIXED    
Severity: enhancement CC: orzel, pyxlcy, Sander.Sweers, tomboy64, uwelk
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=504692
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 454132, 457028, 465436    
Attachments: Proposed ebuild
qttools-5.0.2.ebuild (Builds unsupported tools as well, reference only)
qttools-5.0.2-qtconfig.patch
qttools-5.0.2.ebuild (Builds unsupported tools as well, reference only)

Description Eugene Shalygin 2013-02-13 00:10:49 UTC
Please add ebuild for development tools module

Reproducible: Always
Comment 1 Eugene Shalygin 2013-02-13 00:11:48 UTC
Created attachment 338734 [details]
Proposed ebuild
Comment 2 Thomas Capricelli 2013-03-08 14:30:26 UTC
lrelease / lupdate are crucial tools needed for most Qt project. They are provided by the Qt tools module. Please add it, it's hard to start porting until those are here (need local modification that shouldn't be commited)
Comment 3 Richard Grenville 2013-04-14 12:40:10 UTC
Well, can't believe it. I spent hours trying to work out a way to compile qttools, writing patches and hacks, only to find it's so easy: Just use "src" in QT5_TARGET_SUBDIRS works...

Anyway, I found an issue with your ebuild: When qttools is already installed, compiling qttools will result in a sandbox violation:

----
make[1]: Entering directory `/var/tmp/portage/dev-qt/qttools-5.0.2/work/qttools-opensource-src-5.0.2_build/src/pixeltool'
x86_64-pc-linux-gnu-g++ -c -O2 -pipe -march=native -fno-exceptions -Wall -W -D_REENTRANT -fPIE -DQT_NO_XCB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib64/qt5/mkspecs/linux-g++-64 -I/var/tmp/portage/dev-qt/qttools-5.0.2/work/qttools-opensource-src-5.0.2/src/pixeltool -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I.moc/release-shared -I. -o .obj/release-shared/main.o /var/tmp/portage/dev-qt/qttools-5.0.2/work/qttools-opensource-src-5.0.2/src/pixeltool/main.cpp
x86_64-pc-linux-gnu-g++ -c -O2 -pipe -march=native -fno-exceptions -Wall -W -D_REENTRANT -fPIE -DQT_NO_XCB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib64/qt5/mkspecs/linux-g++-64 -I/var/tmp/portage/dev-qt/qttools-5.0.2/work/qttools-opensource-src-5.0.2/src/pixeltool -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I.moc/release-shared -I. -o .obj/release-shared/qpixeltool.o /var/tmp/portage/dev-qt/qttools-5.0.2/work/qttools-opensource-src-5.0.2/src/pixeltool/qpixeltool.cpp
/usr/lib64/qt5/bin/moc -DQT_NO_XCB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib64/qt5/mkspecs/linux-g++-64 -I/var/tmp/portage/dev-qt/qttools-5.0.2/work/qttools-opensource-src-5.0.2/src/pixeltool -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I.moc/release-shared -I. /var/tmp/portage/dev-qt/qttools-5.0.2/work/qttools-opensource-src-5.0.2/src/pixeltool/qpixeltool.h -o .moc/release-shared/moc_qpixeltool.cpp
x86_64-pc-linux-gnu-g++ -c -O2 -pipe -march=native -fno-exceptions -Wall -W -D_REENTRANT -fPIE -DQT_NO_XCB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib64/qt5/mkspecs/linux-g++-64 -I/var/tmp/portage/dev-qt/qttools-5.0.2/work/qttools-opensource-src-5.0.2/src/pixeltool -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I.moc/release-shared -I. -o .obj/release-shared/moc_qpixeltool.o .moc/release-shared/moc_qpixeltool.cpp
x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -o /usr/lib64/qt5/bin/pixeltool .obj/release-shared/main.o .obj/release-shared/qpixeltool.o .obj/release-shared/moc_qpixeltool.o   -L/usr/X11R6/lib64 -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lGL -lpthread 
/usr/bin/ld.gold: fatal error: /usr/lib64/qt5/bin/pixeltool: open: Permission denied
collect2: error: ld returned 1 exit status
make[1]: *** [/usr/lib64/qt5/bin/pixeltool] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-qt/qttools-5.0.2/work/qttools-opensource-src-5.0.2_build/src/pixeltool'
make: *** [sub-pixeltool-make_first-ordered] Error 2
 [31;01m*[0m ERROR: dev-qt/qttools-5.0.2 failed (compile phase):
 [31;01m*[0m   emake failed
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the output of `emerge --info '=dev-qt/qttools-5.0.2'`,
 [31;01m*[0m the complete build log and the output of `emerge -pqv '=dev-qt/qttools-5.0.2'`.
 [31;01m*[0m This ebuild is from an overlay named 'local_overlay': '/usr/local/portage/'
 [31;01m*[0m The complete build log is located at '/var/tmp/portage/dev-qt/qttools-5.0.2/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/dev-qt/qttools-5.0.2/temp/environment'.
 [31;01m*[0m Working directory: '/var/tmp/portage/dev-qt/qttools-5.0.2/work/qttools-opensource-src-5.0.2_build/src'
 [31;01m*[0m S: '/var/tmp/portage/dev-qt/qttools-5.0.2/work/qttools-opensource-src-5.0.2'
 [31;01m*[0m --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 [31;01m*[0m LOG FILE: "/var/log/sandbox/sandbox-2013.log"
 [31;01m*[0m 
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: unlink
S: deny
P: /usr/lib64/qt5/bin/pixeltool
A: /usr/lib64/qt5/bin/pixeltool
R: /usr/lib64/qt5/bin/pixeltool
C: /usr/bin/ld.gold --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -o /usr/lib64/qt5/bin/pixeltool /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/crtbeginS.o -L/usr/X11R6/lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../.. -O1 --as-needed .obj/release-shared/main.o .obj/release-shared/qpixeltool.o .obj/release-shared/moc_qpixeltool.o -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lGL -lpthread -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/crtn.o 

F: open_wr
S: deny
P: /usr/lib64/qt5/bin/pixeltool
A: /usr/lib64/qt5/bin/pixeltool
R: /usr/lib64/qt5/bin/pixeltool
C: /usr/bin/ld.gold --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -o /usr/lib64/qt5/bin/pixeltool /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/crtbeginS.o -L/usr/X11R6/lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../.. -O1 --as-needed .obj/release-shared/main.o .obj/release-shared/qpixeltool.o .obj/release-shared/moc_qpixeltool.o -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lGL -lpthread -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/crtn.o 

F: unlink
S: deny
P: /usr/lib64/qt5/bin/pixeltool
A: /usr/lib64/qt5/bin/pixeltool
R: /usr/lib64/qt5/bin/pixeltool
C: /usr/bin/ld.gold --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -o /usr/lib64/qt5/bin/pixeltool /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/crtbeginS.o -L/usr/X11R6/lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../.. -O1 --as-needed .obj/release-shared/main.o .obj/release-shared/qpixeltool.o .obj/release-shared/moc_qpixeltool.o -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lGL -lpthread -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/crtn.o 

F: unlink
S: deny
P: /usr/lib64/qt5/bin/pixeltool
A: /usr/lib64/qt5/bin/pixeltool
R: /usr/lib64/qt5/bin/pixeltool
C: /usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.2/collect2 --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -o /usr/lib64/qt5/bin/pixeltool /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/crtbeginS.o -L/usr/X11R6/lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../.. -O1 --as-needed .obj/release-shared/main.o .obj/release-shared/qpixeltool.o .obj/release-shared/moc_qpixeltool.o -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lGL -lpthread -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/crtn.o 
 [31;01m*[0m --------------------------------------------------------------------------------
----

Apparently Qt is trying to overwrite the existing binary files directly. My own workaround is:

----
find "${S}" -name '*.pro' -exec sed -i 's/\$\$QT\.designer\.bins//' '{}' + || die
----

Also I will attach my own ebuild later. My ebuild tries to build some unsupported tools that reside in the qttools source package as well. To be honest, I'm new to Qt and have no idea what those tools do, the only one I know is qtconfig. So my ebuild should only be used as reference.
Comment 4 Richard Grenville 2013-04-14 12:44:17 UTC
Created attachment 345542 [details]
qttools-5.0.2.ebuild (Builds unsupported tools as well, reference only)

My own qttools ebuild that tries to build all the things possible in the package. Since it's actually building unsupported / abandoned tools as well, it should be used as reference only.

qttools-5.0.2-qtconfig.patch will be attached later.
Comment 5 Richard Grenville 2013-04-14 12:45:02 UTC
Created attachment 345544 [details, diff]
qttools-5.0.2-qtconfig.patch

qttools-5.0.2-qtconfig.patch, the patch to make qtconfig work with Qt 5.
Comment 6 Richard Grenville 2013-04-14 13:15:31 UTC
Created attachment 345546 [details]
qttools-5.0.2.ebuild (Builds unsupported tools as well, reference only)

Silly me, forgot to add dobin rules for some tools.
Comment 7 Davide Pesavento gentoo-dev 2013-05-20 15:07:23 UTC
*** Bug 466244 has been marked as a duplicate of this bug. ***
Comment 8 M. B. 2013-05-20 15:40:29 UTC
This is a blocker for bug #465436. Please modify.

Also, please add a qualified atom name to the topic of this bug; it does not pop up when searching for qttools.
Comment 9 Uwe L. Korn 2013-08-11 10:30:59 UTC
Building qttools-5.1.0 with this ebuild works with some slight modifications:

 * qtwidgets has no accessibility USE flag anymore
 * the dobin call fails as the referenced paths could not be found. (At the moment I just commented out that part as I did not need it.)
Comment 10 M. B. 2013-10-28 21:16:49 UTC
*bump*
please upgrade to 5.2.0. I need it for sigil.
Comment 11 Davide Pesavento gentoo-dev 2013-12-23 00:32:55 UTC
lconvert/lrelease/lupdate are now available in dev-qt/linguist-tools.

The designer, linguist, qdbus, qdbusviewer applications are available in their respective packages. QtUiTools is part of dev-qt/designer.
Comment 12 Thomas Capricelli 2013-12-23 01:31:46 UTC
dev-qt/linguist-tools provides me with what i needed, thanks for adding it !
Comment 13 Uwe L. Korn 2014-03-06 19:34:33 UTC
Just to have an overview, the following packages/tools are missing from the overlay at the moment: 

* androiddeployqt
* kmap2qmap
* makeqpf
* qconfig
* qev
* qtconfig
* qtestlib
* qtpaths

I suspect macdeployqt and windeployqt being no use on Linux.
Comment 14 Davide Pesavento gentoo-dev 2014-03-07 06:44:25 UTC
https://wiki.gentoo.org/wiki/Project:Qt/Qt5status

The only missing items are: assistant, qtconfig, qtpaths (and maybe androiddeployqt)
Comment 15 Michael Palimaka (kensington) gentoo-dev 2014-05-14 17:27:28 UTC
(In reply to Davide Pesavento from comment #14)
> https://wiki.gentoo.org/wiki/Project:Qt/Qt5status
> 
> The only missing items are: assistant, qtconfig, qtpaths (and maybe
> androiddeployqt)

Which package should these go into - each into a new one of the same name?
Comment 16 Davide Pesavento gentoo-dev 2014-05-14 22:16:00 UTC
(In reply to Michael Palimaka (kensington) from comment #15)
> (In reply to Davide Pesavento from comment #14)
> > https://wiki.gentoo.org/wiki/Project:Qt/Qt5status
> > 
> > The only missing items are: assistant, qtconfig, qtpaths (and maybe
> > androiddeployqt)
> 
> Which package should these go into - each into a new one of the same name?

qtpaths should go on its own: dev-qt/qtpaths

qtconfig: I noticed that this is commented out from the .pro file, therefore I don't think we should package it.

assistant: this one should be split in at least dev-qt/assistant and dev-qt/qthelp. qthelp will also contain the internal QtCLucene module. I'm not sure where to put the command line tools (qcollectiongenerator, qhelpconverter, qhelpgenerator)... in qthelp, in assistant, or in a separate package dev-qt/assistant-tools?

There's also a new tool in 5.3.0, qtdiag, which should be packaged separately.
Comment 17 Michael Palimaka (kensington) gentoo-dev 2014-05-15 16:53:59 UTC
I have pushed ebuilds for assistant, qtdiags, qthelp, and qtpaths - please review. qthelp still bundles (modified?) clucene and the command line tools are not anywhere yet.
Comment 18 Davide Pesavento gentoo-dev 2014-05-23 12:31:02 UTC
(In reply to Davide Pesavento from comment #16)
> [...] I'm
> not sure where to put the command line tools (qcollectiongenerator,
> qhelpconverter, qhelpgenerator)... in qthelp, in assistant, or in a separate
> package dev-qt/assistant-tools?

I thought about this. For consistency with linguist/linguist-tools, I lean towards packaging them separately in dev-qt/assistant-tools.
Comment 19 Michael Palimaka (kensington) gentoo-dev 2014-06-12 16:59:22 UTC
dev-qt/assistant-tools pushed, should be all done now.