By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 2489

Summary: Build issue: tdegraphics (poppler-tqt) FTBFS when poppler is installed in non-standard location
Product: TDE Reporter: Francois Andriot <albator78>
Component: tdegraphicsAssignee: Slávek Banko <slavek.banko>
Status: RESOLVED FIXED    
Severity: normal CC: albator78, bugwatch, slavek.banko
Priority: P5    
Version: R14.0.1 [Trinity]   
Hardware: Other   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Bug Depends on:    
Bug Blocks: 2468    
Attachments: Fix poppler include in configure checks and hardcoded link library
Fix poppler include in configure checks and link library path

Description Francois Andriot 2015-07-29 14:24:54 CDT
Hello, I have poppler installed somewhere else than "/usr", e.g. "/opt/poppler", so there are "/opt/poppler/include" and "/opt/trinity/lib64" directories.
Actually, the include files are under a subfolder "/opt/poppler/include/poppler" .

Then FTBFS in tdefile-plugins/dependencies/poppler-tqt/CMakeLists.txt , because "poppler/poppler-config.h" is not found.

Cmake sets POPPLER_INCLUDE_DIRS to "/opt/poppler/include/poppler", so "poppler-config.h" should be included as #include "poppler-config.h", not "poppler/poppler-config.h" .

Also, in the same CMakeLists.txt, "link_directories" lacks ${POPPLER_LIBRARY_DIRS}, this causes FTBFS too.
Comment 1 Slávek Banko 2015-07-29 18:26:57 CDT
François, in tdegraphics is nowhere include poppler-config.h. Only where is poppler-config.h include are header files poppler as such. You mean include poppler/PSOutputDev.h in tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake?
Comment 2 Francois Andriot 2015-07-30 03:33:09 CDT
The FTBFS says about poppler/poppler-config.h, but yes, it's probably included by an other header.
Anyway, whenever someone includes "poppler/xxxx.h", it is expected that "/opt/poppler/include" is in INCLUDE_DIRS, not "/opt/poppler/include/poppler".
Comment 3 Slávek Banko 2015-07-30 14:19:53 CDT
Created attachment 2542 [details]
Fix poppler include in configure checks and hardcoded link library

Because pkg-config file references include path including 'poppler/', it is probably possible to delete this in configuration tests. I think that if 'poppler/' is contained in include files of poppler as such, should accordingly be set both values for include paths in poppler pkg-config file.

I also changed linking from hardcoded 'poppler' to ${POPPLER_LIBRARIES}. Could this will help in case of non-standard installation path of poppler?
Comment 4 Francois Andriot 2015-07-30 15:40:00 CDT
Patch looks good, but is still missing addition to "link_directories", so FTBFS because "-lpoppler" cannot be found.
You should add ${POPPLER_LIBRARY_DIRS} to link_directories.
Comment 5 Slávek Banko 2015-07-31 02:23:43 CDT
Created attachment 2543 [details]
Fix poppler include in configure checks and link library path
Comment 6 Francois Andriot 2015-07-31 17:43:28 CDT
Patch is OK for me.
Comment 7 Slávek Banko 2015-08-30 07:28:28 CDT
Pushed to GIT in hash ac4aa21a (master) and 417b842f (r14.0.x).