Hello,
Sorry for the bother but I’ve been struggling with compiling uclibc-ng. All I did was clone; make defconfig; make.
I get the following error:
CC ldso/ldso/ldso.oS
In file included from ./include/bits/posix1_lim.h:152:0,
from ./include/limits.h:144,
from ./include/sys/param.h:25,
from ./ldso/include/ldso.h:43,
from ldso/ldso/ldso.c:32:
./include/bits/local_lim.h:38:26: fatal error: linux/limits.h: No such file or directory
compilation terminated.
Makerules:370: recipe for target 'ldso/ldso/ldso.oS' failed
make: *** [ldso/ldso/ldso.oS] Error 1
I’ve tried to remove -nostdinc, the compilation then proceeds but with no success. I also tried to install the following packages: kernel-package, linux-libc-dev, binutils, libc-dev-bin, linux-headers-4.10.0-35 and linux-headers-generic.
Can anyone help?
Best regards,
Daniel Dubinsky
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(a)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
>
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.
Signed-off-by: Guo Ren <ren_guo(a)c-sky.com>
---
libc/sysdeps/linux/csky/bits/fcntl.h | 55 ++++++++++++++++++++++++++++--------
1 file changed, 43 insertions(+), 12 deletions(-)
diff --git a/libc/sysdeps/linux/csky/bits/fcntl.h b/libc/sysdeps/linux/csky/bits/fcntl.h
index feacdad..15c1f52 100644
--- a/libc/sysdeps/linux/csky/bits/fcntl.h
+++ b/libc/sysdeps/linux/csky/bits/fcntl.h
@@ -2,11 +2,12 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-
#include <sys/types.h>
#ifdef __USE_GNU
# include <bits/uio.h>
#endif
+
+
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 0003
@@ -24,12 +25,16 @@
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
# define O_DIRECTORY 040000 /* Must be a directory. */
# define O_NOFOLLOW 0100000 /* Do not follow links. */
+# define O_CLOEXEC 02000000 /* Set close_on_exec. */
+#endif
+
+#ifdef __USE_GNU
# define O_DIRECT 0200000 /* Direct disk access. */
-# define O_STREAMING 04000000/* streaming access */
-# define O_CLOEXEC 02000000 /* set close_on_exec */
+# define O_NOATIME 01000000 /* Do not set atime. */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
@@ -63,7 +68,7 @@
#define F_SETLK64 13 /* Set record locking info (non-blocking). */
#define F_SETLKW64 14 /* Set record locking info (blocking). */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
#endif
@@ -77,9 +82,13 @@
# define F_SETLEASE 1024 /* Set a lease. */
# define F_GETLEASE 1025 /* Enquire what lease is active. */
# define F_NOTIFY 1026 /* Request notfications on a directory. */
+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
+ close-on-exit set on new fd. */
+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
+# define F_GETPIPE_SZ 1032 /* Get pipe page size array. */
#endif
-/* For F_[GET|SET]FL. */
+/* For F_[GET|SET]FD. */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
@@ -163,6 +172,28 @@ struct flock64
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+
+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
+/* Flags for SYNC_FILE_RANGE. */
+# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
+ in the range before performing the
+ write. */
+# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
+ dirty pages in the range which are
+ not presently under writeback. */
+# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
+ the range after performing the
+ write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
+#endif
+
__BEGIN_DECLS
#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
@@ -171,23 +202,23 @@ __BEGIN_DECLS
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
__THROW;
-
/* Selective file content synch'ing. */
extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
- unsigned int __flags);
+ unsigned int __flags);
/* Splice address range into a pipe. */
extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- size_t __count, unsigned int __flags);
+ size_t __count, unsigned int __flags);
/* Splice two files together. */
extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len,
- unsigned int __flags);
+ __off64_t *__offout, size_t __len,
+ unsigned int __flags);
/* In-kernel implementation of tee for pipe buffers. */
extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- unsigned int __flags);
+ unsigned int __flags);
#endif
__END_DECLS
+
--
2.7.4
Fixes a buildroot build error with ffmpeg
In file included from /home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/signal.h:329:0,
from fftools/ffmpeg.h:26,
from fftools/ffmpeg_opt.c:23:
/home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/sys/ucontext.h:52:16:
error: field 'uc_mcontext' has incomplete type
mcontext_t uc_mcontext;
^~~~~~~~~~~
using this defconfig:
BR2_aarch64=y
BR2_PACKAGE_FFMPEG=y
sys/ucontext.h for other archs already include bits/sigcontext.h,
on aarch64 this is needed as well.
Signed-off-by: Bernd Kuhls <bernd.kuhls(a)t-online.de>
---
libc/sysdeps/linux/aarch64/sys/ucontext.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libc/sysdeps/linux/aarch64/sys/ucontext.h b/libc/sysdeps/linux/aarch64/sys/ucontext.h
index d17458896..dc7303b54 100644
--- a/libc/sysdeps/linux/aarch64/sys/ucontext.h
+++ b/libc/sysdeps/linux/aarch64/sys/ucontext.h
@@ -26,6 +26,10 @@
#include <sys/procfs.h>
+/* We need the signal context definitions even if they are not used
+ included in <signal.h>. */
+#include <bits/sigcontext.h>
+
typedef elf_greg_t greg_t;
/* Container for all general registers. */
--
2.11.0