Re: [Xenomai] Library cannot be dlopen()ed

2017-12-11 Thread Henning Schild
Am Tue, 28 Nov 2017 23:24:40 +
schrieb Giulio Moro :

> Again, armv7 BeagleBone Black, Xenomai 3.0.5
> 
> My main executable uses the posix API, hence ldd tells me :
>   libcobalt.so.2 => /usr/xenomai/lib/libcobalt.so.2 (0xb6ed3000)
>   libmodechk.so.0 => /usr/xenomai/lib/libmodechk.so.0
> (0xb6f39000)
> 
> I am trying to dlopen() a library which uses the native API
> (alchemy+transition kit): libtrank.so.0
> => /usr/xenomai/lib/libtrank.so.0 (0xb6e71000) libalchemy.so.0
> => /usr/xenomai/lib/libalchemy.so.0 (0xb6e58000) libcopperplate.so.0
> => /usr/xenomai/lib/libcopperplate.so.0 (0xb6e3d000) libcobalt.so.2
> => /usr/xenomai/lib/libcobalt.so.2 (0xb6e18000) libmodechk.so.0
> => /usr/xenomai/lib/libmodechk.so.0 (0xb6e07000)
> 
> the call to dlopen() fails with the following message:
> libtrank.so.0: shared object cannot be dlopen()ed
> 
> grepping the configured Xenomai source for "nodlopen" shows that all
> (or most) of the libraries are compiled with -Wl,nodlopen, which is
> what is preventing dlopen() from working.
> 
> I have two questions:
> - is it possible to dynamically load a library which uses the alchemy
> API from a program that uses the cobalt API?
> - is it at all possible to dynamically load a library that uses
> xenomai in a program that was not linked against xenomai?

Yes and yes. But i guess you have figured that out already.

Henning

> Thanks,
> Giulio
> 
> ___
> Xenomai mailing list
> Xenomai@xenomai.org
> https://xenomai.org/mailman/listinfo/xenomai

___
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai


Re: [Xenomai] Library cannot be dlopen()ed

2017-11-29 Thread Giulio Moro
> From: Philippe Gerum 
> As mentioned in the documentation, --enable-dlopen-libs is needed when 
> configuring

Brilliant, thanks. The docs mentions

> Enabling dynamic loading introduces some overhead in TLS accesses when 
> enabled (see --enable-tls), which might be noticeable depending on the 
> architecture.

Can you make an example of what operations incur overhead?

Thanks,
Giulio
___
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai


Re: [Xenomai] Library cannot be dlopen()ed

2017-11-29 Thread Philippe Gerum
On 11/29/2017 12:24 AM, Giulio Moro wrote:
> Again, armv7 BeagleBone Black, Xenomai 3.0.5
> 
> My main executable uses the posix API, hence ldd tells me :
>   libcobalt.so.2 => /usr/xenomai/lib/libcobalt.so.2 (0xb6ed3000)
>   libmodechk.so.0 => /usr/xenomai/lib/libmodechk.so.0 (0xb6f39000)
> 
> I am trying to dlopen() a library which uses the native API 
> (alchemy+transition kit):
>   libtrank.so.0 => /usr/xenomai/lib/libtrank.so.0 (0xb6e71000)
>   libalchemy.so.0 => /usr/xenomai/lib/libalchemy.so.0 (0xb6e58000)
>   libcopperplate.so.0 => /usr/xenomai/lib/libcopperplate.so.0 (0xb6e3d000)
>   libcobalt.so.2 => /usr/xenomai/lib/libcobalt.so.2 (0xb6e18000)
>   libmodechk.so.0 => /usr/xenomai/lib/libmodechk.so.0 (0xb6e07000)
> 
> the call to dlopen() fails with the following message:
> libtrank.so.0: shared object cannot be dlopen()ed
> 
> grepping the configured Xenomai source for "nodlopen" shows that all (or 
> most) of the libraries are compiled with -Wl,nodlopen, which is what is 
> preventing dlopen() from working.
> 
> I have two questions:
> - is it possible to dynamically load a library which uses the alchemy API 
> from a program that uses the cobalt API?
> - is it at all possible to dynamically load a library that uses xenomai in a 
> program that was not linked against xenomai?
> 
> Thanks,
> Giulio
> 
> ___
> Xenomai mailing list
> Xenomai@xenomai.org
> https://xenomai.org/mailman/listinfo/xenomai
> 

As mentioned in the documentation, --enable-dlopen-libs is needed when
configuring:

https://xenomai.org/installing-xenomai-3-x/#Generic_configuration_options_both_cores

-- 
Philippe.

___
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai


[Xenomai] Library cannot be dlopen()ed

2017-11-28 Thread Giulio Moro
Again, armv7 BeagleBone Black, Xenomai 3.0.5

My main executable uses the posix API, hence ldd tells me :
libcobalt.so.2 => /usr/xenomai/lib/libcobalt.so.2 (0xb6ed3000)
libmodechk.so.0 => /usr/xenomai/lib/libmodechk.so.0 (0xb6f39000)

I am trying to dlopen() a library which uses the native API (alchemy+transition 
kit):
libtrank.so.0 => /usr/xenomai/lib/libtrank.so.0 (0xb6e71000)
libalchemy.so.0 => /usr/xenomai/lib/libalchemy.so.0 (0xb6e58000)
libcopperplate.so.0 => /usr/xenomai/lib/libcopperplate.so.0 (0xb6e3d000)
libcobalt.so.2 => /usr/xenomai/lib/libcobalt.so.2 (0xb6e18000)
libmodechk.so.0 => /usr/xenomai/lib/libmodechk.so.0 (0xb6e07000)

the call to dlopen() fails with the following message:
libtrank.so.0: shared object cannot be dlopen()ed

grepping the configured Xenomai source for "nodlopen" shows that all (or most) 
of the libraries are compiled with -Wl,nodlopen, which is what is preventing 
dlopen() from working.

I have two questions:
- is it possible to dynamically load a library which uses the alchemy API from 
a program that uses the cobalt API?
- is it at all possible to dynamically load a library that uses xenomai in a 
program that was not linked against xenomai?

Thanks,
Giulio

___
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai