All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] Built-in libxenomai dependency
@ 2012-02-01 14:37 Jan Kiszka
  2012-02-01 15:17 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Kiszka @ 2012-02-01 14:37 UTC (permalink / raw)
  To: xenomai-core

Hi,

don't remember anymore: Is there any subtle reason that prevent a
change like

diff --git a/src/skins/native/Makefile.am b/src/skins/native/Makefile.am
index 39eaaed..4cc8859 100644
--- a/src/skins/native/Makefile.am
+++ b/src/skins/native/Makefile.am
@@ -22,6 +22,9 @@ libnative_la_SOURCES = \
 	wrappers.c \
 	wrappers.h
 
+libnative_la_LIBADD = \
+	../common/libxenomai.la
+
 libnative_la_CPPFLAGS = \
 	@XENO_USER_CFLAGS@ \
 	-I$(top_srcdir)/include
diff --git a/src/skins/rtdm/Makefile.am b/src/skins/rtdm/Makefile.am
index 8ad74be..2dc0a90 100644
--- a/src/skins/rtdm/Makefile.am
+++ b/src/skins/rtdm/Makefile.am
@@ -8,6 +8,9 @@ librtdm_la_SOURCES = \
 	core.c \
 	init.c
 
+librtdm_la_LIBADD = \
+	../common/libxenomai.la
+
 librtdm_la_CPPFLAGS = \
 	@XENO_USER_CFLAGS@ \
 	-I$(top_srcdir)/include
diff --git a/src/testsuite/latency/Makefile.am b/src/testsuite/latency/Makefile.am
index c772c26..6534df5 100644
--- a/src/testsuite/latency/Makefile.am
+++ b/src/testsuite/latency/Makefile.am
@@ -14,5 +14,4 @@ latency_LDFLAGS = @XENO_USER_LDFLAGS@
 latency_LDADD = \
 	../../skins/native/libnative.la \
 	../../skins/rtdm/librtdm.la \
-	../../skins/common/libxenomai.la \
 	-lpthread -lm

i.e. that we let the skin libraries depend on libxenomai and then remove
the explicit dependency from our binaries and the xeno-config output?
Is there some ordering issue again (we have -l<skin> before -lxenomai
in the ldflags).

If possible, this would allow for things like dlopen("libnative.so").

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux


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

* Re: [Xenomai-core] Built-in libxenomai dependency
  2012-02-01 14:37 [Xenomai-core] Built-in libxenomai dependency Jan Kiszka
@ 2012-02-01 15:17 ` Gilles Chanteperdrix
  2012-02-01 15:25   ` Jan Kiszka
  0 siblings, 1 reply; 11+ messages in thread
From: Gilles Chanteperdrix @ 2012-02-01 15:17 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

On 02/01/2012 03:37 PM, Jan Kiszka wrote:
> Hi,
> 
> don't remember anymore: Is there any subtle reason that prevent a
> change like
> 
> diff --git a/src/skins/native/Makefile.am b/src/skins/native/Makefile.am
> index 39eaaed..4cc8859 100644
> --- a/src/skins/native/Makefile.am
> +++ b/src/skins/native/Makefile.am
> @@ -22,6 +22,9 @@ libnative_la_SOURCES = \
>  	wrappers.c \
>  	wrappers.h
>  
> +libnative_la_LIBADD = \
> +	../common/libxenomai.la
> +
>  libnative_la_CPPFLAGS = \
>  	@XENO_USER_CFLAGS@ \
>  	-I$(top_srcdir)/include
> diff --git a/src/skins/rtdm/Makefile.am b/src/skins/rtdm/Makefile.am
> index 8ad74be..2dc0a90 100644
> --- a/src/skins/rtdm/Makefile.am
> +++ b/src/skins/rtdm/Makefile.am
> @@ -8,6 +8,9 @@ librtdm_la_SOURCES = \
>  	core.c \
>  	init.c
>  
> +librtdm_la_LIBADD = \
> +	../common/libxenomai.la
> +
>  librtdm_la_CPPFLAGS = \
>  	@XENO_USER_CFLAGS@ \
>  	-I$(top_srcdir)/include
> diff --git a/src/testsuite/latency/Makefile.am b/src/testsuite/latency/Makefile.am
> index c772c26..6534df5 100644
> --- a/src/testsuite/latency/Makefile.am
> +++ b/src/testsuite/latency/Makefile.am
> @@ -14,5 +14,4 @@ latency_LDFLAGS = @XENO_USER_LDFLAGS@
>  latency_LDADD = \
>  	../../skins/native/libnative.la \
>  	../../skins/rtdm/librtdm.la \
> -	../../skins/common/libxenomai.la \
>  	-lpthread -lm
> 
> i.e. that we let the skin libraries depend on libxenomai and then remove
> the explicit dependency from our binaries and the xeno-config output?
> Is there some ordering issue again (we have -l<skin> before -lxenomai
> in the ldflags).
> 
> If possible, this would allow for things like dlopen("libnative.so").

