Page MenuHomePhabricator
Paste P5564

Tool Labs local compiling of djvutoxml and pdftotext T166985
ActivePublic

Authored by zhuyifei1999 on Jun 9 2017, 7:32 PM.
tools.zhuyifei1999-test@tools-bastion-02:~$ wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.04.tar.gz
--2017-06-09 19:03:27-- ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.04.tar.gz
=> ‘xpdf-3.04.tar.gz’
Resolving ftp.foolabs.com (ftp.foolabs.com)... 50.0.186.21
Connecting to ftp.foolabs.com (ftp.foolabs.com)|50.0.186.21|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/xpdf ... done.
==> SIZE xpdf-3.04.tar.gz ... 825519
==> PASV ... done. ==> RETR xpdf-3.04.tar.gz ... done.
Length: 825519 (806K) (unauthoritative)
100%[=====================================================================================================>] 825,519 95.7KB/s in 7.6s
2017-06-09 19:03:36 (107 KB/s) - ‘xpdf-3.04.tar.gz’ saved [825519]
tools.zhuyifei1999-test@tools-bastion-02:~$ tar -xzf xpdf-3.04.tar.gz
tools.zhuyifei1999-test@tools-bastion-02:~$ wget http://downloads.sourceforge.net/djvu/djvulibre-3.5.27.tar.gz
--2017-06-09 19:06:32-- http://downloads.sourceforge.net/djvu/djvulibre-3.5.27.tar.gz
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59
Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://downloads.sourceforge.net/project/djvu/DjVuLibre/3.5.27/djvulibre-3.5.27.tar.gz [following]
--2017-06-09 19:06:33-- http://downloads.sourceforge.net/project/djvu/DjVuLibre/3.5.27/djvulibre-3.5.27.tar.gz
Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://iweb.dl.sourceforge.net/project/djvu/DjVuLibre/3.5.27/djvulibre-3.5.27.tar.gz [following]
--2017-06-09 19:06:33-- https://iweb.dl.sourceforge.net/project/djvu/DjVuLibre/3.5.27/djvulibre-3.5.27.tar.gz
Resolving iweb.dl.sourceforge.net (iweb.dl.sourceforge.net)... 192.175.120.182, 2607:f748:10:12::5f:2
Connecting to iweb.dl.sourceforge.net (iweb.dl.sourceforge.net)|192.175.120.182|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3648522 (3.5M) [application/x-gzip]
Saving to: ‘djvulibre-3.5.27.tar.gz’
100%[=====================================================================================================>] 3,648,522 10.9MB/s in 0.3s
2017-06-09 19:06:34 (10.9 MB/s) - ‘djvulibre-3.5.27.tar.gz’ saved [3648522/3648522]
tools.zhuyifei1999-test@tools-bastion-02:~$ tar -xzf djvulibre-3.5.27.tar.gz
tools.zhuyifei1999-test@tools-bastion-02:~$ webservice --backend=kubernetes python2 shell
If you don't see a command prompt, try pressing enter.
tools.zhuyifei1999-test@interactive:~$
tools.zhuyifei1999-test@interactive:~$ ls -F
djvulibre-3.5.27/ djvulibre-3.5.27.tar.gz logs/ replica.my.cnf xpdf-3.04/ xpdf-3.04.tar.gz
tools.zhuyifei1999-test@interactive:~$ export PATH=~/.local/bin:$PATH CPATH=~/.local/include LIBRARY_PATH=~/.local/lib PKG_CONFIG_PATH=~/.local/lib/pkgconfig
tools.zhuyifei1999-test@interactive:~$ cd djvulibre-3.5.27
tools.zhuyifei1999-test@interactive:/data/project/zhuyifei1999-test/djvulibre-3.5.27$ ./configure --prefix=${HOME}/.local
[...]
tools.zhuyifei1999-test@interactive:/data/project/zhuyifei1999-test/djvulibre-3.5.27$ make
[...]
tools.zhuyifei1999-test@interactive:/data/project/zhuyifei1999-test/djvulibre-3.5.27$ make install
[...]
tools.zhuyifei1999-test@interactive:/data/project/zhuyifei1999-test/djvulibre-3.5.27$ whereis djvutoxml
djvutoxml: /data/project/zhuyifei1999-test/.local/bin/djvutoxml
tools.zhuyifei1999-test@interactive:/data/project/zhuyifei1999-test/djvulibre-3.5.27$ djvutoxml
[1-18202] djvutoxml: unspecified input file name.
Usage: djvutoxml [options] <inputfile> <outputfile>
Options:
--with[out]-anno
--with[out]-text
--page p
tools.zhuyifei1999-test@interactive:/data/project/zhuyifei1999-test/djvulibre-3.5.27$ cd ../xpdf-3.04
tools.zhuyifei1999-test@interactive:/data/project/zhuyifei1999-test/xpdf-3.04$ ./configure --prefix=${HOME}/.local
[...]
configure: WARNING: Couldn't find X
configure: WARNING: Couldn't find Motif
configure: WARNING: Couldn't find FreeType
configure: WARNING: -- You will be able to compile pdftops, pdftotext,
pdfinfo, pdffonts, pdfdetach, and pdfimages, but not xpdf
or pdftoppm
configure: WARNING: Couldn't find libpng -- you will not be able to build pdftohtml or pdftopng
tools.zhuyifei1999-test@interactive:/data/project/zhuyifei1999-test/xpdf-3.04$ make
[...]
g++ -g -O2 -DHAVE_CONFIG_H -I.. -I./.. -I./../goo -I./../fofi -I./../splash -I. -c TextOutputDev.cc
g++ -g -O2 -DHAVE_CONFIG_H -I.. -I./.. -I./../goo -I./../fofi -I./../splash -I. -c UnicodeTypeTable.cc
g++ -g -O2 -DHAVE_CONFIG_H -I.. -I./.. -I./../goo -I./../fofi -I./../splash -I. -c pdftotext.cc
g++ -g -O2 -DHAVE_CONFIG_H -I.. -I./.. -I./../goo -I./../fofi -I./../splash -I. -o pdftotext AcroForm.o Annot.o Array.o BuiltinFont.o BuiltinFontTables.o Catalog.o CharCodeToUnicode.o CMap.o Decrypt.o Dict.o Error.o FontEncodingTables.o Form.o Function.o Gfx.o GfxFont.o GfxState.o GlobalParams.o JArithmeticDecoder.o JBIG2Stream.o JPXStream.o Lexer.o Link.o NameToCharCode.o Object.o OptionalContent.o Outline.o OutputDev.o Page.o Parser.o PDFDoc.o PDFDocEncoding.o PSTokenizer.o SecurityHandler.o Stream.o TextOutputDev.o TextString.o UnicodeMap.o UnicodeTypeTable.o XFAForm.o XpdfPluginAPI.o XRef.o Zoox.o pdftotext.o \
-L../goo -lGoo -L../fofi -lfofi -L../goo -lGoo -lm
g++ -g -O2 -DHAVE_CONFIG_H -I.. -I./.. -I./../goo -I./../fofi -I./../splash -I. -c HTMLGen.cc
HTMLGen.cc:30:17: fatal error: png.h: No such file or directory
#include <png.h>
^
compilation terminated.
Makefile:48: recipe for target 'HTMLGen.o' failed
make[1]: *** [HTMLGen.o] Error 1
make[1]: Leaving directory '/data/project/zhuyifei1999-test/xpdf-3.04/xpdf'
Makefile:24: recipe for target 'all' failed
make: *** [all] Error 2
tools.zhuyifei1999-test@interactive:/data/project/zhuyifei1999-test/xpdf-3.04$ make pdftotext
cd goo; make
make[1]: Entering directory '/data/project/zhuyifei1999-test/xpdf-3.04/goo'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/data/project/zhuyifei1999-test/xpdf-3.04/goo'
cd fofi; make
make[1]: Entering directory '/data/project/zhuyifei1999-test/xpdf-3.04/fofi'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/data/project/zhuyifei1999-test/xpdf-3.04/fofi'
cd splash; make
make[1]: Entering directory '/data/project/zhuyifei1999-test/xpdf-3.04/splash'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/data/project/zhuyifei1999-test/xpdf-3.04/splash'
cd xpdf; make pdftotext
make[1]: Entering directory '/data/project/zhuyifei1999-test/xpdf-3.04/xpdf'
make[1]: 'pdftotext' is up to date.
make[1]: Leaving directory '/data/project/zhuyifei1999-test/xpdf-3.04/xpdf'
tools.zhuyifei1999-test@interactive:/data/project/zhuyifei1999-test/xpdf-3.04$ make install
mkdir -p /data/project/zhuyifei1999-test//.local/bin
/usr/bin/install -c xpdf/pdftops /data/project/zhuyifei1999-test//.local/bin/pdftops
/usr/bin/install -c xpdf/pdftotext /data/project/zhuyifei1999-test//.local/bin/pdftotext
/usr/bin/install -c xpdf/pdfinfo /data/project/zhuyifei1999-test//.local/bin/pdfinfo
/usr/bin/install: cannot stat ‘xpdf/pdfinfo’: No such file or directory
Makefile:85: recipe for target 'install' failed
make: *** [install] Error 1
tools.zhuyifei1999-test@interactive:/data/project/zhuyifei1999-test/xpdf-3.04$ whereis pdftotext
pdftotext: /data/project/zhuyifei1999-test/.local/bin/pdftotext
tools.zhuyifei1999-test@interactive:/data/project/zhuyifei1999-test/xpdf-3.04$ pdftotext
pdftotext version 3.04
Copyright 1996-2014 Glyph & Cog, LLC
Usage: pdftotext [options] <PDF-file> [<text-file>]
-f <int> : first page to convert
-l <int> : last page to convert
-layout : maintain original physical layout
-table : similar to -layout, but optimized for tables
-lineprinter : use strict fixed-pitch/height layout
-raw : keep strings in content stream order
-fixed <fp> : assume fixed-pitch (or tabular) text
-linespacing <fp> : fixed line spacing for LinePrinter mode
-clip : separate clipped text
-enc <string> : output text encoding name
-eol <string> : output end-of-line convention (unix, dos, or mac)
-nopgbrk : don't insert page breaks between pages
-opw <string> : owner password (for encrypted files)
-upw <string> : user password (for encrypted files)
-q : don't print any messages or errors
-cfg <string> : configuration file to use in place of .xpdfrc
-v : print copyright and version info
-h : print usage information
-help : print usage information
--help : print usage information
-? : print usage information