Skip to contentSkip to conversation

poppler nightmare

PATCH In review Andreas Müller 3 participants 7 messages Apr 3, 2018 – Apr 4, 2018

lore
Share & tools
lore
#0 lore raw

cover poppler nightmare

Not convinced that I'll get support at poppler project. Let's see what autobuilder says. If it fails, please unroll back to 0.57.0 - I am sure that disable glib causes trouble for evince.

Andreas Müller (2):
poppler: Rework patch fixing do_configure
poppler: update 0.62.0- > 0.63.0

 ...0001-Do-not-overwrite-all-our-build-flags.patch | 36 ++++++++++++----------
 .../{poppler_0.62.0.bb => poppler_0.63.0.bb}       |  4 +--
 2 files changed, 21 insertions(+), 19 deletions(-)
 rename meta-oe/recipes-support/poppler/{poppler_0.62.0.bb => poppler_0.63.0.bb} (93%)
Signature · 1 line
2.14.3
#1 lore raw

PATCH 1/2 poppler: Rework patch fixing do_configure

Turn the patch from a workaround into a proper fix. It was submitted to poppler bugzilla - but after endless discussions I won't follow this further.

---
 ...0001-Do-not-overwrite-all-our-build-flags.patch | 36 ++++++++++++----------
 1 file changed, 19 insertions(+), 17 deletions(-)
meta-oe/recipes-support/poppler/poppler/0001-Do-not-overwrite-all-our-build-flags.patch +19 -17
index 5b66a8a9c..18f508519 100644
@@ -10,27 +10,29 @@ Upstream-Status: Inappropriate [embedded specific]
 
 Signed-off-by: Andreas Müller <[email protected]>
 ---
- cmake/modules/PopplerMacros.cmake | 2 ++
- 1 file changed, 2 insertions(+)
+ cmake/modules/PopplerMacros.cmake | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
-index ccb2790..f29481e 100644
+index ccb2790..0f392cb 100644
 --- a/cmake/modules/PopplerMacros.cmake
 +++ b/cmake/modules/PopplerMacros.cmake
-@@ -98,6 +98,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
-   set(CMAKE_BUILD_TYPE RelWithDebInfo)
- endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
- 
-+if(false)
- if(CMAKE_COMPILER_IS_GNUCXX)
-   # set the default compile warnings
-   set(_warn "-Wall -Wextra -Wpedantic")
-@@ -159,4 +160,5 @@ if(CMAKE_C_COMPILER MATCHES "icc")
-   set(CMAKE_C_FLAGS_DEBUG            "-O2 -g -Ob0 -noalign ${_save_cflags}")
-   set(CMAKE_C_FLAGS_DEBUGFULL        "-g -Ob0 -noalign ${_save_cflags}")
- endif(CMAKE_C_COMPILER MATCHES "icc")
-+endif(false)
+@@ -125,14 +125,14 @@ if(CMAKE_COMPILER_IS_GNUCXX)
+   set(DEFAULT_COMPILE_WARNINGS_EXTRA "${_warn} ${_warnx}")
  
+   set(_save_cxxflags "${CMAKE_CXX_FLAGS}")
+-  set(CMAKE_CXX_FLAGS                "-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE")
++  set(CMAKE_CXX_FLAGS                "-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_DEBUG          "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g3 -fno-inline ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_PROFILE        "-g3 -fno-inline -ftest-coverage -fprofile-arcs ${_save_cxxflags}")
+   set(_save_cflags "${CMAKE_C_FLAGS}")
+-  set(CMAKE_C_FLAGS                  "-std=c99 -D_DEFAULT_SOURCE")
++  set(CMAKE_C_FLAGS                  "-std=c99 -D_DEFAULT_SOURCE ${_save_cflags}")
+   set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g ${_save_cflags}")
+   set(CMAKE_C_FLAGS_RELEASE          "-O2 -DNDEBUG ${_save_cflags}")
+   set(CMAKE_C_FLAGS_DEBUG            "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cflags}")
 -- 
 2.14.3
-
Signature · 1 line
2.14.3
#2 lore raw

PATCH 2/2 poppler: update 0.62.0- > 0.63.0

In reply to Andreas Müller
---
 .../recipes-support/poppler/{poppler_0.62.0.bb => poppler_0.63.0.bb}  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta-oe/recipes-support/poppler/{poppler_0.62.0.bb => poppler_0.63.0.bb} (93%)
meta-oe/recipes-support/poppler/poppler_0.63.0.bb renamed from meta-oe/recipes-support/poppler/poppler_0.62.0.bb +2 -2
similarity index 93%
rename from meta-oe/recipes-support/poppler/poppler_0.62.0.bb
rename to meta-oe/recipes-support/poppler/poppler_0.63.0.bb
index 696621938..143df3f73 100644
@@ -6,8 +6,8 @@ SRC_URI = " \
     http://poppler.freedesktop.org/${BP}.tar.xz \
     file://0001-Do-not-overwrite-all-our-build-flags.patch \
 "
