Reproducible: Always
Created attachment 380848 [details] build.log
Created attachment 380850 [details] emerge --info
when trying to compile slim, I am getting /usr/include/X11/Xft/Xft.h:39:22: fatal error: ft2build.h: no such file or directory, while I have it in /usr/include/freetype{,2}/ft2build.h
dev-util/cmake-2.8.12.2-r1 was built with the following: USE="ncurses qt4 -emacs (-qt5) -test" ABI_X86="64"
(In reply to januszmk from comment #3) > when trying to compile slim, I am getting /usr/include/X11/Xft/Xft.h:39:22: > fatal error: ft2build.h: no such file or directory, while I have it in > /usr/include/freetype{,2}/ft2build.h I have media-libs/freetype-2.4.11 putting ft2build.h in /usr/include/ directly. Since it's Xft.h that seems to need it, I'm thinking the issue is either with x11-libs/libXft or it's with freetype2's pkg-config file not being modified despite the change in the install location. I expect you are seeing failures with other packages that depend on libXft as well?
> I expect you are seeing failures with other packages that depend on libXft > as well? no, I can emerge openbox or dmenu without a problem
I updated freetype to 2.5.3-r1, and ran another test -- with dev-util/cmake-2.8.12.2, the include path to ft2build.h is found and added just fine for me. So this might also be a failure of the cmake version you have installed, if it's not setting FREETYPE_INCLUDE_DIR_ft2build properly. Could you attach the ${WORKDIR}/slim-1.3.6_build/CMakeCache.txt file to confirm please?
Created attachment 380922 [details] CMakeCache.txt
(In reply to januszmk from comment #8) > Created attachment 380922 [details] > CMakeCache.txt So for freetype-2.5.3-r1, my cmake is reporting: FREETYPE_INCLUDE_DIR_freetype2:PATH=/usr/include/freetype2 FREETYPE_INCLUDE_DIR_ft2build:PATH=/usr/include/freetype2 ...while yours is reporting: FREETYPE_INCLUDE_DIR_freetype2:PATH=/usr/include FREETYPE_INCLUDE_DIR_ft2build:PATH=/usr/include/freetype2 Although this particular discrepancy seems backwards to the issue (and wrong according to your description of where files are installed), since right now slim only includes $FREETYPE_INCLUDE_DIR_freetype2 in the set of include paths it would cause the issue you are seeing. I can add $FREETYPE_INCLUDE_DIR_ft2build to the list of default paths, but the actual breakage here is that FREETYPE_INCLUDE_DIR_freetype2 isn't being set by cmake to /usr/include/freetype2 as it should be. CC'ing KDE herd regarding cmake behaviour and to seek advice about the correct usage of the FREETYPE_INCLUDE_DIR_* vars.
CMake shouldn't be be setting the variable unless it actually finds what it's looking for. Some ideas: * Can you please confirm the version of freetype installed, including revision? * Are there stray FindFreetype.cmake files on your system anywhere? * What's the output of 'pkg-config --cflags xft'? * What's the output of 'find /usr/include -name ftheader.h'?
(In reply to Michael Palimaka (kensington) from comment #10) > CMake shouldn't be be setting the variable unless it actually finds what > it's looking for. > > Some ideas: > * Can you please confirm the version of freetype installed, including > revision? media-libs/freetype-2.5.3-r1 > * Are there stray FindFreetype.cmake files on your system anywhere? I don't see any > * What's the output of 'pkg-config --cflags xft'? pkg-config --cflags xft -I/usr/include/freetype2 > * What's the output of 'find /usr/include -name ftheader.h'? find /usr/include -name ftheader.h /usr/include/freetype2/config/ftheader.h
I have problems with others packages because of this, does someone have idea what can cause this? any good workarround for this?
(In reply to januszmk from comment #3) > when trying to compile slim, I am getting /usr/include/X11/Xft/Xft.h:39:22: > fatal error: ft2build.h: no such file or directory, while I have it in > /usr/include/freetype{,2}/ft2build.h You have /usr/include/freetype/ft2build.h too - which package owns it?
I was able to duplicate this issue until I deleted the softlink /usr/include/freetype -> freetype2. After that slim rebuilt just fine. Not sure why the softlink from freetype to freetype2 exists, I may have added it manually at some point.
Created attachment 389116 [details, diff] slim-include_ft2build_path.patch This patch fixed my issue.
OK, I read rest of comments and I'm sorry for my obvious patch. (In reply to Ian Stakenvicius from comment #7) > I updated freetype to 2.5.3-r1, and ran another test -- with > dev-util/cmake-2.8.12.2, the include path to ft2build.h is found and added > just fine for me. I reproduced the issue on freetype-2.5.3-r1 with cmake-2.8.12.2... > So this might also be a failure of the cmake version you have installed, if > it's not setting FREETYPE_INCLUDE_DIR_ft2build properly. ... so I don't think it is correct assumption. (In reply to Drew Richardson from comment #14) > I was able to duplicate this issue until I deleted the softlink > /usr/include/freetype -> freetype2. After that slim rebuilt just fine. Not > sure why the softlink from freetype to freetype2 exists, I may have added it > manually at some point. Removing symlink fixed the issue for me as well... Still, I feel better adding path to fix the issue in slim than preventing some other package from finding headers where are expected... I found this file as part of cmake package - /usr/share/cmake/Modules/FindFreetype.cmake. On the top of it there is: # - Locate FreeType library # This module defines # FREETYPE_LIBRARIES, the library to link against # FREETYPE_FOUND, if false, do not try to link to FREETYPE # FREETYPE_INCLUDE_DIRS, where to find headers. # FREETYPE_VERSION_STRING, the version of freetype found (since CMake 2.8.8) # This is the concatenation of the paths: # FREETYPE_INCLUDE_DIR_ft2build # FREETYPE_INCLUDE_DIR_freetype2 I believe that intended use here was FREETYPE_INCLUDE_DIRS instead of using FREETYPE_INCLUDE_DIR_* separately. This patches fixes the issue as well and I believe it is even correct. --- ./CMakeLists.txt.orig 2014-11-12 08:31:40.627367327 +0100 +++ ./CMakeLists.txt 2014-11-12 08:31:50.097367160 +0100 @@ -165,7 +165,7 @@ include_directories( ${X11_Xft_INCLUDE_PATH} ${X11_Xrender_INCLUDE_PATH} ${X11_Xrandr_INCLUDE_PATH} - ${FREETYPE_INCLUDE_DIR_freetype2} + ${FREETYPE_INCLUDE_DIRS} ${X11_Xmu_INCLUDE_PATH} ${ZLIB_INCLUDE_DIR} ${JPEG_INCLUDE_DIR}
*** Bug 531730 has been marked as a duplicate of this bug. ***
OK this has been open long enough; still think the issue is with this dangling symlink, but it's an easy enough workaround and it shouldn't break anything... + 05 Dec 2014; Ian Stakenvicius (_AxS_) <axs@gentoo.org> + +files/slim-1.3.6-freetype.patch, slim-1.3.6-r3.ebuild, slim-1.3.6-r4.ebuild: + fixed CMakeLists.txt to include all freetype headers, bug 517270 +