It allows xeno-config result to work both with dynamic and static
libraries. Static libraries have no dependency system, so, when linking
a program whith libnative.a for instance, without libtool, you still
have to link it with libxenomai.a.

How come you can not dlopen libnative.so, dlopening libxenomai.so before
does not work?

-- 
					    Gilles.


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

* Re: [Xenomai-core] Built-in libxenomai dependency
  2012-02-01 15:17 ` Gilles Chanteperdrix
@ 2012-02-01 15:25   ` Jan Kiszka
  2012-02-01 15:38     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Kiszka @ 2012-02-01 15:25 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai-core

On 2012-02-01 16:17, Gilles Chanteperdrix wrote:
> On 02/01/2012 03:37 PM, Jan Kiszka wrote:
>> Hi,
>>
>> don't remember anymore: Is there any subtle reason that prevent a
>> change like
>>
>> diff --git a/src/skins/native/Makefile.am b/src/skins/native/Makefile.am
>> index 39eaaed..4cc8859 100644
>> --- a/src/skins/native/Makefile.am
>> +++ b/src/skins/native/Makefile.am
>> @@ -22,6 +22,9 @@ libnative_la_SOURCES = \
>>  	wrappers.c \
>>  	wrappers.h
>>  
>> +libnative_la_LIBADD = \
>> +	../common/libxenomai.la
>> +
>>  libnative_la_CPPFLAGS = \
>>  	@XENO_USER_CFLAGS@ \
>>  	-I$(top_srcdir)/include
>> diff --git a/src/skins/rtdm/Makefile.am b/src/skins/rtdm/Makefile.am
>> index 8ad74be..2dc0a90 100644
>> --- a/src/skins/rtdm/Makefile.am
>> +++ b/src/skins/rtdm/Makefile.am
>> @@ -8,6 +8,9 @@ librtdm_la_SOURCES = \
>>  	core.c \
>>  	init.c
>>  
>> +librtdm_la_LIBADD = \
>> +	../common/libxenomai.la
>> +
>>  librtdm_la_CPPFLAGS = \
>>  	@XENO_USER_CFLAGS@ \
>>  	-I$(top_srcdir)/include
>> diff --git a/src/testsuite/latency/Makefile.am b/src/testsuite/latency/Makefile.am
>> index c772c26..6534df5 100644
>> --- a/src/testsuite/latency/Makefile.am
>> +++ b/src/testsuite/latency/Makefile.am
>> @@ -14,5 +14,4 @@ latency_LDFLAGS = @XENO_USER_LDFLAGS@
>>  latency_LDADD = \
>>  	../../skins/native/libnative.la \
>>  	../../skins/rtdm/librtdm.la \
>> -	../../skins/common/libxenomai.la \
>>  	-lpthread -lm
>>
>> i.e. that we let the skin libraries depend on libxenomai and then remove
>> the explicit dependency from our binaries and the xeno-config output?
>> Is there some ordering issue again (we have -l<skin> before -lxenomai
>> in the ldflags).
>>
>> If possible, this would allow for things like dlopen("libnative.so").
> 
> It allows xeno-config result to work both with dynamic and static
> libraries. Static libraries have no dependency system, so, when linking
> a program whith libnative.a for instance, without libtool, you still
> have to link it with libxenomai.a.

OK, part two could stay, but the dependencies should still be added to
the skin libs - if possible.

> 
> How come you can not dlopen libnative.so, dlopening libxenomai.so before
> does not work?

Dependencies of libnative on libxenomai are not resolved when you open
the former even if the latter is already loaded. Maybe you can do this
by pulling in all required symbols one by one manually, haven't tried
yet. But that would at least be unhandy.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux


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

