All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] flex: not to build shared libraries
@ 2014-03-05  9:18 Chong Lu
  2014-03-05  9:18 ` [PATCH 1/1] " Chong Lu
  0 siblings, 1 reply; 9+ messages in thread
From: Chong Lu @ 2014-03-05  9:18 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit f03955041d0e44d377ca1c4def630982f24f1e8b:

  Revert "ncurses: use ln -r to generate relative symlink" (2014-03-03 15:55:27 +0000)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib chonglu/flex
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=chonglu/flex

Chong Lu (1):
  flex: not to build shared libraries

 .../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

-- 
1.8.1.2



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/1] flex: not to build shared libraries
  2014-03-05  9:18 [PATCH 0/1] flex: not to build shared libraries Chong Lu
@ 2014-03-05  9:18 ` Chong Lu
  2014-03-05  9:21   ` Richard Purdie
  2014-03-05  9:43   ` Burton, Ross
  0 siblings, 2 replies; 9+ messages in thread
From: Chong Lu @ 2014-03-05  9:18 UTC (permalink / raw)
  To: openembedded-core

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@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

diff --git a/meta/recipes-devtools/flex/files/flex-not-to-build-shared-libraries.patch b/meta/recipes-devtools/flex/files/flex-not-to-build-shared-libraries.patch
new file mode 100644
index 0000000..a50569f
--- /dev/null
+++ b/meta/recipes-devtools/flex/files/flex-not-to-build-shared-libraries.patch
@@ -0,0 +1,39 @@
+flex: not to build shared libraries
+
+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.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ Makefile.am |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 1f90356..f3638aa 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -73,13 +73,13 @@ libfl_la_SOURCES = \
+ 	libmain.c \
+ 	libyywrap.c
+ 
+-libfl_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
++libfl_la_LDFLAGS = -all-static -no-undefined -version-info @SHARED_VERSION_INFO@
+ 
+ libfl_pic_la_SOURCES = \
+ 	libmain.c \
+ 	libyywrap.c
+ 
+-libfl_pic_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
++libfl_pic_la_LDFLAGS = -all-static -no-undefined -version-info @SHARED_VERSION_INFO@
+ 
+ noinst_HEADERS = \
+ 	flexdef.h \
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-devtools/flex/flex.inc b/meta/recipes-devtools/flex/flex.inc
index 75c10ef..616f4d7 100644
--- a/meta/recipes-devtools/flex/flex.inc
+++ b/meta/recipes-devtools/flex/flex.inc
@@ -7,6 +7,7 @@ SECTION = "devel"
 LICENSE = "BSD"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
+           file://flex-not-to-build-shared-libraries.patch \
            file://run-ptest \
 "
 
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] flex: not to build shared libraries
  2014-03-05  9:18 ` [PATCH 1/1] " Chong Lu
@ 2014-03-05  9:21   ` Richard Purdie
  2014-03-05  9:58     ` Lu Chong
  2014-03-05  9:43   ` Burton, Ross
  1 sibling, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2014-03-05  9:21 UTC (permalink / raw)
  To: Chong Lu; +Cc: openembedded-core

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@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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] flex: not to build shared libraries
  2014-03-05  9:18 ` [PATCH 1/1] " Chong Lu
  2014-03-05  9:21   ` Richard Purdie
@ 2014-03-05  9:43   ` Burton, Ross
  1 sibling, 0 replies; 9+ messages in thread
From: Burton, Ross @ 2014-03-05  9:43 UTC (permalink / raw)
  To: Chong Lu; +Cc: OE-core

On 5 March 2014 09:18, Chong Lu <Chong.Lu@windriver.com> 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'

Isn't that generally because the makefile is doing it wrong, for
example linking the lexer in C++ mode instead of C?

Remove a shared library and forcing everyone to static link doesn't
seem like a long-term solution to me.

Ross


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] flex: not to build shared libraries
  2014-03-05  9:21   ` Richard Purdie
@ 2014-03-05  9:58     ` Lu Chong
  2014-03-05 11:37       ` Burton, Ross
  2014-03-05 12:49       ` Paul Barker
  0 siblings, 2 replies; 9+ messages in thread
From: Lu Chong @ 2014-03-05  9:58 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1940 bytes --]


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@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


[-- Attachment #2: Type: text/html, Size: 2969 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] flex: not to build shared libraries
  2014-03-05  9:58     ` Lu Chong
