[CWB] EncodeBNC can't locate CWB
Hardie, Andrew
a.hardie at lancaster.ac.uk
Thu Apr 4 02:56:44 CEST 2019
Hi Aleks,
OK first,
>>In fact, locate CWB.pm does not show that perl modules are in this new destination and returns an empty line.
New or newly-moved files aren’t findable via locate until the filesystem database updates. This usually happens overnight. If you are an admin, run sudo updatedb .
Second, it looks like you had not actually installed to begin with – so it is not a version change - rather – the presence of the blib directory in your downloaded code suggests you built the code but then did not install them. In this case, moving the modules does NOT solve the problem. (The move is from an install dir to an install dir, moving from a pre-install location direct to the install location is NOT recommended)./
Please start over again. Read the README, and run
perl Makefile.PL
make
make test
make install
as per instructions. Last command needs sudo’er power, if you don’t have that, then you need to change the installation prefix to somewhere you can install to. (prob in your ~ ) Then you’d need to use either the -I flag or the PERL5LIB environment var to tell Perl which directories to look in.
best
Andrew.
From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of Aleksandar Trklja
Sent: 03 April 2019 20:15
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it>
Subject: Re: [CWB] EncodeBNC can't locate CWB
Hi Andrew,
Many thanks for your suggestions!
Yes, the problem was that CWB modules were installed not even in a perl path but on one of my local folders on the server - it's a university server.
locate CWB.pm returned the following two paths:
home/blak/CWB-2.2.102/blib/lib/CWB.pm
home/blak/CWB-2.2.102/lib/CWB.pm
I've tried the option of moving the files to one of the folders on my @INC listed in the error message. I selected the folders blib and lib and moved them to /usr/lib/x86_64-linux-gnu/perl/5.26/ Was this a mistake?
I've checked whether the content of the folders was properly moved and it was:
trklja at trklja:/usr/lib/x86_64-linux-gnu/perl/5.26/lib$<mailto:trklja at trklja:/usr/lib/x86_64-linux-gnu/perl/5.26/lib$> ls
CWB CWB.pm
trklja at trklja:/usr/lib/x86_64-linux-gnu/perl/5.26/blib$<mailto:trklja at trklja:/usr/lib/x86_64-linux-gnu/perl/5.26/blib$> ls
arch bin lib man1 man3 script
But, EncodeBNC.perl still can't locate CWB.pm in @INC. In fact, locate CWB.pm does not show that perl modules are in this new destination and returns an empty line.
Now, it might be that I didn't move all the relevant files, that I moved the wrong ones or that I've chosen a wrong destination. My question: what exactly should I move? Many thanks.
If this doesn't work I'll try with a new installation.
Best
Aleks
Am 03.04.2019 16:37, schrieb Hardie, Andrew:
Hi Aleks,
CQP -V will tell you where the binaries are for the CWB core.
Perl modules are different matter, the easiest way to find out is to
run
LOCATE CWB.PM
and compare the address of the folder where it lives to the list of
folders I’ve highlighted in yellow below : the @INC list is the list
of where Perl looks for .pm files.
One common reason for this to happen is Perl versioning. The CWB
modules are often installed into a folder whose path contains a
version number, e.g. /USR/LOCAL/SHARE/PERL/5.20.2/ – if a new
version of perl is then installed, it will no longer look in that
folder, but instead at, for instance, /USR/LOCAL/SHARE/PERL/5.26.1/
(one of the folders on your @INC)
If this has actually happened, there are two solutions. (1) rebuild
and reinstall CWB-Perl. (2) OR, just manually move everything in the
old-version folder to the equivalent new-version folder. I do the
latter. That’s probably bad practice, but I don’t use Perl for
anything else, so it doesn’t really matter.
If it’s _not_ a version issue, then it’s an installation issue –
CWB-Perl has been installed to some folder somewhere, but not one of
the places that perl looks for modules. The solution then is either
(a) to reinstall while making sure that you’ve configured it to go
into one of the places Perl looks (See the README/INSTALL file for
how) or (b) to change Perl’s @INC to add in the folder you want it
to look in by using -I /PATH/TO/FOLDER on the command line [1<https://perldoc.perl.org/perlrun.html>].
best
Andrew.
FROM: cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> <cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it>> ON
BEHALF OF Aleksandar Trklja
SENT: 03 April 2019 13:43
TO: cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>
SUBJECT: [CWB] EncodeBNC can't locate CWB
Dear all,
I've been trying to encode the BNC with "EncodeBNC.perl" on a remote
server and although CWB has been installed and works properly the
following error message returns when I run 'PERL ENCODEBNC.PERL -F
/HOME/TMO/ /HOME/TMP'
CAN'T LOCATE CWB.PM IN @INC (YOU MAY NEED TO INSTALL THE CWB MODULE)
(@INC CONTAINS: LIB /ETC/PERL
/USR/LOCAL/LIB/X86_64-LINUX-GNU/PERL/5.26.1
/USR/LOCAL/SHARE/PERL/5.26.1 /USR/LIB/X86_64-LINUX-GNU/PERL5/5.26
/USR/SHARE/PERL5 /USR/LIB/X86_64-LINUX-GNU/PERL/5.26
/USR/SHARE/PERL/5.26 /USR/LOCAL/LIB/SITE_PERL
/USR/LIB/X86_64-LINUX-GNU/PERL-BASE) AT LIB/BNC/META.PM LINE 62.
BEGIN FAILED--COMPILATION ABORTED AT LIB/BNC/META.PM LINE 62.
COMPILATION FAILED IN REQUIRE AT LIB/BNC/DOC.PM LINE 6.
BEGIN FAILED--COMPILATION ABORTED AT LIB/BNC/DOC.PM LINE 6.
COMPILATION FAILED IN REQUIRE AT ENCODEBNC.PERL LINE 14.
BEGIN FAILED--COMPILATION ABORTED AT ENCODEBNC.PERL LINE 14
EncodeBNC can't locate CWB - that much I can understand (or I might be
wrong) but the rest is a mystery for me.
I can also confirm that the CWB/Perl interface and xsltproc have been
installed.
Btw, how can you check where exactly has CWB been installed?
Thanks.
Best wishes
Aleks
--
_Dr Aleksandar Trklja_
_Senior Lecturer_
_Department of Translation Studies_
_University of Vienna_
Links:
------
[1] https://perldoc.perl.org/perlrun.html
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb
--
Dr Aleksandar Trklja
Senior Lecturer
Department of Translation Studies
University of Vienna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20190404/530d3a6d/attachment-0001.html>
More information about the CWB
mailing list