* Re: [Xenomai-core] Built-in libxenomai dependency
  2012-02-01 15:25   ` Jan Kiszka
@ 2012-02-01 15:38     ` Gilles Chanteperdrix
  2012-02-01 15:50       ` Jan Kiszka
  0 siblings, 1 reply; 11+ messages in thread
From: Gilles Chanteperdrix @ 2012-02-01 15:38 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

On 02/01/2012 04:25 PM, Jan Kiszka wrote:
> On 2012-02-01 16:17, Gilles Chanteperdrix wrote:
>> On 02/01/2012 03:37 PM, Jan Kiszka wrote:
>>> Hi,
>>>
>>> don't remember anymore: Is there any subtle reason that prevent a
>>> change like
>>>
>>> diff --git a/src/skins/native/Makefile.am b/src/skins/native/Makefile.am
>>> index 39eaaed..4cc8859 100644
>>> --- a/src/skins/native/Makefile.am
>>> +++ b/src/skins/native/Makefile.am
>>> @@ -22,6 +22,9 @@ libnative_la_SOURCES = \
>>>  	wrappers.c \
>>>  	wrappers.h
>>>  
>>> +libnative_la_LIBADD = \
>>> +	../common/libxenomai.la
>>> +
>>>  libnative_la_CPPFLAGS = \
>>>  	@XENO_USER_CFLAGS@ \
>>>  	-I$(top_srcdir)/include
>>> diff --git a/src/skins/rtdm/Makefile.am b/src/skins/rtdm/Makefile.am
>>> index 8ad74be..2dc0a90 100644
>>> --- a/src/skins/rtdm/Makefile.am
>>> +++ b/src/skins/rtdm/Makefile.am
>>> @@ -8,6 +8,9 @@ librtdm_la_SOURCES = \
>>>  	core.c \
>>>  	init.c
>>>  
>>> +librtdm_la_LIBADD = \
>>> +	../common/libxenomai.la
>>> +
>>>  librtdm_la_CPPFLAGS = \
>>>  	@XENO_USER_CFLAGS@ \
>>>  	-I$(top_srcdir)/include
>>> diff --git a/src/testsuite/latency/Makefile.am b/src/testsuite/latency/Makefile.am
>>> index c772c26..6534df5 100644
>>> --- a/src/testsuite/latency/Makefile.am
>>> +++ b/src/testsuite/latency/Makefile.am
>>> @@ -14,5 +14,4 @@ latency_LDFLAGS = @XENO_USER_LDFLAGS@
>>>  latency_LDADD = \
>>>  	../../skins/native/libnative.la \
>>>  	../../skins/rtdm/librtdm.la \
>>> -	../../skins/common/libxenomai.la \
>>>  	-lpthread -lm
>>>
>>> i.e. that we let the skin libraries depend on libxenomai and then remove
>>> the explicit dependency from our binaries and the xeno-config output?
>>> Is there some ordering issue again (we have -l<skin> before -lxenomai
>>> in the ldflags).
>>>
>>> If possible, this would allow for things like dlopen("libnative.so").
>>
>> It allows xeno-config result to work both with dynamic and static
>> libraries. Static libraries have no dependency system, so, when linking
>> a program whith libnative.a for instance, without libtool, you still
>> have to link it with libxenomai.a.
> 
> OK, part two could stay, but the dependencies should still be added to
> the skin libs - if possible.
> 
>>
>> How come you can not dlopen libnative.so, dlopening libxenomai.so before
>> does not work?
> 
> Dependencies of libnative on libxenomai are not resolved when you open
> the former even if the latter is already loaded. Maybe you can do this
> by pulling in all required symbols one by one manually, haven't tried
> yet. But that would at least be unhandy.

What about RTLD_GLOBAL ?

-- 
					    Gilles.


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

* Re: [Xenomai-core] Built-in libxenomai dependency
  2012-02-01 15:38     ` Gilles Chanteperdrix
@ 2012-02-01 15:50       ` Jan Kiszka
  2012-02-01 20:21         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Kiszka @ 2012-02-01 15:50 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai-core

On 2012-02-01 16:38, Gilles Chanteperdrix wrote:
> On 02/01/2012 04:25 PM, Jan Kiszka wrote:
>> On 2012-02-01 16:17, Gilles Chanteperdrix wrote:
>>> On 02/01/2012 03:37 PM, Jan Kiszka wrote:
>>>> Hi,
>>>>
>>>> don't remember anymore: Is there any subtle reason that prevent a
>>>> change like
>>>>
>>>> diff --git a/src/skins/native/Makefile.am b/src/skins/native/Makefile.am
>>>> index 39eaaed..4cc8859 100644
>>>> --- a/src/skins/native/Makefile.am
>>>> +++ b/src/skins/native/Makefile.am
>>>> @@ -22,6 +22,9 @@ libnative_la_SOURCES = \
>>>>  	wrappers.c \
>>>>  	wrappers.h
>>>>  
>>>> +libnative_la_LIBADD = \
>>>> +	../common/libxenomai.la
>>>> +
>>>>  libnative_la_CPPFLAGS = \
>>>>  	@XENO_USER_CFLAGS@ \
>>>>  	-I$(top_srcdir)/include
>>>> diff --git a/src/skins/rtdm/Makefile.am b/src/skins/rtdm/Makefile.am
>>>> index 8ad74be..2dc0a90 100644
>>>> --- a/src/skins/rtdm/Makefile.am
>>>> +++ b/src/skins/rtdm/Makefile.am
>>>> @@ -8,6 +8,9 @@ librtdm_la_SOURCES = \
>>>>  	core.c \
>>>>  	init.c
>>>>  
>>>> +librtdm_la_LIBADD = \
>>>> +	../common/libxenomai.la
>>>> +
>>>>  librtdm_la_CPPFLAGS = \
>>>>  	@XENO_USER_CFLAGS@ \
>>>>  	-I$(top_srcdir)/include
>>>> diff --git a/src/testsuite/latency/Makefile.am b/src/testsuite/latency/Makefile.am
>>>> index c772c26..6534df5 100644
>>>> --- a/src/testsuite/latency/Makefile.am
>>>> +++ b/src/testsuite/latency/Makefile.am
>>>> @@ -14,5 +14,4 @@ latency_LDFLAGS = @XENO_USER_LDFLAGS@
>>>>  latency_LDADD = \
>>>>  	../../skins/native/libnative.la \
>>>>  	../../skins/rtdm/librtdm.la \
>>>> -	../../skins/common/libxenomai.la \
>>>>  	-lpthread -lm
>>>>
>>>> i.e. that we let the skin libraries depend on libxenomai and then remove
>>>> the explicit dependency from our binaries and the xeno-config output?
>>>> Is there some ordering issue again (we have -l<skin> before -lxenomai
>>>> in the ldflags).
>>>>
>>>> If possible, this would allow for things like dlopen("libnative.so").
>>>
>>> It allows xeno-config result to work both with dynamic and static
>>> libraries. Static libraries have no dependency system, so, when linking
>>> a program whith libnative.a for instance, without libtool, you still
>>> have to link it with libxenomai.a.
>>
>> OK, part two could stay, but the dependencies should still be added to
>> the skin libs - if possible.
>>
>>>
>>> How come you can not dlopen libnative.so, dlopening libxenomai.so before
>>> does not work?
>>
>> Dependencies of libnative on libxenomai are not resolved when you open
>> the former even if the latter is already loaded. Maybe you can do this
>> by pulling in all required symbols one by one manually, haven't tried
>> yet. But that would at least be unhandy.
> 
> What about RTLD_GLOBAL ?
> 

Was possibly the reason, need to check back.

Still, what prevents stating the existing dependency of lib<skin> on
libxenomai? The dance above would than be obsolete.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux


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

* Re: [Xenomai-core] Built-in libxenomai dependency
  2012-02-01 15:50       ` Jan Kiszka
