[CWB] Re: [ cwb-Bugs-3066695 ] CWB::CL: too few arguments tofunction cl_string_canonical

Stefan Evert stefanML at collocations.de
Tue Sep 28 09:52:44 CEST 2010


Dear Jan,

thanks for the report.  As Andrew pointed out, the Perl modules are only compatible with CWB v3.0 at the moment and will be partially rewritten for v3.2+, hopefully soon.

The linking problem is actually a bug in "cwb-config --ldflags", which should provide all flags needed to link against the CL library.  I've changed "instutils/Makefile" to use the same flags as in utils/Makefile.

@Andrew: this is only a temporary fix and not ideal. At the moment, the GLib flags are given as `pkg-config --libs glib-2.0`, so it does a new lookup with pkg-config when the Perl module (or any other program using the CL library) is compiled.  There's a (relatively small, I admit) chance that a user running this will pick up a different pkg-config than the admin who installed the CWB; so it would be better to do the lookup once at CWB compile time and then just use the returned flags (in other words, force immediate evaluation of "CFLAGS += `pkg-config --cflags glib-2.0`" in definitions.mk).  If we want to provide binary packages at a later time (which will have to include PCRE and Glib headers and binaries), we need to change cwb-config accordingly, so they use paths that are adjusted at installation time -- plus, it's probably no longer a good idea to install into /usr/local/bin/.

Best wishes,
Stefan


On 22 Sep 2010, at 13:43, Hardie, Andrew wrote:

> All the Perl modules are still targeted at v3.0 for which PCRE and Glib
> aren't needed - so yes, to build them with the 3.2+  version of the CL
> you'll need a hack like this.
> 
> When we actually update the Perl modules we'll probably use pkg-config
> or the like to get these settings (it's probably pkg-config or something
> similar that is called within $config_util anyway).
> 
> Andrew.
> 
>> -----Original Message-----
>> From: cwb-bounces at sslmit.unibo.it 
>> [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Jan Jona Javorsek
>> Sent: 22 September 2010 11:52
>> To: cwb at sslmit.unibo.it
>> Subject: [CWB] Re: [ cwb-Bugs-3066695 ] CWB::CL: too few 
>> arguments tofunction cl_string_canonical
>> 
>> This particular problem stems from not including all the 
>> necessary libraries. Sadly, CWB::CL Makefile.PL has not been 
>> updated, and the cwb-config does not tell it all that is 
>> needed, but this worked for me:
>> 
>> Replace
>> 
>>  my $LD_FLAGS = `'$config_util' -I`
>> 
>> with
>> 
>>  my $LD_FLAGS = `'$config_util' -I`. ' -lpcre -lglib-2.0'
>> 
>> and do
>> 
>>  make clean; perl Makefile.pl; make; make test
> 



More information about the CWB mailing list