No make file after autogen.sh

788 views
Skip to first unread message

S Tan

unread,
May 8, 2014, 12:10:19 PM5/8/14
to link-g...@googlegroups.com
Running autogen.sh gets me this:

"../configure: line 17394: syntax error near unexpected token `2.0.0,'
../configure: line 17394: `AX_PKG_SWIG(2.0.0, SwigF=yes, SwigF=no)'
Now type 'make' to compile link-grammar."

I type make, but get "make: *** No targets specified and no makefile found.  Stop.". Installed swig2.0 but still no go. An older version 4.3.5 compiled fine but I found out it was too old so make uninstalled that.

Any ideas?

Linas Vepstas

unread,
May 8, 2014, 12:17:56 PM5/8/14
to link-grammar, S Tan
Hi,

You should not be trying to run autogen.sh.  Just run configure, that should work.  

Autogen.sh is a developer tool; it assumes that you have the entire automake/autoconf/autotools suite installed, and it would appear that you don't ... !?

Or is there some other bug you are trying to work around?

--linas


--
You received this message because you are subscribed to the Google Groups "link-grammar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to link-grammar...@googlegroups.com.
To post to this group, send email to link-g...@googlegroups.com.
Visit this group at http://groups.google.com/group/link-grammar.
For more options, visit https://groups.google.com/d/optout.

S Tan

unread,
May 9, 2014, 9:23:39 PM5/9/14
to link-g...@googlegroups.com, S Tan, linasv...@gmail.com
I don't know what happened but I went and downloaded the file again and this time, I was able to ./configure and install. Thanks. I guess my svn didn't work properly. It's working now.

Linas Vepstas

unread,
May 10, 2014, 7:23:56 AM5/10/14
to S Tan, link-grammar
Well, be aware that the code in svn can be, and sometimes is broken ... work gets started on something and doesn't get finished for a few days or weeks.   Its best to use one of the downloadeable tarballs for casual use.  (that said, I think the svn code has been OK for the last few days)

--linas

robotergarten

unread,
Jun 14, 2014, 6:42:32 PM6/14/14
to link-g...@googlegroups.com, simo...@gmail.com, linasv...@gmail.com
Hi, 

with the new version of the library in tar.gz zipped, this error also happens on execute 'configure' on a current opencog vagrant installation. In the config.log says that the problem are the hunspell dictionnaries.

After install them with 'sudo aptitude install hunspell hunspell-en-us', link-grammar compiles correctly.

Linas Vepstas

unread,
Jun 14, 2014, 6:47:15 PM6/14/14
to robotergarten, link-grammar, S Tan
Can you explain more? If the hunspell dicts aren't there, its supposed to just ignore them.  I guess they are not being ignored somehow?

--linas

robotergarten

unread,
Jun 17, 2014, 10:25:07 AM6/17/14
to link-g...@googlegroups.com, robote...@gmail.com, simo...@gmail.com, linasv...@gmail.com
Sorry I could not reproduce this error, after uninstall the hunspell dicts, and one more executed 'configure' with a new tar downloaded, the missing hunspell dicts are obviated. 
....
Python interfaces:              no
ASpell spell checker:           no
HunSpell spell checker:         no
HunSpell dictionary location:   
Generate 'fat' linkages:        no
 ....

make and make install are then successfully executed.

Thank you.

Left Right

unread,
Aug 19, 2014, 2:43:04 PM8/19/14
to link-g...@googlegroups.com
Hello, I'm seeing the same error, I've tried both to run autogen.sh and configure, below is the list of installed autotools software that I have as well as other general system info:

$ autoconf --version
autoconf
(GNU Autoconf) 2.69

$ automake
--version
automake
(GNU automake) 1.12.2

$ libtool
--version
libtool
(GNU libtool) 2.4.2

$ gettext
--version
gettext
(GNU gettext-runtime) 0.18.1

$ uname
-a
Linux wvxvw-laptop 3.10.6-100.fc18.x86_64 #1 SMP Mon Aug 12 15:51:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ gcc
--version
gcc
(GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)

svn info
Path: .
Working Copy Root Path: /home/wvxvw/Projects/link-grammar
URL
: http://svn.abisource.com/link-grammar/trunk
Repository Root: http://svn.abisource.com
Repository UUID: bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
Revision: 34704
Node Kind: directory
Schedule: normal
Last Changed Author: linas
Last Changed Rev: 34702
Last Changed Date: 2014-08-13 05:48:50 +0300 (Wed, 13 Aug 2014)



configure fails with exact same error as outlined in this thread. Additionally, when I tried to run autoconf or autoreconf, it complained about an absent macro AM_BINRELOC. I think you can say that I'm new to Autotools, so please try to take that into account if you consider replying.

The purpose I'm trying to build the parser is that I want to write Common Lisp bindings for it (the existing bindings is written for Allegro Common Lisp - a commercial product, which I don't have and am not planning to purchase soon). My limited understanding and reading the comments around the offending line suggests that this part is needed for binding for other languages, so, I guess I need that too, or do I? If, as it say, it is only needed for Perl and Python, can I ignore it?

Thanks,

Oleg

Linas Vepstas

unread,
Aug 19, 2014, 3:56:21 PM8/19/14
to link-grammar, olegs...@gmail.com
Hi, 

To avoid he errors that you are getting, it would be best if you used the latest formally released version downloaded from the website. Then you would not need to run autogen or use any of the autotools.  The problem with using the SVN version is that it can sometimes be broken; in fact, the current code in svn has several known minor tokenization bugs that haven't been fixed (I have the patches in my inbox but have been too busy to do anything).  So please use a release version. 

If you want to continue on with svn, you can try commenting out the offending lines; maybe the error will then go away. 

Yes, please do send new lisp bindings.  Those that are there almost surely make use of now-obsolete API calls.  You'll have to spot those.

I'm cc'ing you directly on this reply. Be sure to subscribe to the mailing list, else you may not see future replies.

--Linas


--

Left Right

unread,
Aug 19, 2014, 4:20:41 PM8/19/14
to linasv...@gmail.com, link-grammar
Thank you for quick response!

In fact, I found how to solve the missing AM_BINRELOC macro problem: I
had to run

$ aclocal --install -I ./ac-helpers/

And this will later tell autoconf where to look for additional macros.

If I comment the SWIG-related line, the Perl-related target isn't built:

make[2]: Entering directory `/home/wvxvw/Projects/link-grammar/bindings/perl'
perl5 -module clinkgrammar -I../../link-grammar -o
../../bindings/perl/lg_perl_wrap.cc ../swig/link_grammar.i
make[2]: perl5: Command not found
make[2]: [../../bindings/perl/lg_perl_wrap.cc] Error 127 (ignored)
make all-am
make[3]: Entering directory `/home/wvxvw/Projects/link-grammar/bindings/perl'
perl5 -module clinkgrammar -I../../link-grammar -o
../../bindings/perl/lg_perl_wrap.cc ../swig/link_grammar.i
make[3]: perl5: Command not found
make[3]: [../../bindings/perl/lg_perl_wrap.cc] Error 127 (ignored)
CXX clinkgrammar_la-lg_perl_wrap.lo
g++: error: ./../../bindings/perl/lg_perl_wrap.cc: No such file or directory
g++: fatal error: no input files
compilation terminated.
make[3]: *** [clinkgrammar_la-lg_perl_wrap.lo] Error 1
make[3]: Leaving directory `/home/wvxvw/Projects/link-grammar/bindings/perl'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/wvxvw/Projects/link-grammar/bindings/perl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wvxvw/Projects/link-grammar/bindings'
make: *** [all-recursive] Error 1