@ 2012-02-01 20:21         ` Gilles Chanteperdrix
  2012-02-07 16:19           ` Gilles Chanteperdrix
  0 siblings, 1 reply; 11+ messages in thread
From: Gilles Chanteperdrix @ 2012-02-01 20:21 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

On 02/01/2012 04:50 PM, Jan Kiszka wrote:
> On 2012-02-01 16:38, Gilles Chanteperdrix wrote:
>> On 02/01/2012 04:25 PM, Jan Kiszka wrote:
>>> On 2012-02-01 16:17, Gilles Chanteperdrix wrote:
>>>> On 02/01/2012 03:37 PM, Jan Kiszka wrote:
>>>>> Hi,
>>>>>
>>>>> don't remember anymore: Is there any subtle reason that prevent a
>>>>> change like
>>>>>
>>>>> diff --git a/src/skins/native/Makefile.am b/src/skins/native/Makefile.am
>>>>> index 39eaaed..4cc8859 100644
>>>>> --- a/src/skins/native/Makefile.am
>>>>> +++ b/src/skins/native/Makefile.am
>>>>> @@ -22,6 +22,9 @@ libnative_la_SOURCES = \
>>>>>  	wrappers.c \
>>>>>  	wrappers.h
>>>>>  
>>>>> +libnative_la_LIBADD = \
>>>>> +	../common/libxenomai.la
>>>>> +
>>>>>  libnative_la_CPPFLAGS = \
>>>>>  	@XENO_USER_CFLAGS@ \
>>>>>  	-I$(top_srcdir)/include
>>>>> diff --git a/src/skins/rtdm/Makefile.am b/src/skins/rtdm/Makefile.am
>>>>> index 8ad74be..2dc0a90 100644
>>>>> --- a/src/skins/rtdm/Makefile.am
>>>>> +++ b/src/skins/rtdm/Makefile.am
>>>>> @@ -8,6 +8,9 @@ librtdm_la_SOURCES = \
>>>>>  	core.c \
>>>>>  	init.c
>>>>>  
>>>>> +librtdm_la_LIBADD = \
>>>>> +	../common/libxenomai.la
>>>>> +
>>>>>  librtdm_la_CPPFLAGS = \
>>>>>  	@XENO_USER_CFLAGS@ \
>>>>>  	-I$(top_srcdir)/include
>>>>> diff --git a/src/testsuite/latency/Makefile.am b/src/testsuite/latency/Makefile.am
>>>>> index c772c26..6534df5 100644
>>>>> --- a/src/testsuite/latency/Makefile.am
>>>>> +++ b/src/testsuite/latency/Makefile.am
>>>>> @@ -14,5 +14,4 @@ latency_LDFLAGS = @XENO_USER_LDFLAGS@
>>>>>  latency_LDADD = \
>>>>>  	../../skins/native/libnative.la \
>>>>>  	../../skins/rtdm/librtdm.la \
>>>>> -	../../skins/common/libxenomai.la \
>>>>>  	-lpthread -lm
>>>>>
>>>>> i.e. that we let the skin libraries depend on libxenomai and then remove
>>>>> the explicit dependency from our binaries and the xeno-config output?
>>>>> Is there some ordering issue again (we have -l<skin> before -lxenomai
>>>>> in the ldflags).
>>>>>
>>>>> If possible, this would allow for things like dlopen("libnative.so").
>>>>
>>>> It allows xeno-config result to work both with dynamic and static
>>>> libraries. Static libraries have no dependency system, so, when linking
>>>> a program whith libnative.a for instance, without libtool, you still
>>>> have to link it with libxenomai.a.
>>>
>>> OK, part two could stay, but the dependencies should still be added to
>>> the skin libs - if possible.
>>>
>>>>
>>>> How come you can not dlopen libnative.so, dlopening libxenomai.so before
>>>> does not work?
>>>
>>> Dependencies of libnative on libxenomai are not resolved when you open
>>> the former even if the latter is already loaded. Maybe you can do this
>>> by pulling in all required symbols one by one manually, haven't tried
>>> yet. But that would at least be unhandy.
>>
>> What about RTLD_GLOBAL ?
>>
> 
> Was possibly the reason, need to check back.
> 
> Still, what prevents stating the existing dependency of lib<skin> on
> libxenomai? The dance above would than be obsolete.

