link-grammar
link-grammar copied to clipboard
Perl installation ignores --prefix option
I'm trying to install link-grammar
into virtualenv
(This is a Python way of creating a kind of isolated environment.) While Java bindings seem to honor the --prefix
option, Perl tries to install into system-level directory. I don't really need Perl bindings, but I also couldn't find a way to disable them.
Here's how I've configured the project:
./configure --enable-python-bindings \
--prefix=$(readlink -f ../bin) \
--includedir=$(readlink -f ../includes)
The relevant output from running this is:
link-grammar-5.3.0 build configuration settings
prefix: /home/wvxvw/Projects/auntie-rem/bin
C compiler: gcc -DUSE_SAT_SOLVER=1 -DHAVE_SQLITE=1 -g -O2 -O3 -std=c99 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -D_DEFAULT_SOURCE
C++ compiler: g++ -DUSE_SAT_SOLVER=1 -DHAVE_SQLITE=1 -g -O2 -O3 -Wall -std=c++03
autopackage relocatable binary: no
Posix threads: no
Editline command-line history: no
UTF8 editline support: no
Java libraries: no
Java interfaces: yes
Swig interfaces generator: yes
Perl interfaces: yes
Perl install location: /usr/local/lib64/perl5
Python interfaces: yes
ASpell spell checker: no
HunSpell spell checker: no
HunSpell dictionary location:
Boolean SAT parser: yes
SQLite-backed dictionary: yes
Viterbi algorithm parser: no
Corpus statistics database: no
Anysplit word splitter:
RegEx tokenizer: no
When I run make install
it breaks on:
make[2]: Entering directory '/home/wvxvw/Projects/auntie-rem/link-grammar/bindings/perl'
make install-am
make[3]: Entering directory '/home/wvxvw/Projects/auntie-rem/link-grammar/bindings/perl'
make[4]: Entering directory '/home/wvxvw/Projects/auntie-rem/link-grammar/bindings/perl'
make[4]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/usr/local/lib64/perl5'
/usr/bin/install -c ../../bindings/perl/clinkgrammar.pm '/usr/local/lib64/perl5'
/usr/bin/install: cannot remove ‘/usr/local/lib64/perl5/clinkgrammar.pm’: Permission denied
Makefile:496: recipe for target 'install-dist_pkgperlSCRIPTS' failed
make[4]: *** [install-dist_pkgperlSCRIPTS] Error 1
make[4]: Leaving directory '/home/wvxvw/Projects/auntie-rem/link-grammar/bindings/perl'
Makefile:676: recipe for target 'install-am' failed
make[3]: *** [install-am] Error 2
make[3]: Leaving directory '/home/wvxvw/Projects/auntie-rem/link-grammar/bindings/perl'
Makefile:670: recipe for target 'install' failed
make[2]: *** [install] Error 2
make[2]: Leaving directory '/home/wvxvw/Projects/auntie-rem/link-grammar/bindings/perl'
Makefile:407: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/wvxvw/Projects/auntie-rem/link-grammar/bindings'
Makefile:531: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
I didn't investigate it deeply, but it somehow tries to remove a file from the default prefix and fails due to a permission problem (it needs superuser).
Try to install it from superuser, or use:
make -k install
@ampli Yes, but that's the problem exactly: the reason for prefix install is typically that you don't have a super-user permission, and you want to install it for your current user. I'm no Perl expert, but a bit of googling suggests that the typical way to achieve this in Perl would be by means of local::lib
module. But as is my case, I'd be happy if I could just avoid Perl bindings generation entirely.
I think --disable-perl-bindings
worked, once upon a time ... the configure mechanics is identical to the --enable
flags, but with the opposite default.
My workaround has been to use PERL_EXT_LIB=XXX/perl ./configure --prefix XXX
to put the perl libraries somewhere where I may.