[OE-core] [PATCH 1/1] flex: not to build shared libraries

Lu Chong Chong.Lu at windriver.com
Wed Mar 5 09:58:44 UTC 2014


On 03/05/2014 05:21 PM, Richard Purdie wrote:
> On Wed, 2014-03-05 at 17:18 +0800, Chong Lu wrote:
>> Some packages do not link successfully using shared libraries.
>> When link something to libfl.so, we will get this:
>>
>> 	libfl.so: undefined reference to `yylex'
>>
>> So we only build static libraries to fix this issue.
>>
>> Signed-off-by: Chong Lu <Chong.Lu at windriver.com>
>> ---
>>   .../files/flex-not-to-build-shared-libraries.patch | 39 ++++++++++++++++++++++
>>   meta/recipes-devtools/flex/flex.inc                |  1 +
>>   2 files changed, 40 insertions(+)
>>   create mode 100644 meta/recipes-devtools/flex/files/flex-not-to-build-shared-libraries.patch
> Why aren't the shared libraries working? Which packages show this
> problem? Is this not a problem in the recipes using the shared
> libraries?
>
> At the very least this patch needs more explanation but I don't like the
> idea.
>
> Cheers,
>
> Richard
>
>
>
In flex 2.5.38, libfl.so was built by libtool.

ipsec-tools shows this problem.
When link libipsec.so to libfl.so, it uses '-lfl' flag. It will link 
from libfl.so.
But libfl.so doesn't define yylex, we may get "libfl.so not found" 
through `ldd libipsec.so'.
If we only build static libraries, libipsec.so will not link to 
libfl.so. it will link to libfl.a.
Then libipsec.so uses yylex function by itself rather than libfl.so 
provided.

In Mageia distribution, revert building libraries with libtool.
http://www.rpmfind.net//linux/RPM/mageia/cauldron/x86_64/media/core/release/flex-2.5.38-1.mga5.x86_64.html
And in flex 2.5.37 version, it will only generate static libraries.
So in order to ignore blocking some packages(likes ipsec-tools), I have 
two ways to fix this issue.
1. revert building libraries with libtool.
2. modify libtool to make it only build static libraries.
I choose the second way. The same result to first.

Best Regards
Chong

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20140305/adeedc0b/attachment-0002.html>


More information about the Openembedded-core mailing list