@ 2014-03-05 11:37       ` Burton, Ross
  2014-03-05 12:49       ` Paul Barker
  1 sibling, 0 replies; 9+ messages in thread
From: Burton, Ross @ 2014-03-05 11:37 UTC (permalink / raw)
  To: Lu Chong; +Cc: OE-core

On 5 March 2014 09:58, Lu Chong <Chong.Lu@windriver.com> wrote:
> 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.

Same result apart from that there is no longer a shared libfl.so
anymore, so it's not the same.

Mageia's solution is cleaner as it only impacts ipsec-tools, but I'd
have thought it could be solved without having to revert using libtool
(as the error suggests its an as-needed ordering problem).

Ross


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] flex: not to build shared libraries
  2014-03-05  9:58     ` Lu Chong
  2014-03-05 11:37       ` Burton, Ross
@ 2014-03-05 12:49       ` Paul Barker
  2014-03-05 13:45         ` Paul Barker
  1 sibling, 1 reply; 9+ messages in thread
From: Paul Barker @ 2014-03-05 12:49 UTC (permalink / raw)
  To: Lu Chong; +Cc: openembedded-core

On 5 March 2014 09:58, Lu Chong <Chong.Lu@windriver.com> wrote:
>
> 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'.

I've used flex before, this is correct, libfl is not supposed to
define yylex. See for example
https://www.mail-archive.com/tools-linking@mail.opensolaris.org/msg00601.html

The problem is in how ipsec-tools is being linked, not in flex. I'd
suggest patching that recipe instead.

Cheers,

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] flex: not to build shared libraries
  2014-03-05 12:49       ` Paul Barker
@ 2014-03-05 13:45         ` Paul Barker
  2014-03-07  1:15           ` Paul Barker
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Barker @ 2014-03-05 13:45 UTC (permalink / raw)
  To: Lu Chong; +Cc: openembedded-core

On 5 March 2014 12:49, Paul Barker <paul@paulbarker.me.uk> wrote:
> On 5 March 2014 09:58, Lu Chong <Chong.Lu@windriver.com> wrote:
>>
>> 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'.
>
> I've used flex before, this is correct, libfl is not supposed to
> define yylex. See for example
> https://www.mail-archive.com/tools-linking@mail.opensolaris.org/msg00601.html
>
> The problem is in how ipsec-tools is being linked, not in flex. I'd
> suggest patching that recipe instead.
>
> Cheers,
>

I've patched ipsec-tools to fix this, will send the patch to the oe-devel list.

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/1] flex: not to build shared libraries
  2014-03-05 13:45         ` Paul Barker
@ 2014-03-07  1:15           ` Paul Barker
  0 siblings, 0 replies; 9+ messages in thread
From: Paul Barker @ 2014-03-07  1:15 UTC (permalink / raw)
  To: Lu Chong; +Cc: openembedded-core

On 5 March 2014 13:45, Paul Barker <paul@paulbarker.me.uk> wrote:
> On 5 March 2014 12:49, Paul Barker <paul@paulbarker.me.uk> wrote:
>> On 5 March 2014 09:58, Lu Chong <Chong.Lu@windriver.com> wrote:
>>>
>>> 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'.
>>
>> I've used flex before, this is correct, libfl is not supposed to
>> define yylex. See for example
>> https://www.mail-archive.com/tools-linking@mail.opensolaris.org/msg00601.html
>>
>> The problem is in how ipsec-tools is being linked, not in flex. I'd
>> suggest patching that recipe instead.
>>
>> Cheers,
>>
>
> I've patched ipsec-tools to fix this, will send the patch to the oe-devel list.
>

Sent.

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-03-07  1:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-05  9:18 [PATCH 0/1] flex: not to build shared libraries Chong Lu
2014-03-05  9:18 ` [PATCH 1/1] " Chong Lu
2014-03-05  9:21   ` Richard Purdie
2014-03-05  9:58     ` Lu Chong
2014-03-05 11:37       ` Burton, Ross
2014-03-05 12:49       ` Paul Barker
2014-03-05 13:45         ` Paul Barker
2014-03-07  1:15           ` Paul Barker
2014-03-05  9:43   ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.