Bug 14976

Summary: Ghostscript package can not process pdf files anymore
Product: buildroot Reporter: Lars <lars.george>
Component: OtherAssignee: unassigned
Status: RESOLVED MOVED    
Severity: normal CC: buildroot, yann.morin.1998
Priority: P5    
Version: 2022.02   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Lars 2022-08-29 04:53:18 UTC
Dear Buildroot Dev Team,

thanks for the great work in the first place!

I am facing an issue with the Ghostscript package that is available in buildroot. Starting with Version 2022.02 I am not able to process PDF files anymore. I was already in contact with the Ghostscript developers, and we found out that this has to do with the added compile option "--without-pdf" as the version was updated to 9.55.0 (https://github.com/buildroot/buildroot/commit/7a4944569ce83b0b7b0cabd6e8aa184b8cb72a22). They changed how PDF files are processed and did a greater rework, but adding this above mentioned option totally disables the PDF feature (which is crucial for example when driverless printing via Ghostscript is used). I think this is not a generally wanted option. They also offered help when further need is required to work out the proper compile options for the make settings within buildroot.
Comment 1 Lars 2022-08-30 05:25:09 UTC
I digged into the problem a little bit and got a fix for myself. First of all I patched the mk file of the Ghostscript package:

 define GHOSTSCRIPT_REMOVE_LIBS
 	rm -rf $(@D)/freetype $(@D)/ijs $(@D)/jbig2dec $(@D)/jpeg \
-		$(@D)/lcms2mt $(@D)/libpng $(@D)/openjpeg $(@D)/tiff \
+		$(@D)/lcms2mt $(@D)/libpng $(@D)/tiff \
 		$(@D)/zlib
 endef
 GHOSTSCRIPT_POST_PATCH_HOOKS += GHOSTSCRIPT_REMOVE_LIBS
@@ -43,7 +43,7 @@
 	--enable-freetype \
 	--disable-gtk \
 	--without-libpaper \
-	--without-pdf \
+	--with-pdf \
 	--with-system-libtiff
 
 ifeq ($(BR2_PACKAGE_JBIG2DEC),y)


Furthermore I do need to have the following BR packages:
- BR2_PACKAGE_JBIG2DEC
- BR2_PACKAGE_OPENJPEG
Comment 2 Yann E. MORIN 2024-06-15 15:03:59 UTC
Thank you for your report.

The issue tracker for the Buildroot project has been moved to
the Gitlab.com issue tracker:
    https://gitlab.com/buildroot.org/buildroot/-/issues

We are taking this opportunity to close old issues in this old
tracker. If you believe your issue is still relevant, please
open one in the new issue tracker.

Thank you!