Skip to content
This repository has been archived by the owner on Aug 7, 2022. It is now read-only.

configure: syntax error near unexpected token `png,' #330

Closed
arademaker opened this issue Nov 2, 2017 · 7 comments
Closed

configure: syntax error near unexpected token `png,' #330

arademaker opened this issue Nov 2, 2017 · 7 comments

Comments

@arademaker
Copy link

In MacOS, I got the following error when I run pdf-tools-install, any idea?

---------------------------
 Configuring and compiling 
---------------------------
./configure -q --bindir=/Users/arademaker/.emacs.d/elpa/pdf-tools-20171012.2226/ && make -s
./configure: line 4745: syntax error near unexpected token `png,'
./configure: line 4745: `PKG_CHECK_MODULES(png, libpng)'
===========================
     Build failed.  ;o(    
===========================
Note: maybe try the '-d' option.

Comint exited abnormally with code 1 at Thu Nov  2 10:09:21
@politza
Copy link
Owner

politza commented Nov 2, 2017

I don't know what's causing this. Try to remove the ./configure file and try again.

@politza politza changed the title macos ./configure: syntax error near unexpected token `png,' Nov 2, 2017
@politza politza changed the title ./configure: syntax error near unexpected token `png,' configure: syntax error near unexpected token `png,' Nov 2, 2017
@Ambrevar
Copy link

I get a similar error on Void Linux:

Failed to recognize this system, trying to continue.
---------------------------
 Configuring and compiling 
---------------------------
autoreconf -i
configure.ac:15: installing './ar-lib'
configure.ac:11: installing './compile'
configure.ac:78: installing './config.guess'
configure.ac:78: installing './config.sub'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
Makefile.am: installing './depcomp'
./configure -q --bindir=/home/ambrevar/.cache/emacs/elpa/pdf-tools-20180109.1234/ && make -s
./configure: 4745: ./configure: Syntax error: word unexpected (expecting ")")
===========================
     Build failed.  ;o(    
===========================
Note: maybe try the '-d' option.

Comint exited abnormally with code 1 at Sat Feb 10 22:34:31

@politza
Copy link
Owner

politza commented Feb 11, 2018 via email

@Ambrevar
Copy link

Ambrevar commented Feb 11, 2018 via email

@ambihelical
Copy link

ambihelical commented Mar 14, 2018

Sometimes this occurs when pkg-config is not installed, or there is some reason m4.pkg usually found in (system-dependent-path)/share/aclocal can't be found.

In my case (Ubuntu 14.04), there was a /usr/local/share/aclocal which I had installed which was competing with the system /usr/share/aclocal. After removing the former (and all the other related autotool stuff found in /usr/local), pdf-tools-install worked.

Based on discussion here: stlink-org/stlink#83

@Ambrevar
Copy link

@ambihelical: Thanks for this very helpful feedback!
Note: The file is named pkg.m4.

On Void Linux the issue is that there are two "aclocal" folders: /usr/share/aclocal and /usr/share/aclocal-1.15 (version number may vary over time).
I did the following:

sudo ln -s /usr/share/aclocal/pkg.m4 /usr/share/aclocal-1.15/

And it fixed the issue!

@politza politza closed this as completed Oct 19, 2018
@ashkan-leo
Copy link

Getting the same error @arademaker. Were you able to fix this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants