View Issue Details

IDProjectCategoryView StatusLast Update
0015852ScribusBuild Systempublic2019-10-14 07:06
Reporterbkylerussell Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0015852: [PATCH] CMake can't locate some icu-uc headers with pkg-config
DescriptionA couple of libraries that depend on icu-uc headers don't use the pkg_check_modules provided ${ICU_INCLUDEDIR} variable to correctly configure their include_directories. I encountered this configuration error when icu4c was installed using brew.

$ brew install harfbuzz
...
==> Installing harfbuzz dependency: icu4c
...
For pkg-config to find icu4c you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"

$ cmake ../Scribus
...
-- Package 'icu-uc', required by 'harfbuzz-icu', not found
CMake Error at /usr/local/Cellar/cmake/3.15.4/share/cmake/Modules/FindPkgConfig.cmake:458 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.15.4/share/cmake/Modules/FindPkgConfig.cmake:637 (_pkg_check_modules_internal)
  CMakeLists_Dependencies.cmake:319 (pkg_check_modules)
  CMakeLists.txt:358 (include)


-- Configuring incomplete, errors occurred!
$ export PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig/
$ make
...
In file included from /Users/bkylerussell/code/scribus/Scribus/scribus/styles/linestyle.cpp:18:
In file included from /Users/bkylerussell/code/scribus/Scribus/scribus/prefsmanager.h:28:
In file included from /Users/bkylerussell/code/scribus/Scribus/scribus/prefsstructs.h:24:
In file included from /Users/bkylerussell/code/scribus/Scribus/scribus/pdfoptions.h:21:
In file included from /Users/bkylerussell/code/scribus/Scribus/scribus/scribusstructs.h:32:
In file included from /Users/bkylerussell/code/scribus/Scribus/scribus/pageitem.h:50:
/Users/bkylerussell/code/scribus/Scribus/scribus/text/storytext.h:33:10: fatal error: 'unicode/brkiter.h' file not found
#include <unicode/brkiter.h>
         ^~~~~~~~~~~~~~~~~~~
1 error generated.
...
[ 7%] Building CXX object scribus/third_party/rtf-qt/CMakeFiles/scribus_rtf_lib.dir/sladocumentrtfoutput.cpp.o
In file included from /Users/bkylerussell/code/scribus/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp:20:

In file included from /Users/bkylerussell/code/scribus/Scribus/scribus/pageitem.h:50:
/Users/bkylerussell/code/scribus/Scribus/scribus/text/storytext.h:33:10: fatal error: 'unicode/brkiter.h' file not found
#include <unicode/brkiter.h>
         ^~~~~~~~~~~~~~~~~~~
1 error generated.



Tagspatch
PatchYes

Activities

bkylerussell

2019-10-14 02:33

reporter   ~0046775

Patch file for missing icu header includes

icu-headers.diff (868 bytes)
Index: Scribus/scribus/styles/CMakeLists.txt
===================================================================
--- Scribus/scribus/styles/CMakeLists.txt	(revision 23255)
+++ Scribus/scribus/styles/CMakeLists.txt	(working copy)
@@ -2,6 +2,7 @@
 	${CMAKE_SOURCE_DIR}
 	${CMAKE_SOURCE_DIR}/scribus
 	${FREETYPE_INCLUDE_DIRS}
+	${ICU_INCLUDE_DIRS}
 )
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_FPIC}")
Index: Scribus/scribus/third_party/rtf-qt/CMakeLists.txt
===================================================================
--- Scribus/scribus/third_party/rtf-qt/CMakeLists.txt	(revision 23255)
+++ Scribus/scribus/third_party/rtf-qt/CMakeLists.txt	(working copy)
@@ -2,6 +2,7 @@
 ${CMAKE_SOURCE_DIR}
 ${CMAKE_SOURCE_DIR}/scribus
 ${FREETYPE_INCLUDE_DIRS}
+${ICU_INCLUDE_DIRS}
 )
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_FPIC}")
icu-headers.diff (868 bytes)

Issue History

Date Modified Username Field Change
2019-10-14 02:29 bkylerussell New Issue
2019-10-14 02:33 bkylerussell File Added: icu-headers.diff
2019-10-14 02:33 bkylerussell Note Added: 0046775
2019-10-14 07:06 ale Summary CMake can't locate some icu-uc headers with pkg-config => [PATCH] CMake can't locate some icu-uc headers with pkg-config
2019-10-14 07:06 ale Tag Attached: patch