Package Details: pdftxt 0.7-6

Git Clone URL: https://aur.archlinux.org/pdftxt.git (read-only, click to copy)
Package Base: pdftxt
Description: Simple wrapper around libmupdf to extract text from PDF files
Upstream URL: https://litcave.rudi.ir
Licenses: BSD
Submitter: Sara
Maintainer: eclairevoyant
Last Packager: eclairevoyant
Votes: 6
Popularity: 0.000010
First Submitted: 2012-07-10 19:53 (UTC)
Last Updated: 2023-09-30 03:40 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

MarsSeed commented on 2023-05-27 20:21 (UTC)

@m040601, @alerque,

Did you try to disable LTO option in makepkg.conf, or in PKGBUILD?

This type of linking error is very common with old projects when trying to build them with link-time-optimization enabled.

m040601 commented on 2022-09-27 14:53 (UTC) (edited on 2022-09-27 14:58 (UTC) by m040601)

Like the previous commentator it also fails to build for me,

==> Starting build()...
cc -c -Wall -O2 -I./include pdftxt.c
cc -o pdftxt pdftxt.o -lopenjp2 -lharfbuzz -lfreetype -lz -ljpeg -ljbig2dec -lmupdf -lmupdf-third -lm
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/libmupdf.a(xml.o): in function `xml_from_gumbo':
(.text.xml_from_gumbo+0x1a2): undefined reference to `gumbo_normalized_tagname'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/libmupdf.a(xml.o): in function `fz_parse_xml_from_html5':
(.text.fz_parse_xml_from_html5+0x12f): undefined reference to `gumbo_destroy_output'
/usr/bin/ld: (.text.fz_parse_xml_from_html5+0x252): undefined reference to `gumbo_parse_with_options'
collect2: error: ld returned 1 exit status
make: *** [Makefile:10: pdftxt] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
     -> error making: pdftxt

Possibly something wrong in the PKGBUILD,

prepare() {
  cd "$srcdir/$pkgname-$pkgver"
  sed -i 's/-lopenjpeg/-lopenjp2/' Makefile
  sed -i 's/-lmupdfthird/-lmupdf-third/' Makefile
}

or here

build() {
  cd "$srcdir/$pkgname-$pkgver"
  make LDFLAGS="-lopenjp2 -lharfbuzz -lfreetype -lz -ljpeg -ljbig2dec"
}

This PKGBUILD has not been touched since 2020. The maintainer of this PKGBUILD has not responded to any comments.

Notice also that this tool might have been abandoned by its original author. Needs further checking.

It is still listed in the authors homepage, http://litcave.rudi.ir/ under "Others" and the "tar.gz" is still available.

But it is removed and not present in the authors' git repos

Either, https://github.com/aligrudi/ or its original mirror, https://repo.or.cz/projlist.cgi?name=e4985eabe11cacf799a880921d7ab569

alerque commented on 2022-04-28 07:55 (UTC)

I ran into trouble trying to build this recently (in a clean chroot), it might need some more patching or dependencies or something.

aksr commented on 2020-03-22 07:36 (UTC)

Fixed (thank you ChrisMorgan).

ChrisMorgan commented on 2020-02-29 14:56 (UTC)

Failing to build again. Here’s a formatted patch that fixes it (paste it into foo.patch and run git am foo.patch to take the commit verbatim):

From b1eb0f558b6730182b1c8cdac1ee5556750fa22d Mon Sep 17 00:00:00 2001
From: Chris Morgan <me@chrismorgan.info>
Date: Sun, 1 Mar 2020 01:52:39 +1100
Subject: [PATCH] Patch Makefile to link against current mupdf

My attempt to build this package failed:

    ==> Starting build()...
    cc -c -Wall -O2 -I./include pdftxt.c
    cc -o pdftxt pdftxt.o -lopenjp2 -lharfbuzz -lfreetype -lz -ljpeg -ljbig2dec -lmupdf -lmupdfthird -lm
    /usr/sbin/ld: cannot find -lmupdfthird
    collect2: error: ld returned 1 exit status
    make: *** [Makefile:10: pdftxt] Error 1

I found /usr/lib/libmupdf-third.a, so I guess a hyphen was added
somewhere along the way? After this Makefile patch, it builds and runs.
---
 .SRCINFO       |  8 +++++---
 Makefile.patch | 10 ++++++++++
 PKGBUILD       |  7 ++++++-
 3 files changed, 21 insertions(+), 4 deletions(-)
 create mode 100644 Makefile.patch

diff --git a/.SRCINFO b/.SRCINFO
index bc75c40..f250ce3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Sat Mar 24 09:03:28 UTC 2018
 pkgbase = pdftxt
    pkgdesc = A simple wrapper around mupdf library to extract text from pdf files.
    pkgver = 0.7