The change is merged. I took the chance to check that static build still
built.

-- 
                                                                Gilles.


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

* Re: [Xenomai-core] Built-in libxenomai dependency
  2012-02-01 20:21         ` Gilles Chanteperdrix
@ 2012-02-07 16:19           ` Gilles Chanteperdrix
  2012-02-07 16:22             ` Jan Kiszka
  0 siblings, 1 reply; 11+ messages in thread
From: Gilles Chanteperdrix @ 2012-02-07 16:19 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

On 02/01/2012 09:21 PM, Gilles Chanteperdrix wrote:
> On 02/01/2012 04:50 PM, Jan Kiszka wrote:
>> On 2012-02-01 16:38, Gilles Chanteperdrix wrote:
>>> On 02/01/2012 04:25 PM, Jan Kiszka wrote:
>>>> On 2012-02-01 16:17, Gilles Chanteperdrix wrote:
>>>>> On 02/01/2012 03:37 PM, Jan Kiszka wrote:
>>>>>> Hi,
>>>>>>
>>>>>> don't remember anymore: Is there any subtle reason that prevent a
>>>>>> change like
>>>>>>
>>>>>> diff --git a/src/skins/native/Makefile.am b/src/skins/native/Makefile.am
>>>>>> index 39eaaed..4cc8859 100644
>>>>>> --- a/src/skins/native/Makefile.am
>>>>>> +++ b/src/skins/native/Makefile.am
>>>>>> @@ -22,6 +22,9 @@ libnative_la_SOURCES = \
>>>>>>  	wrappers.c \
>>>>>>  	wrappers.h
>>>>>>  
>>>>>> +libnative_la_LIBADD = \
>>>>>> +	../common/libxenomai.la
>>>>>> +
>>>>>>  libnative_la_CPPFLAGS = \
>>>>>>  	@XENO_USER_CFLAGS@ \
>>>>>>  	-I$(top_srcdir)/include
>>>>>> diff --git a/src/skins/rtdm/Makefile.am b/src/skins/rtdm/Makefile.am
>>>>>> index 8ad74be..2dc0a90 100644
>>>>>> --- a/src/skins/rtdm/Makefile.am
>>>>>> +++ b/src/skins/rtdm/Makefile.am
>>>>>> @@ -8,6 +8,9 @@ librtdm_la_SOURCES = \
>>>>>>  	core.c \
>>>>>>  	init.c
>>>>>>  
>>>>>> +librtdm_la_LIBADD = \
>>>>>> +	../common/libxenomai.la
>>>>>> +
>>>>>>  librtdm_la_CPPFLAGS = \
>>>>>>  	@XENO_USER_CFLAGS@ \
>>>>>>  	-I$(top_srcdir)/include
>>>>>> diff --git a/src/testsuite/latency/Makefile.am b/src/testsuite/latency/Makefile.am
>>>>>> index c772c26..6534df5 100644
>>>>>> --- a/src/testsuite/latency/Makefile.am
>>>>>> +++ b/src/testsuite/latency/Makefile.am
>>>>>> @@ -14,5 +14,4 @@ latency_LDFLAGS = @XENO_USER_LDFLAGS@
>>>>>>  latency_LDADD = \
>>>>>>  	../../skins/native/libnative.la \
>>>>>>  	../../skins/rtdm/librtdm.la \
>>>>>> -	../../skins/common/libxenomai.la \
>>>>>>  	-lpthread -lm
>>>>>>
>>>>>> i.e. that we let the skin libraries depend on libxenomai and then remove
>>>>>> the explicit dependency from our binaries and the xeno-config output?
>>>>>> Is there some ordering issue again (we have -l<skin> before -lxenomai
>>>>>> in the ldflags).
>>>>>>
>>>>>> If possible, this would allow for things like dlopen("libnative.so").
>>>>>
>>>>> It allows xeno-config result to work both with dynamic and static
>>>>> libraries. Static libraries have no dependency system, so, when linking
>>>>> a program whith libnative.a for instance, without libtool, you still
>>>>> have to link it with libxenomai.a.
>>>>
>>>> OK, part two could stay, but the dependencies should still be added to
>>>> the skin libs - if possible.
>>>>
>>>>>
>>>>> How come you can not dlopen libnative.so, dlopening libxenomai.so before
>>>>> does not work?
>>>>
>>>> Dependencies of libnative on libxenomai are not resolved when you open
>>>> the former even if the latter is already loaded. Maybe you can do this
>>>> by pulling in all required symbols one by one manually, haven't tried
>>>> yet. But that would at least be unhandy.
>>>
>>> What about RTLD_GLOBAL ?
>>>
>>
>> Was possibly the reason, need to check back.
>>
>> Still, what prevents stating the existing dependency of lib<skin> on
>> libxenomai? The dance above would than be obsolete.
> 
> The change is merged. I took the chance to check that static build still
> built.
> 

Unfortunately this change also causes a build failure when
cross-compiling for ARM, so, change reverted, too.

-- 
                                                                Gilles.


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

* Re: [Xenomai-core] Built-in libxenomai dependency
  2012-02-07 16:19           ` Gilles Chanteperdrix
