Here's the kde.eclass relevant code: if hasq kdehiddenvisibility ${IUSE} && use kdehiddenvisibility; then if [[ $(gcc-major-version)$(gcc-minor-version) -ge 41 ]]; then if [[ ${PN} != "kdelibs" && ${PN} != "arts" ]] && \ ! fgrep -q "#define __KDE_HAVE_GCC_VISIBILITY" "${KDEDIR}/include/kdemacros.h"; then eerror "You asked to enable hidden visibility, but your kdelibs was" eerror "built without its support. Please rebuild kdelibs with the" eerror "kdehiddenvisibility useflag enabled." die "kdelibs without hidden visibility" else unset kde_cv_prog_cxx_fvisibility_hidden myconf="$myconf $(use_enable kdehiddenvisibility gcc-hidden-visibility)" fi else eerror "You're trying to enable hidden visibility, but" eerror "you are using an old GCC version. Hidden visibility" eerror "can be enabled only with GCC 4.1 and later." fi fi The problem is that it is looking for a define not present in the header file (nor any of the headers installed in that path for that matter): "#define __KDE_HAVE_GCC_VISIBILITY" "${KDEDIR}/include/kdemacros.h" THis needs to be corrected as this is preventing any KDE app from being built with hidden visibility.
Rebuild qt and kdelibs. If that define is not present, it means that you don't have Hidden Visibility enabled in kdelibs. The check is _perfectly_ valid on this.
(In reply to comment #1) > Rebuild qt and kdelibs. If that define is not present, it means that you don't > have Hidden Visibility enabled in kdelibs. The check is _perfectly_ valid on > this. Yeah. Looks like kdecore/kdemacros.h is simply missing the define on my system. No idea why it is missing as it was compiled correctly. Only thing I can figure is I have confcache installed and perhaps it broke something. I am going to re-emerge and see if the kdemacros.h file correctly has the define.
Remember to re-emerge qt first.
No need ot re-emerge qt. Qt was compiled correctly with hidden visibility from previous kde install (at least in my case). I was simply upgrading. As it turns out, confcache was definately the culprit here. Recommend, if you use confcache, then disable it when emerging kdelibs (seemed safe to leave on after - at least for me).
confcache is not supported, definitely not supported.