-   pkgrel = 1
+   pkgrel = 2
    url = http://litcave.rudi.ir
    install = pdftxt.install
    arch = i686
@@ -12,15 +10,19 @@ pkgbase = pdftxt
    depends = mupdf
    depends = libmupdf
    source = http://litcave.rudi.ir/pdftxt-0.7.tar.gz
+   source = Makefile.patch
    source = mupdfgrep
    source = LICENSE
    md5sums = 226fa17bc1044207db1d40ebd3c769f5
+   md5sums = 37204a8aaac1e14cdcd82915db3088c7
    md5sums = 95ccf38e8ab9ae076b9ad45d27ab0899
    md5sums = ec67f29a7dec10f86ef31515ed657a91
    sha1sums = 8e1f9a4fefbd85d942a76a2ed020de9059a14fb4
+   sha1sums = 3c1ba417ab95de269c28e97107e1ac9f925d1800
    sha1sums = 30b7ed6cef089d9777c90108138c91526ff60d8d
    sha1sums = 76a535243054e1fdd9caaa46a1571cd381d74353
    sha256sums = 01361355c4bfe4a51d2bfec27ac52592ce99a706097666631028f7ba67e432e8
+   sha256sums = eca9d3c683c0ee95cb7b24ec3958204d944e645a5aa519509e5ac1d23f94591b
    sha256sums = f4ec1ef6838f9e8e77d5710c108dceec1fb4b256bc548615e1670b90d9e53eec
    sha256sums = 0ea8d51c57a3a59ca57428b6fe9b47fdb1fde281fc1b095c9832872e85b09a72

diff --git a/Makefile.patch b/Makefile.patch
new file mode 100644
index 0000000..e73b0ec
--- /dev/null
+++ b/Makefile.patch
@@ -0,0 +1,10 @@
+--- Makefile
++++ Makefile
+@@ -7,6 +7,6 @@
+ %.o: %.c
+   $(CC) -c $(CFLAGS) $<
+ pdftxt: pdftxt.o
+-  $(CC) -o $@ $^ $(LDFLAGS) -lmupdf -lmupdfthird -lm
++  $(CC) -o $@ $^ $(LDFLAGS) -lmupdf -lmupdf-third -lm
+ clean:
+   rm -f *.o pdftxt
diff --git a/PKGBUILD b/PKGBUILD
index 5f663b8..e6136e1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
 # Maintainer: aksr <aksr at t-com dot me>
 pkgname=pdftxt
 pkgver=0.7
-pkgrel=1
+pkgrel=2
 epoch=
 pkgdesc="A simple wrapper around mupdf library to extract text from pdf files."
 arch=('i686' 'x86_64')
@@ -21,17 +21,21 @@ options=()
 install=pdftxt.install
 changelog=
 source=("http://litcave.rudi.ir/${pkgname}-${pkgver}.tar.gz"
+        'Makefile.patch'
         'mupdfgrep'
         'LICENSE')
 noextract=()
 options=()
 md5sums=('226fa17bc1044207db1d40ebd3c769f5'
+         '37204a8aaac1e14cdcd82915db3088c7'
          '95ccf38e8ab9ae076b9ad45d27ab0899'
          'ec67f29a7dec10f86ef31515ed657a91')
 sha1sums=('8e1f9a4fefbd85d942a76a2ed020de9059a14fb4'
+          '3c1ba417ab95de269c28e97107e1ac9f925d1800'
           '30b7ed6cef089d9777c90108138c91526ff60d8d'
           '76a535243054e1fdd9caaa46a1571cd381d74353')
 sha256sums=('01361355c4bfe4a51d2bfec27ac52592ce99a706097666631028f7ba67e432e8'
+            'eca9d3c683c0ee95cb7b24ec3958204d944e645a5aa519509e5ac1d23f94591b'
             'f4ec1ef6838f9e8e77d5710c108dceec1fb4b256bc548615e1670b90d9e53eec'
             '0ea8d51c57a3a59ca57428b6fe9b47fdb1fde281fc1b095c9832872e85b09a72')

@@ -42,6 +46,7 @@ prepare() {

 build() {
   cd "$srcdir/$pkgname-$pkgver"
+  patch -Ni "$srcdir/Makefile.patch"
   make LDFLAGS="-lopenjp2 -lharfbuzz -lfreetype -lz -ljpeg -ljbig2dec"
 }

-- 
2.25.1

TrialnError commented on 2018-02-02 00:01 (UTC)

Maybe this should be removed from aurweb? Upstream didn't do something in a while and it cannot be compiled against mupdf 1.12

TrialnError commented on 2016-09-29 10:33 (UTC)

Still needs a look at the depends line. Without libmupdf installed this will fail to compile