@ 2012-02-07 16:22             ` Jan Kiszka
  2012-02-07 16:28               ` Gilles Chanteperdrix
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Kiszka @ 2012-02-07 16:22 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai-core

On 2012-02-07 17:19, Gilles Chanteperdrix wrote:
> On 02/01/2012 09:21 PM, Gilles Chanteperdrix wrote:
>> On 02/01/2012 04:50 PM, Jan Kiszka wrote:
>>> On 2012-02-01 16:38, Gilles Chanteperdrix wrote:
>>>> On 02/01/2012 04:25 PM, Jan Kiszka wrote:
>>>>> On 2012-02-01 16:17, Gilles Chanteperdrix wrote:
>>>>>> On 02/01/2012 03:37 PM, Jan Kiszka wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> don't remember anymore: Is there any subtle reason that prevent a
>>>>>>> change like
>>>>>>>
>>>>>>> diff --git a/src/skins/native/Makefile.am b/src/skins/native/Makefile.am
>>>>>>> index 39eaaed..4cc8859 100644
>>>>>>> --- a/src/skins/native/Makefile.am
>>>>>>> +++ b/src/skins/native/Makefile.am
>>>>>>> @@ -22,6 +22,9 @@ libnative_la_SOURCES = \
>>>>>>>  	wrappers.c \
>>>>>>>  	wrappers.h
>>>>>>>  
>>>>>>> +libnative_la_LIBADD = \
>>>>>>> +	../common/libxenomai.la
>>>>>>> +
>>>>>>>  libnative_la_CPPFLAGS = \
>>>>>>>  	@XENO_USER_CFLAGS@ \
>>>>>>>  	-I$(top_srcdir)/include
>>>>>>> diff --git a/src/skins/rtdm/Makefile.am b/src/skins/rtdm/Makefile.am
>>>>>>> index 8ad74be..2dc0a90 100644
>>>>>>> --- a/src/skins/rtdm/Makefile.am
>>>>>>> +++ b/src/skins/rtdm/Makefile.am
>>>>>>> @@ -8,6 +8,9 @@ librtdm_la_SOURCES = \
>>>>>>>  	core.c \
>>>>>>>  	init.c
>>>>>>>  
>>>>>>> +librtdm_la_LIBADD = \
>>>>>>> +	../common/libxenomai.la
>>>>>>> +
>>>>>>>  librtdm_la_CPPFLAGS = \
>>>>>>>  	@XENO_USER_CFLAGS@ \
>>>>>>>  	-I$(top_srcdir)/include
>>>>>>> diff --git a/src/testsuite/latency/Makefile.am b/src/testsuite/latency/Makefile.am
>>>>>>> index c772c26..6534df5 100644
>>>>>>> --- a/src/testsuite/latency/Makefile.am
>>>>>>> +++ b/src/testsuite/latency/Makefile.am
>>>>>>> @@ -14,5 +14,4 @@ latency_LDFLAGS = @XENO_USER_LDFLAGS@
>>>>>>>  latency_LDADD = \
>>>>>>>  	../../skins/native/libnative.la \
>>>>>>>  	../../skins/rtdm/librtdm.la \
>>>>>>> -	../../skins/common/libxenomai.la \
>>>>>>>  	-lpthread -lm
>>>>>>>
>>>>>>> i.e. that we let the skin libraries depend on libxenomai and then remove
>>>>>>> the explicit dependency from our binaries and the xeno-config output?
>>>>>>> Is there some ordering issue again (we have -l<skin> before -lxenomai
>>>>>>> in the ldflags).
>>>>>>>
>>>>>>> If possible, this would allow for things like dlopen("libnative.so").
>>>>>>
>>>>>> It allows xeno-config result to work both with dynamic and static
>>>>>> libraries. Static libraries have no dependency system, so, when linking
>>>>>> a program whith libnative.a for instance, without libtool, you still
>>>>>> have to link it with libxenomai.a.
>>>>>
>>>>> OK, part two could stay, but the dependencies should still be added to
>>>>> the skin libs - if possible.
>>>>>
>>>>>>
>>>>>> How come you can not dlopen libnative.so, dlopening libxenomai.so before
>>>>>> does not work?
>>>>>
>>>>> Dependencies of libnative on libxenomai are not resolved when you open
>>>>> the former even if the latter is already loaded. Maybe you can do this
>>>>> by pulling in all required symbols one by one manually, haven't tried
>>>>> yet. But that would at least be unhandy.
>>>>
>>>> What about RTLD_GLOBAL ?
>>>>
>>>
>>> Was possibly the reason, need to check back.
>>>
>>> Still, what prevents stating the existing dependency of lib<skin> on
>>> libxenomai? The dance above would than be obsolete.
>>
>> The change is merged. I took the chance to check that static build still
>> built.
>>
> 
> Unfortunately this change also causes a build failure when
> cross-compiling for ARM, so, change reverted, too.
> 

