politza / pdf-tools

Emacs support library for PDF files.
GNU General Public License v3.0
1.57k stars 162 forks source link

syntax error near unexpected token `png,' #142

Closed DamienCassou closed 8 years ago

DamienCassou commented 9 years ago

I can't compile. Here is an extract:

configuring
no configure script, doing nothing
building
cd server && ./autogen.sh
Running autoreconf...
configure.ac:15: installing './ar-lib'
configure.ac:11: installing './compile'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
Makefile.am: installing './depcomp'
cd server && ./configure -q
./configure: line 4731: syntax error near unexpected token `png,'
./configure: line 4731: `PKG_CHECK_MODULES(png, libpng)'
Makefile:63: recipe for target 'server/Makefile' failed
make: *** [server/Makefile] Error 2
politza commented 9 years ago

Damien Cassou notifications@github.com writes:

./configure: line 4731: syntax error near unexpected token png,' ./configure: line 4731:PKG_CHECK_MODULES(png, libpng)'

I think you need to install pkg-config.

A-Gern commented 8 years ago

I have pkg-config (version 0.29) installed, but I am having the same issue.
I'm using Debian Jessie (with gtklp and a few others from Testing).

-- mode: compilation; default-directory: "~/" -- Comint started at Tue Nov 15 15:52:25

make V=0 -kC '/home/oscar/.emacs.d/elpa/pdf-tools-0.70/build' install-server-deps melpa-build make: Entering directory '/home/oscar/.emacs.d/elpa/pdf-tools-0.70/build' sudo apt-get install gcc g++ make automake autoconf \ libpng-dev libz-dev libpoppler-glib-dev [sudo] password for oscar: Reading package lists... Done Building dependency tree
Reading state information... Done Note, selecting 'zlib1g-dev' instead of 'libz-dev' autoconf is already the newest version. automake is already the newest version. g++ is already the newest version. gcc is already the newest version. make is already the newest version. libpoppler-glib-dev is already the newest version. zlib1g-dev is already the newest version. libpng-dev is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. sudo apt-get install libpoppler-private-dev Reading package lists... Done Building dependency tree
Reading state information... Done libpoppler-private-dev is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. sudo apt-get install gtklp Reading package lists... Done Building dependency tree
Reading state information... Done gtklp is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. cd server && ./configure -q ./configure: line 4731: syntax error near unexpected token png,' ./configure: line 4731:PKG_CHECK_MODULES(png, libpng)' Makefile:63: recipe for target 'server/Makefile' failed make: *\ [server/Makefile] Error 2 make: Target 'melpa-build' not remade because of errors. make: Leaving directory '/home/oscar/.emacs.d/elpa/pdf-tools-0.70/build'

Comint exited abnormally with code 2 at Tue Nov 15 15:52:31

politza commented 8 years ago

I have no idea what's going on. Can you upload the configure file somewhere, please ? What's the output of the following commands ?

pkg-config --cflags libpng
locate pkg.m4
A-Gern commented 8 years ago

$ pkg-config --cflags libpng -I/usr/include/libpng16 $ locate pkg.m4 /usr/share/aclocal/pkg.m4

my .emacs is at: https://github.com/A-Gern/my-emacs-config/blob/master/.emacs

dionisos2 commented 7 years ago

If it can help someone, i got the same problem, and fixed it by doing a: $ autoreconf In the pdf-tools/server directory, after it i could run make in the pdf-tools directory, and everything was working.

Then i copy pasted the epdfinfo inside the correct emacs directory, because i wanted it installed with melpa, and the generation of the epdfinfo file was apparently the only thing which wasn’t working.

ashkan-leo commented 3 years ago

I also get this error on my mac. Any fix?

takedawilliam commented 3 years ago

I have the same problem on my mac. I tried @dionisos2's solution but the following error still occurs

./configure: line 5503: syntax error near unexpected token `png,'
./configure: line 5503: `PKG_CHECK_MODULES(png, libpng)'