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.
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.
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.
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!
Please reopen if any more issue.