Indeed unfortunate. Any pointers to logs?

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux


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

* Re: [Xenomai-core] Built-in libxenomai dependency
  2012-02-07 16:22             ` Jan Kiszka
@ 2012-02-07 16:28               ` Gilles Chanteperdrix
  2012-02-07 16:36                 ` Jan Kiszka
  0 siblings, 1 reply; 11+ messages in thread
From: Gilles Chanteperdrix @ 2012-02-07 16:28 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

On 02/07/2012 05:22 PM, Jan Kiszka wrote:
> On 2012-02-07 17:19, Gilles Chanteperdrix wrote:
>> On 02/01/2012 09:21 PM, Gilles Chanteperdrix wrote:
>>> On 02/01/2012 04:50 PM, Jan Kiszka wrote:
>>>> On 2012-02-01 16:38, Gilles Chanteperdrix wrote:
>>>>> On 02/01/2012 04:25 PM, Jan Kiszka wrote:
>>>>>> On 2012-02-01 16:17, Gilles Chanteperdrix wrote:
>>>>>>> On 02/01/2012 03:37 PM, Jan Kiszka wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> don't remember anymore: Is there any subtle reason that prevent a
>>>>>>>> change like
>>>>>>>>
>>>>>>>> diff --git a/src/skins/native/Makefile.am b/src/skins/native/Makefile.am
>>>>>>>> index 39eaaed..4cc8859 100644
>>>>>>>> --- a/src/skins/native/Makefile.am
>>>>>>>> +++ b/src/skins/native/Makefile.am
>>>>>>>> @@ -22,6 +22,9 @@ libnative_la_SOURCES = \
>>>>>>>>  	wrappers.c \
>>>>>>>>  	wrappers.h
>>>>>>>>  
>>>>>>>> +libnative_la_LIBADD = \
>>>>>>>> +	../common/libxenomai.la
>>>>>>>> +
>>>>>>>>  libnative_la_CPPFLAGS = \
>>>>>>>>  	@XENO_USER_CFLAGS@ \
>>>>>>>>  	-I$(top_srcdir)/include
>>>>>>>> diff --git a/src/skins/rtdm/Makefile.am b/src/skins/rtdm/Makefile.am
>>>>>>>> index 8ad74be..2dc0a90 100644
>>>>>>>> --- a/src/skins/rtdm/Makefile.am
>>>>>>>> +++ b/src/skins/rtdm/Makefile.am
>>>>>>>> @@ -8,6 +8,9 @@ librtdm_la_SOURCES = \
>>>>>>>>  	core.c \
>>>>>>>>  	init.c
>>>>>>>>  
>>>>>>>> +librtdm_la_LIBADD = \
>>>>>>>> +	../common/libxenomai.la
>>>>>>>> +
>>>>>>>>  librtdm_la_CPPFLAGS = \
>>>>>>>>  	@XENO_USER_CFLAGS@ \
>>>>>>>>  	-I$(top_srcdir)/include
>>>>>>>> diff --git a/src/testsuite/latency/Makefile.am b/src/testsuite/latency/Makefile.am
>>>>>>>> index c772c26..6534df5 100644
>>>>>>>> --- a/src/testsuite/latency/Makefile.am
>>>>>>>> +++ b/src/testsuite/latency/Makefile.am
>>>>>>>> @@ -14,5 +14,4 @@ latency_LDFLAGS = @XENO_USER_LDFLAGS@
>>>>>>>>  latency_LDADD = \
>>>>>>>>  	../../skins/native/libnative.la \
>>>>>>>>  	../../skins/rtdm/librtdm.la \
>>>>>>>> -	../../skins/common/libxenomai.la \
>>>>>>>>  	-lpthread -lm
>>>>>>>>
>>>>>>>> i.e. that we let the skin libraries depend on libxenomai and then remove
>>>>>>>> the explicit dependency from our binaries and the xeno-config output?
>>>>>>>> Is there some ordering issue again (we have -l<skin> before -lxenomai
>>>>>>>> in the ldflags).
>>>>>>>>
>>>>>>>> If possible, this would allow for things like dlopen("libnative.so").
>>>>>>>
>>>>>>> It allows xeno-config result to work both with dynamic and static
>>>>>>> libraries. Static libraries have no dependency system, so, when linking
>>>>>>> a program whith libnative.a for instance, without libtool, you still
>>>>>>> have to link it with libxenomai.a.
>>>>>>
>>>>>> OK, part two could stay, but the dependencies should still be added to
>>>>>> the skin libs - if possible.
>>>>>>
>>>>>>>
>>>>>>> How come you can not dlopen libnative.so, dlopening libxenomai.so before
>>>>>>> does not work?
>>>>>>
>>>>>> Dependencies of libnative on libxenomai are not resolved when you open
>>>>>> the former even if the latter is already loaded. Maybe you can do this
>>>>>> by pulling in all required symbols one by one manually, haven't tried
>>>>>> yet. But that would at least be unhandy.
>>>>>
>>>>> What about RTLD_GLOBAL ?
>>>>>
>>>>
>>>> Was possibly the reason, need to check back.
>>>>
>>>> Still, what prevents stating the existing dependency of lib<skin> on
>>>> libxenomai? The dance above would than be obsolete.
>>>
>>> The change is merged. I took the chance to check that static build still
>>> built.
>>>
>>
>> Unfortunately this change also causes a build failure when
>> cross-compiling for ARM, so, change reverted, too.
>>
> 
> Indeed unfortunate. Any pointers to logs?

This causes a -L/usr/lib to be added on the link-edit command line,
which causes the link to fail by finding /usr/lib/libpthread.so instead
of the cross-compiler one, and fail.

-- 
                                                                Gilles.


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

* Re: [Xenomai-core] Built-in libxenomai dependency
  2012-02-07 16:28               ` Gilles Chanteperdrix
