diff mbox series

[uclibc-ng-devel] Undefined reference to name_to_handle_at while building eudev

Message ID 29705dc1-6465-e49d-993d-6fe583c3cf24@att.net
State Accepted
Headers show
Series [uclibc-ng-devel] Undefined reference to name_to_handle_at while building eudev | expand

Commit Message

Alexey Neyman Feb. 11, 2018, 8:07 p.m. UTC
Hi,

I noticed a failure while compiling eudev against uClibc-ng 1.0.28 on 
aarch64: it detected name_to_handle_at being declared in the header but 
then failed to link because it is not implemented in uClibc-ng.

Patch attached.

Regards,
Alexey.

Comments

Waldemar Brodkorb Feb. 14, 2018, 4:58 a.m. UTC | #1
Hi Alexey,
Alexey Neyman wrote,

> Hi,
> 
> I noticed a failure while compiling eudev against uClibc-ng 1.0.28 on
> aarch64: it detected name_to_handle_at being declared in the header but then
> failed to link because it is not implemented in uClibc-ng.
 
Thanks a lot, patch applied and pushed,

best regards
 Waldemar
Waldemar Brodkorb Feb. 28, 2018, 10:43 a.m. UTC | #2
Hi,

this time it is only relevant to aarch64, as I imported it from glibc
without recognizing that I should have removed it.

best regards
 Waldemar 

> On 28. Feb 2018, at 11:34, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> 
> Hello,
> 
>> On Sun, 11 Feb 2018 12:07:33 -0800, Alexey Neyman wrote:
>> 
>> I noticed a failure while compiling eudev against uClibc-ng 1.0.28 on 
>> aarch64: it detected name_to_handle_at being declared in the header but 
>> then failed to link because it is not implemented in uClibc-ng.
>> 
>> Patch attached.
> 
> A quick heads up on this: it is by far not the first time that I see
> uClibc headers having the prototype for a given function, and not the
> actual implementation of this function.
> 
> It is confusing, and sometimes causes problems when just an autoconf
> compile test is done, and not an autoconf link test.
> 
> Shouldn't this be fixed globally ?
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> http://bootlin.com
>
diff mbox series

Patch

From 319583d37ce649221ca4ff48a0b194bdbbf2ace1 Mon Sep 17 00:00:00 2001
From: Alexey Neyman <stilor@att.net>
Date: Sun, 11 Feb 2018 11:59:22 -0800
Subject: [PATCH] uClibc-ng does not implement name_to_handle_at

... so don't declare it. Otherwise, eudev finds it declared and tries
to link with it - and fails.

Signed-off-by: Alexey Neyman <stilor@att.net>
---
 libc/sysdeps/linux/aarch64/bits/fcntl.h | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/libc/sysdeps/linux/aarch64/bits/fcntl.h b/libc/sysdeps/linux/aarch64/bits/fcntl.h
index 042ea947f..80657c008 100644
--- a/libc/sysdeps/linux/aarch64/bits/fcntl.h
+++ b/libc/sysdeps/linux/aarch64/bits/fcntl.h
@@ -242,15 +242,6 @@  struct f_owner_ex
 					      file to zeros.  */
 
 
-/* File handle structure.  */
-struct file_handle
-{
-  unsigned int handle_bytes;
-  int handle_type;
-  /* File identifier.  */
-  unsigned char f_handle[0];
-};
-
 /* Maximum handle size (for now).  */
 # define MAX_HANDLE_SZ	128
 #endif
@@ -315,18 +306,6 @@  extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
 # endif
 
 
-/* Map file name to file handle.  */
-extern int name_to_handle_at (int __dfd, const char *__name,
-			      struct file_handle *__handle, int *__mnt_id,
-			      int __flags) __THROW;
-
-/* Open file using the file handle.
-
-   This function is a possible cancellation point and therefore not
-   marked with __THROW.  */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
-			      int __flags);
-
 #endif	/* use GNU */
 
 __END_DECLS
-- 
2.14.1