[CWB] [PATCH] Fix CWB-CL Makefile

Hardie, Andrew a.hardie at lancaster.ac.uk
Wed Jan 5 19:38:27 CET 2011


Possibly so for -L, but man gcc gives 
-llibrary
-l library
as equivalent.

Anyway, the inadequacies of MakeMaker aside, I don't think there is any way around this. cwb-config just spits out the value of $LDFLAGS as it is defined by the makefile system. So it can't be changed without changing the use of pkg-config in every gcc call in all the makefiles. So the workaround in CWB-Perl's Makefile.PL might actually be the best overall solution.

best

Andrew.

-----Original Message-----
From: Alberto Simões [mailto:ambs at di.uminho.pt] 
Sent: 05 January 2011 18:06
To: Hardie, Andrew
Cc: Open source development of the Corpus WorkBench
Subject: Re: [CWB] [PATCH] Fix CWB-CL Makefile

Hello

On 05/01/2011 18:02, Hardie, Andrew wrote:
> I know absolutely nothing about MakeMaker, but splitting spaces in a line of linker flags can't be right. What if it had been -L  /some/directory -l  cl   -l  pcre ?

Note that C forces you to use -l followed by the library without a 
space, and same with -L. Therefore, that problem does not exist.

-lfoo -L/bar will be always splited correctly.

Why it needs to do so, no idea. But easier to fix here than complaining 
above :)

Cheers

>
> Andrew.
>
> -----Original Message-----
> From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Alberto Simões
> Sent: 05 January 2011 17:22
> To: Open source development of the Corpus WorkBench
> Subject: [CWB] [PATCH] Fix CWB-CL Makefile
>
> Hello
>
> Makefile.PL on CWB-CL fails when cwb-config returns the glib-config command:
>
> [ambs at search CWB-CL]$ cwb-config -L
> -L/share/apps/amalandro/lib -lcl -lm -lpcre `pkg-config --libs glib-2.0`
>
> because ExtUtils::MakeMaker tries to split that string by spaces, and
> gets messy.
>
> This patch fixes it into the Makefile.PL code.
>
> I do *not* think this is the correct fix (the fix should be done in CWB
> itself making it to print a clear line with cwb-config) but this makes
> CWB-CL to work with current SVN CWB version.
>
> Therefore, My suggestion is: apply this patch, and remove it (it is just
> a line) when CWB gets fixed :)
>
> Cheers
> Alberto

-- 
Alberto Simões


More information about the CWB mailing list