@ 2012-02-07 16:36                 ` Jan Kiszka
  2012-02-08 18:24                   ` Gilles Chanteperdrix
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Kiszka @ 2012-02-07 16:36 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai-core

On 2012-02-07 17:28, Gilles Chanteperdrix wrote:
> This causes a -L/usr/lib to be added on the link-edit command line,
> which causes the link to fail by finding /usr/lib/libpthread.so instead
> of the cross-compiler one, and fail.

How does libxenomai.la look like? Is it different from a native build?

Hmm, there must be some valid way to express library dependencies inside
you package.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux


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

* Re: [Xenomai-core] Built-in libxenomai dependency
  2012-02-07 16:36                 ` Jan Kiszka
@ 2012-02-08 18:24                   ` Gilles Chanteperdrix
  0 siblings, 0 replies; 11+ messages in thread
From: Gilles Chanteperdrix @ 2012-02-08 18:24 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

On 02/07/2012 05:36 PM, Jan Kiszka wrote:
> On 2012-02-07 17:28, Gilles Chanteperdrix wrote:
>> This causes a -L/usr/lib to be added on the link-edit command line,
>> which causes the link to fail by finding /usr/lib/libpthread.so instead
>> of the cross-compiler one, and fail.
> 
> How does libxenomai.la look like? Is it different from a native build?
> 
> Hmm, there must be some valid way to express library dependencies inside
> you package.

I would say it looks like a famous libtool bug all buildroot, ptxdist
and the like tools work around. So, I would tend to give up on this
issue, given that it fixes an issue not all that critical.

-- 
					    Gilles.


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

end of thread, other threads:[~2012-02-08 18:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-01 14:37 [Xenomai-core] Built-in libxenomai dependency Jan Kiszka
2012-02-01 15:17 ` Gilles Chanteperdrix
2012-02-01 15:25   ` Jan Kiszka
2012-02-01 15:38     ` Gilles Chanteperdrix
2012-02-01 15:50       ` Jan Kiszka
2012-02-01 20:21         ` Gilles Chanteperdrix
2012-02-07 16:19           ` Gilles Chanteperdrix
2012-02-07 16:22             ` Jan Kiszka
2012-02-07 16:28               ` Gilles Chanteperdrix
2012-02-07 16:36                 ` Jan Kiszka
2012-02-08 18:24                   ` Gilles Chanteperdrix

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.