Pkg_check_modules Syntax Error Near
Contents |
Sign in Pricing Blog Support Search GitHub This repository Watch 14 Star 91 Fork 40 vcftools/vcftools Code Issues 16 Pull requests 4 Projects 0 Pulse configure syntax error near unexpected token pkg_check_modules Graphs New issue configure error #16 Closed Griffan opened this Issue Aug
Pkg_check_modules Example
21, 2015 · 11 comments Projects None yet Labels None yet Milestone No milestone Assignees No pkg_check_modules not found one assigned 8 participants Griffan commented Aug 21, 2015 ./configure: line 4634: syntax error near unexpected token `ZLIB,' auton1 commented Aug 21, 2015 Can you be a bit more detailed syntax error near unexpected token `glib,' with regard to the issue? wookietreiber commented Aug 21, 2015 Did you generate this configure script? If so, which autoconf version do you have? Would you please paste the failing version of the generated configure script to some pastebin, gist or other service? Griffan commented Aug 21, 2015 I use git clone to download code, then use the autogen.sh, then use
Pkg_check_modules Cmake
configure --prefix=/my/install/dir. After a while, it stopped with this information prompted. autoconf (GNU Autoconf) 2.69 snap of the configure file: ... 4616 pmdir_relative_path=\
4617 $PERL -MConfig \
4618 -wle '($_ = $Config{installsitelib})
4619 =~ s!^\Q$Config{siteprefix}/!!; \
4620 print' 4621 4622 4623 # Check whether --with-pmdir was given. 4624 if test "${with_pmdir+set}" = set; then : 4625 withval=$with_pmdir; PMDIR=${withval} 4626 else 4627 PMDIR='${prefix}'/"$pmdir_relative_path" 4628 fi 4629 4630 4631 4632 4633 # Checks for libraries. 4634 PKG_CHECK_MODULES(ZLIB, zlib) 4635 4636 # Checks for header files. 4637 4638 4639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 4640 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } 4641 if ${ac_cv_path_GREP+:} false; then : 4642 $as_echo_n "(cached) " >&6 4643 else ... wookietreiber commented Aug 22, 2015 Ok, I see where the problem is: The pkg-config check has not been translated from your configure.ac to configure, it has just been copied. I suppose that is because you either don't have pkg-config installed or it is installed incorrectly so that autoconf can not translate that line of
Sign in Pricing Blog Support Search GitHub This repository Watch 119 Star 963 Fork 374 texane/stlink Code Issues 31 Pull requests 3 Projects 0 Wiki Pulse Graphs PKG_CHECK_MODULES USB unexpected token #83 Closed install pkg-config zansibar opened this Issue May 24, 2012 · 17 comments Projects None yet pkg_check_modules zlib zlib Labels os/mac-osx Milestone No milestone Assignees No one assigned 15 participants zansibar commented May 24, 2012 I installed
Pkg_prog_pkg_config
this a month ago on OSX and it went fine, I had to reinstall osx and now I am running into problems. ./configure: line 4781: syntax error near unexpected token USB,'
./configure: line 4781:PKG_CHECK_MODULES(USB, https://github.com/vcftools/vcftools/issues/16 libusb-1.0 >= 1.0.0,,' I already installed libusb: $ pkg-config --libs libusb -L/usr/local/lib -lusb $ pkg-config --libs libusb-1.0 -L/usr/local/lib -lusb-1.0 if I comment out the line 4781 from configure which causes the problem then it creates the make file but the makefile doesn't Include or link correctly. I can compile it by adding -lusb-1.0 to the gcc command (also added -I/usr/local/include/libusb to the makefile) gcc -g -O2 -o st-util gdbserver/st_util-gdb-remote.o https://github.com/texane/stlink/issues/83 gdbserver/st_util-gdb-server.o mingw/st_util-mingw.o libstlink.a -lusb-1.0 Any ideas why I don't have this USB token? What should it be? karlp commented May 25, 2012 can we remove autotools now? It's causing more problems. sasai commented May 29, 2012 It seems the same trouble I had on OSX using homebrew. In my case, it works well after adding a line "/usr/local/share/aclocal" in /usr/share/aclocal/dirlist file. See: http://stackoverflow.com/questions/3522248/how-do-i-compile-jzmq-for-zeromq-on-osx lestofante commented Jun 5, 2012 same problem here on Arch linux x86_64, gcc4.7 and autoconf 2.69... How can i solve? tomorrow i'll try fall back to autoconf 2.13. kevincook commented Jun 20, 2012 I'm having this issue today. I've read that this issue can occur when your pkg.m4 file isn't in some sane directory. It will cause the aclocal.m4 file to not contain the PKG_CHECK_MODULES macro. This is true for me. by modifying the autogen.sh file to execute aclocal --force -I /opt/local/share/aclocal after the autoreconf line, i find the PKG_CHECK_MODULES macro in the generated aclocal.m4 file. Unfortunate it does not resolve my issue. kevincook commented Jun 20, 2012 resolved my issue by adding: ACLOCAL_AMFLAGS = -I /opt/local/share/aclocal to Makefile.am mkv123 commented Aug 24, 2012 I can confirm that adding ACLOCAL_AMFLAGS = -I /opt/local/share/aclocal to Makefile.am made ./configure run successfully on osx
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://stackoverflow.com/questions/22972633/autoconf-without-glib-breaks-with-syntax-error-on-configure workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions https://coffeecode.net/archives/208-PKG_CHECK_MODULES-syntax-error-near-unexpected-token-DEPS,.html Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. syntax error Join them; it only takes a minute: Sign up Autoconf without GLib breaks with syntax error on configure up vote 2 down vote favorite If I don't have pkg-config installed nor glib my configure breaks with a syntax error when running ./configure. Is there a way to break with AC_MSG_ERROR? ./configure: line 4001: syntax error near unexpected token `GLIB2,' syntax error near ./configure: line 4001: ` PKG_CHECK_MODULES(GLIB2, glib-2.0, , as_fn_error $? "glib needed" "$LINENO" 5)' -- AC_ARG_ENABLE(GTK, [], [gtk="$enabled"], gtk=no) if test "$gtk" = "yes"; then AC_CHECK_LIB([gtk-x11-2.0], [gtk_init], [], [AC_MSG_ERROR([gtk needed])]) else AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes) if test x"$HAVE_PKG_CONFIG" != x"yes" ; then AC_MSG_ERROR([pkg-config]) fi PKG_CHECK_MODULES(GLIB2, glib-2.0, [], AC_MSG_ERROR([glib needed])) AC_SUBST(GLIB2_CFLAGS) AC_SUBST(GLIB2_LIBS) AC_CHECK_LIB([glib-2.0], [g_list_append], [], [AC_MSG_ERROR([glib needed])]) fi AM_CONDITIONAL([GTK], [test "x$gtk" = "xyes"]) glib autoconf share|improve this question asked Apr 9 '14 at 19:51 user1024718 169111 add a comment| 2 Answers 2 active oldest votes up vote 4 down vote The configure script was generated incorrectly, in absence of pkg.m4. For all non-basic macros that don't start with AC_* it's a good idea to distribute them with the source code for this reason, so you can at least get a correct configure script. That said, pkg-config is pretty ubiquitous nowadays, why are you generating a configure script from a system that doesn't have it? You could simply make dist from a "better" system, and build from the output tarball (that will contain a valid configure script). share
while wondering why your perfectly good PKG_CHECK_MODULES() macro, as cut and paste directly from the recommended configure.ac entry for the package you're trying to integrate (in this case libmemcached), and you get the error message PKG_CHECK_MODULES syntax error near unexpected token `DEPS,' on one system and not on another, it's probably because you're missing the pkg-config package on the failing system. It would be nice if the error message gave you a clue, but it doesn't and probably can't, because the macro simply doesn't exist until the package is installed. So I'm telling you. Go forth and code now that that irritation is gone. Posted by Dan Scott in Coding at 17:35 | Comments (2) Comments Display comments as (Linear | Threaded) Dude, you just saved me. I wish this was closer to the top of the list of Google results... #1 Lee Trout (Homepage) on 2011-11-29 01:31 (Reply) For those finding this thread (and I'll go ahead and +1 it up at google so perhaps a few more do): Old versions of pkg-config will also cause you grief as they may not contain the macro. To update: http://www.freedesktop.org/wiki/Software/pkg-config Installation is classic "./configure, make, sudo make install" #2 Tom Buttner on 2012-05-04 15:23 (Reply) Add Comment Name Email Homepage In reply to [ Top level ]#1: Lee Trout on 2011-11-29 01:31 #2: Tom Buttner on 2012-05-04 15:23 Comment Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.Standard emoticons like :-) and ;-) are converted to images.E-Mail addresses will not be displayed and will only be used for E-Mail notifications. Remember Information? Subscribe to this entry Quicksearch About Me I'm Dan Scott: barista, library geek, and free-as-in-freedom software developer. I hack on projects such as the Evergreen open-source ILS project and PEAR's File_MARC package . By day I'm the Systems Librarian for Laurentian University. You can reach me by email at dan@coffeecode.net. License This work is licensed under a Creative Commons Attribution-Share Alike 2.5 Canada License. Categories Android (4) Coffee (2) Databases Apache Derby (6) DB2 (6) MySQL (1) PostgreSQL (7) FSOSS (7) Libraries (12) Coding (104) Evergreen (99) Structured data (21) Personal (32) Amber (16) Arik (3) Poker (14) Programming languages (2) Java Perl (1) PHP (29) Python (4) Travel (1) All categories Firefox Beta for Android