Skip to contentSkip to conversation

package/openvmtools: does not build with uClibc

PATCH New Yann E. MORIN 3 participants 3 messages Oct 31, 2015 – Nov 6, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/openvmtools: does not build with uClibc

On glibc 2.4+, openvmtools uses euidaccess(), which is not implemented on uClibc.

But since uClibc fakes being a glibc-3.10, openvmtools believes it can use euidaccess(), and thus we get a linking error.

Fixes:

    http://autobuild.buildroot.org/results/779/779bed269982f0b2e04baecae2e720d602319552/
    http://autobuild.buildroot.org/results/860/8609823e35115f07b0f16f0a1831201aa1cf9e3c/
    http://autobuild.buildroot.org/results/f57/f572573c5f7f9206e0a8309b535a7c633a2d6b16/
    ...

---
Note; an alternate solution would be to patch openvmtools to not use euidaccess with uClibc as well. But I'm warry of patching. After all, a package that deals with virtual machines is not really size-sensitive, so it is not completely stupid to disable it with uClibc, and require either glibc or musl...

---
 package/openvmtools/Config.in | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
package/openvmtools/Config.in +5 -3
index 98cbeb9..64bf65c 100644
@@ -6,6 +6,7 @@ config BR2_PACKAGE_OPENVMTOOLS
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	depends on BR2_ENABLE_LOCALE
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_LIBDNET
 	help
@@ -40,13 +41,14 @@ config BR2_PACKAGE_OPENVMTOOLS_PAM
 	help
 	  Support for PAM in openvmtools
 
-comment "PAM support needs a uClibc or (e)glibc toolchain w/ dynamic library"
+comment "PAM support needs an (e)glibc toolchain w/ dynamic library"
 	depends on BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL
 
 endif
 
-comment "openvmtools needs a toolchain w/ wchar, threads, RPC, locale"
+comment "openvmtools needs an (e)glibc or musl toolchain w/ wchar, threads, RPC, locale"
 	depends on BR2_i386 || BR2_x86_64
 	depends on BR2_USE_MMU
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_TOOLCHAIN_HAS_NATIVE_RPC || !BR2_ENABLE_LOCALE
+		!BR2_TOOLCHAIN_HAS_NATIVE_RPC || !BR2_ENABLE_LOCALE || \
+		BR2_TOOLCHAIN_USES_UCLIBC
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 package/openvmtools: does not build with uClibc

Yann,

Quoted 4 lines · Yann E. MORIN

On glibc 2.4+, openvmtools uses euidaccess(), which is not implemented on uClibc.

But since uClibc fakes being a glibc-3.10, openvmtools believes it can

s/3.10/2.10/.

Quoted 8 lines

use euidaccess(), and thus we get a linking error.

Fixes:

    http://autobuild.buildroot.org/results/779/779bed269982f0b2e04baecae2e720d602319552/
    http://autobuild.buildroot.org/results/860/8609823e35115f07b0f16f0a1831201aa1cf9e3c/
    http://autobuild.buildroot.org/results/f57/f572573c5f7f9206e0a8309b535a7c633a2d6b16/
    ...
Quoted 8 lines

---
Note; an alternate solution would be to patch openvmtools to not use euidaccess with uClibc as well. But I'm warry of patching. After all, a package that deals with virtual machines is not really size-sensitive, so it is not completely stupid to disable it with uClibc, and require either glibc or musl...

I've applied the patch after fixing 2.10 typo, thanks!

However, it is interesting to see the type of build issues that we've discovered since uClibc pretends to be glibc 2.10.

But oh well, those packages simply get what they merit: instead of doing proper configure.ac checks, they do some stupid version-based checking. Which is doomed to fail at some point.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 package/openvmtools: does not build with uClibc

Hi Thomas,
Thomas Petazzoni wrote,

Quoted 27 lines

Yann,

Quoted 4 lines · Yann E. MORIN

On glibc 2.4+, openvmtools uses euidaccess(), which is not implemented on uClibc.

But since uClibc fakes being a glibc-3.10, openvmtools believes it can

s/3.10/2.10/.

Quoted 8 lines

use euidaccess(), and thus we get a linking error.

Fixes:

    http://autobuild.buildroot.org/results/779/779bed269982f0b2e04baecae2e720d602319552/
    http://autobuild.buildroot.org/results/860/8609823e35115f07b0f16f0a1831201aa1cf9e3c/
    http://autobuild.buildroot.org/results/f57/f572573c5f7f9206e0a8309b535a7c633a2d6b16/
    ...
Quoted 8 lines

---
Note; an alternate solution would be to patch openvmtools to not use euidaccess with uClibc as well. But I'm warry of patching. After all, a package that deals with virtual machines is not really size-sensitive, so it is not completely stupid to disable it with uClibc, and require either glibc or musl...

Quoted 8 lines

I've applied the patch after fixing 2.10 typo, thanks!

However, it is interesting to see the type of build issues that we've discovered since uClibc pretends to be glibc 2.10.

But oh well, those packages simply get what they merit: instead of doing proper configure.ac checks, they do some stupid version-based checking. Which is doomed to fail at some point.

I think I will add euidaccess() to the next uClibc-ng release. The musl implementation for example is pretty small, just a wrapper around faccessat().

best regards
Waldemar