-SRC_URI[md5sum] = "42b801f2defaccb6b6cf1bf783ee1552"
-SRC_URI[sha256sum] = "5b9a73dfd4d6f61d165ada1e4f0abd2d420494bf9d0b1c15d0db3f7b83a729c6"
+SRC_URI[md5sum] = "66a54da4896b1408611699feda5c1821"
+SRC_URI[sha256sum] = "27cc8addafc791e1a26ce6acc2b490926ea73a4f89196dd8a7742cff7cf8a111"
 
 DEPENDS = "fontconfig zlib cairo lcms"
 
Signature · 1 line
2.14.3
#3 lore raw
In reply to Andreas Müller

Andreas,

Quoted 3 lines · Andreas Müller

Not convinced that I'll get support at poppler project. Let's see what autobuilder says. If it fails, please unroll back to 0.57.0 - I am sure that disable glib causes trouble for evince.

this didn't make it into the current world build. I built it @ home a getting the same errors:

| /build/build_artifacts/master/tmp-glibc/work/core2-64-oe-linux/poppler/0.63.0-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/7.3.0/ld:
warning: libpoppler.so.74, needed by ./libpoppler-glib.so, not found
(try using -rpath or -rpath-link)

- armin

Quoted 10 lines

Andreas Müller (2):
poppler: Rework patch fixing do_configure
poppler: update 0.62.0- > 0.63.0

 ...0001-Do-not-overwrite-all-our-build-flags.patch | 36 ++++++++++++----------
 .../{poppler_0.62.0.bb => poppler_0.63.0.bb}       |  4 +--
 2 files changed, 21 insertions(+), 19 deletions(-)
 rename meta-oe/recipes-support/poppler/{poppler_0.62.0.bb => poppler_0.63.0.bb} (93%)
#4 lore raw
Quoted 12 lines · On Wed, Apr 4, 2018 at 3:32 AM, akuster808 <[email protected]> wrote:

Andreas,

Quoted 3 lines · Andreas Müller

Not convinced that I'll get support at poppler project. Let's see what autobuilder says. If it fails, please unroll back to 0.57.0 - I am sure that disable glib causes trouble for evince.

this didn't make it into the current world build. I built it @ home a getting the same errors:

Quoted 6 lines

| /build/build_artifacts/master/tmp-glibc/work/core2-64-oe-linux/poppler/0.63.0-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/7.3.0/ld:
warning: libpoppler.so.74, needed by ./libpoppler-glib.so, not found
(try using -rpath or -rpath-link)

- armin

Thanks Armin for quick response. As written - I suggest to keep poppler at 0.57.0 and forget the updates for a while.

Sigh - from the moment I saw the announcement that poppler changes from autotools to cmake I thought there might be trouble is ahead. Now I know.

Andreas

#5 lore raw

I recently tried to cross build the current version of poppler for an embedded ARM system. This was not under the Yocto/OE build environment, but I never could get quite the right cmake config file to get the thing to build. Since I just needed it for the pdftoraster cups filter, I punted and built ghostscript instead. cmake may be fine for native builds, but at least in this case, it was a pain to use for cross-compilation.

-Bill

Quoted 32 lines · Andreas Müller
Quoted 12 lines · On Wed, Apr 4, 2018 at 3:32 AM, akuster808 <[email protected]> wrote:

Andreas,

Quoted 3 lines · Andreas Müller

Not convinced that I'll get support at poppler project. Let's see what autobuilder says. If it fails, please unroll back to 0.57.0 - I am sure that disable glib causes trouble for evince.

this didn't make it into the current world build. I built it @ home a getting the same errors:

Quoted 6 lines

| /build/build_artifacts/master/tmp-glibc/work/core2-64-oe-linux/poppler/0.63.0-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/7.3.0/ld:
warning: libpoppler.so.74, needed by ./libpoppler-glib.so, not found
(try using -rpath or -rpath-link)

- armin

Thanks Armin for quick response. As written - I suggest to keep poppler at 0.57.0 and forget the updates for a while.

Sigh - from the moment I saw the announcement that poppler changes from autotools to cmake I thought there might be trouble is ahead. Now I know.

Andreas
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#6 lore raw
Quoted 10 lines · Bill Randle

I recently tried to cross build the current version of poppler for an embedded ARM system. This was not under the Yocto/OE build environment, but I never could get quite the right cmake config file to get the thing to build. Since I just needed it for the pdftoraster cups filter, I punted and built ghostscript instead. cmake may be fine for native builds, but at least in this case, it was a pain to use for cross-compilation.

-Bill

Currently I see two issues:

1. Resetting al compiler flags was never a good idea for cross compiling. I've sent dozens of patches like this to many projects but at poppler I had to learn my marketing/skills/patience were not good enough [1]
2. on some environments (I can build 0.63.0 perfectly fine - but...) linking poppler-glib does not find libpoppler.

Maybe some CMake experts around willing to help out?

[1] https://bugs.freedesktop.org/show_bug.cgi?id=105852

Regards

Andreas