libnative versioning
Hi,
we just had some fun here with incompatible native libraries. A program was built against some 2.2 release and was then started on a target with 2.3 libs installed. The result: undefined symbol rt_mutex_lock. The
reason: this function was renamed to rt_mutex_acquire in trunk to resolve a naming conflict in recent kernels.
So we now have incompatible libraries and should either increment some version number of libnative or export the necessary aliases for lock/unlock. What is preferred?
Jan
Quoted 11 lines · Jan Kiszka
Hi,
we just had some fun here with incompatible native libraries. A program was built against some 2.2 release and was then started on a target with 2.3 libs installed. The result: undefined symbol
rt_mutex_lock. The
reason: this function was renamed tort_mutex_acquirein trunk to resolve a naming conflict in recent kernels.So we now have incompatible libraries and should either increment some version number of libnative or export the necessary aliases for lock/unlock. What is preferred?
The Xenomai ABI has been kept compatible between versions, so we want to provide the proper aliases for user-space; the conflict is kernel-space only, and there is no reason to ask user-space apps to conform to some obscure change that took place within the vanilla kernel API. Actually, I already wrappers in include/native/mutex.h, but unfortunately as macros, so dynamic binding could not work. I'm fixing this. Thanks.
Quoted 7 lines
Jan
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
Quoted 2 lines · Philippe Gerum
The Xenomai ABI has been kept compatible between versions
I am afraid you are being optimistic: I for one made some changes in the posix skin that break the kernel/user interface. Maybe we need an ABI revision for each skin ?
Signature · 1 line
Gilles Chanteperdrix
Quoted 6 lines · Gilles Chanteperdrix
Quoted 2 lines · Philippe Gerum
The Xenomai ABI has been kept compatible between versions
I am afraid you are being optimistic: I for one made some changes in the posix skin that break the kernel/user interface.
Sorry, I've been unclear:
s,Xenomai ABI,Xenomai native interface ABI,
Quoted 3 lines
Maybe we need an ABI
revision for each skin ?
There is one for the nucleus already, so maybe we could extend the feature. This said, the point ABI revs is basically to detect potential mismatches; would an old POSIX app run improperly over the new library, or would it choke at startup?
Signature · 1 line
Philippe.
Quoted 4 lines · Philippe Gerum
There is one for the nucleus already, so maybe we could extend the feature. This said, the point ABI revs is basically to detect potential mismatches; would an old POSIX app run improperly over the new library, or would it choke at startup?
The mismatch would occur if running the new library with an old kernel or an old library with a new kernel, the pthread_cond_wait and pthread_cond_timedwait syscalls have been replaced with pthread_cond_wait_prologue/pthread_cond_wait_epilogue.
Signature · 1 line
Gilles Chanteperdrix
Quoted 13 lines · Philippe Gerum
Quoted 11 lines · Jan Kiszka
Hi,
we just had some fun here with incompatible native libraries. A program was built against some 2.2 release and was then started on a target with 2.3 libs installed. The result: undefined symbol
rt_mutex_lock. The
reason: this function was renamed tort_mutex_acquirein trunk to resolve a naming conflict in recent kernels.So we now have incompatible libraries and should either increment some version number of libnative or export the necessary aliases for lock/unlock. What is preferred?
Quoted 6 lines
The Xenomai ABI has been kept compatible between versions, so we want to provide the proper aliases for user-space; the conflict is kernel-space only, and there is no reason to ask user-space apps to conform to some obscure change that took place within the vanilla kernel API. Actually, I already wrappers in
include/native/mutex.h, but unfortunately as macros, so dynamic binding could not work. I'm fixing this. Thanks.
And this fixes the fix (/wrt C++ users).
Jan
native/mutex.h +4 -4
@@ -121,10 +121,6 @@ int rt_mutex_release(RT_MUTEX *mutex);int rt_mutex_inquire (RT_MUTEX *mutex,RT_MUTEX_INFO *info); -#ifdef __cplusplus -} -#endif -#ifdef __KERNEL__#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,18 ) static inline int __deprecated_call__ rt_mutex_lock(RT_MUTEX *mutex, RTIME timeout)
@@ -146,4 +142,8 @@ int rt_mutex_unlock(RT_MUTEX *mutex);#endif /* __KERNEL__ */ +#ifdef __cplusplus +} +#endif +#endif /* !_XENO_MUTEX_H */
Philippe Gerum
AppliedQuoted 16 lines · Jan Kiszka
Index:
include/native/mutex.h
===================================================================native/mutex.h +0
-4@@ -121,10 +121,6 @@ int rt_mutex_release(RT_MUTEX *mutex);int rt_mutex_inquire (RT_MUTEX *mutex,RT_MUTEX_INFO *info); -#ifdef __cplusplus -} -#endif -#ifdef __KERNEL__#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,18 ) static inline int __deprecated_call__ rt_mutex_lock(RT_MUTEX *mutex, RTIME timeout)
native/mutex.h int rt_mutex_unlock(RT_MUTEX *mutex); · line 149
Quoted 8 lines
native/mutex.h +4
-0@@ -146,4 +142,8 @@ int rt_mutex_unlock(RT_MUTEX *mutex);#endif /* __KERNEL__ */ +#ifdef __cplusplus +} +#endif +#endif /* !_XENO_MUTEX_H */
Applied, thanks.
Signature · 1 line
Philippe.