Where can I set the name of the Perl executable to try to build this
too? Perl I have installed is v5.16.3.

If I build with make -k, all other targets seem to build fine.

Best,

Oleg

Linas Vepstas

unread,
Aug 19, 2014, 5:14:01 PM8/19/14
to Left Right, link-grammar
beats me why its looking for perl5  ... that is odd. a bad hack would be to ln -s /usr/bin/perl /usr/bin/perl5  (assuming that /usr/bin/perl is where yours is).   Or just ignore the error, of the other targets built.

--linas

Left Right

unread,
Aug 19, 2014, 5:34:57 PM8/19/14
to linasv...@gmail.com, link-grammar
I think I can guess why it's perl5:

all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am

$(BUILT_SOURCES): $(SWIG_SOURCES)
$(SWIG) -perl5 -module clinkgrammar -I$(top_srcdir)/link-grammar -o $@ $<

all has as its precondition the BUILT_SOURCES target, which will
execute $(SWIG), which is probably an empty string. Since Make
wouldn't know what to do with -perl5 as the name of the program, it
removes the leading hyphen... Which means that I need SWIG, whatever
that is... Any hints about that? I have it installed with yum, but I
don't even know what it is :)

PS. The stable version I downloaded from the site builds and installs fine.

Linas Vepstas

unread,
Aug 19, 2014, 6:01:03 PM8/19/14
to Left Right, link-grammar
Swig is an automatic FFI binding generator.  I believe it can also create bindings for lisp, and not just perl/python.    You'd say something like "swig -lisp" or maybe "swig -clos -module clinkgrammar ...etc"    It looks in two places to create the FFI library: a likgrammar.i (interface) file which lists all of teh C functions that should be exported, and then it looks at the usual *.h files to figure out how to actually invoke these functions. The result is a binding that closely mirrors the C API.  To get a nicer, more natural lisp interface, you'd then need to write some syntactic sugar to get it the way you want it.

swig does scheme too.  I should mess around with that too, I guess, someday.

Peter Szolovits

unread,
Aug 20, 2014, 1:02:28 AM8/20/14
to link-g...@googlegroups.com, Left Right
This is old news, but when I tried playing with swig some years ago, its Lisp bindings were non-functional. I wound up building a set by hand. --Pete

Left Right

unread,
Aug 20, 2014, 3:04:21 PM8/20/14
to link-g...@googlegroups.com
SWIG = /usr/bin/swig
SWIG_LIB = /usr/share/swig/2.0.8

Simply adding the above to the Makefile in ./bindings/perl solved the problem for me. Now the project compiles from trunk too. I spent some time on the diff from two configure files and copied the expanded SWIG macro from the stable release version into the version from trunk and this made new configure work too. Additionally, I found a place which tests for SwigFound variable, but it should be testing for SWIGfound, but I couldn't find the source which generated this code. It is on line 17392 in the released version of configure file.

My guess would be that the macro AX_PKG_SWIG needs to be added to the locally available Automake macros, but it's probably not committed / I couldn't find it.

I've yet to try to generate Lisp bindings with it.

Left Right

unread,
Aug 20, 2014, 3:33:32 PM8/20/14
to link-g...@googlegroups.com
Re' SWIG generated bindings: I've tried generating CFFI binding and it, at least loads in SBCL. I've not tested further, but this seems like a good start. The file itself looks okay, though might need some polishing. What bothers me is that it looks too small compared to the header file: it's only about 300 lines long (the header is about twice as long). Should I need more SWIG interfaces?

swig -cffi -module clinkgrammar -I../../link-grammar -o ./test-cffi.lisp ../swig/link_grammar.i

This is how I generated it.

Best,

Oleg

Linas Vepstas

unread,
Aug 22, 2014, 8:30:07 PM8/22/14
to link-grammar
Almost half of the the current header file declares various obsolete API bindings; they're there for backwards compat, but are omitted from the SWIG FFI definition file. So sizewise, that should be OK.

--linas  


--
Reply all
Reply to author
Forward
0 new messages