Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 423779 - app-crypt/pinentry USE="qt4 static" - /var/tmp/portage/app-crypt/pinentry-0.8.1/temp/environment: line 2360: /usr/bin/moc: No such file or directory
Summary: app-crypt/pinentry USE="qt4 static" - /var/tmp/portage/app-crypt/pinentry-0.8...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-27 08:17 UTC by tdr
Modified: 2013-01-12 21:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tdr 2012-06-27 08:17:51 UTC
pinentry badly handles having both qt4 and static enabled in USE






Reproducible: Always

Steps to Reproduce:
1. do not have x11-libs/qt-core installed
2. USE="qt4 static" emerge pinentry (any version)
3.
Actual Results:  

 log: 
[32;01m * [39;49;00mPackage: app-crypt/pinentry-0.8.1
[32;01m * [39;49;00mRepository: gentoo
[32;01m * [39;49;00mMaintainer: swegener@gentoo.org
[32;01m * [39;49;00mUSE: amd64 consolekit elibc_glibc kernel_linux multilib ncurses policykit qt4 static userland_GNU
[32;01m * [39;49;00mFEATURES: sandbox
 [33;01m*[0m
 [33;01m*[0m The static USE flag is only supported with the ncurses USE flags, disabling the gtk and qt4 USE flags.
 [33;01m*[0m
>>> Unpacking source...
>>> Unpacking pinentry-0.8.1.tar.gz to /var/tmp/portage/app-crypt/pinentry-0.8.1/work
>>> Source unpacked in /var/tmp/portage/app-crypt/pinentry-0.8.1/work
>>> Preparing source in /var/tmp/portage/app-crypt/pinentry-0.8.1/work/pinentry-0.8.1 ...
/var/tmp/portage/app-crypt/pinentry-0.8.1/temp/environment: line 2360: /usr/bin/moc: No such file or directory
 [31;01m*[0m ERROR: app-crypt/pinentry-0.8.1 failed (prepare phase):
 [31;01m*[0m (no error message)





Expected Results:  
Possible expected normal results:
1) USE="static" sets -qt4  (flag over-ride) or properly skips qt4 check (in src_prepare)
2) error on both qt4 and static in USE


All versions currently in portage do the same flag check and fail the same way.  The src_prepare "if use qt4" could be nested inside an "if not use static" conditional to avoid the /usr/bin/moc check being run.  

The src_configure portion properly disables qt4 (and gtk) later if static is found in USE, so the filtering listed in the ewarn does happen, but not before the ebuild already fails.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-06-27 13:41:43 UTC
1) It could use REQUIRED_USE to avoid failing in the build phases.
2) It could link statically against ncurses and at the same time link dynamically
   against GTK+/Qt, right?
3) It fails to find moc (x11-libs/qt-core) because that dependency is only pulled
   in with USE=-static.
Comment 2 tdr 2012-06-28 04:44:32 UTC
I understand why it fails to find moc when static is in USE ... the dep on qt isn't there. But,already installed qt4 would allow it to pass the moc check and still build only static due to how the ebuild handles the static flag later, though, and since qt4 us later disabled if static is on anyway, I'm suggesting the check is perhaps badly placed.

I'm not sure if the package can link static for curses and dynamically for gtk/qt4 as well.  The bug I reported came from user I helped on IRC; I didn't poke into it very deeply, just enough to see why it's happening.

Not sure a REQUIRED_USE, forcing on some flags, is a good route. Since the package is useful enough that different toolkits can use it, forcing support for some toolkits vs others doesn't seem "fair " to other packages wanting to support it.
Comment 3 Alon Bar-Lev (RETIRED) gentoo-dev 2012-12-21 23:54:38 UTC
I don't understand...

If now there can be no static and qt4, is there any issue to solve?

It is OK if static is minimal configuration.

Thanks!
Comment 4 Alon Bar-Lev (RETIRED) gentoo-dev 2013-01-12 21:39:21 UTC
Please reopen if any more issue.