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 Waldemar,
I see in commit e65912f8b2a6 ("rework most tests to work as standalone package")
"tst-atomic" and "tst-atomic-long" were marked as disabled for all architectures
as opposed to previously (in times of test-suite being a part of uClibc) disabled
only for selected arches (IA64, MIPS and SPARC).
The only guess I have it was done due to inability to refer not-exported "atomic.h".
Is that correct? But anyways I'm looking at a possibility to revive those as they
might be of use especially in case of emulation of atomics.
Any thoughts on how that could be done?
-Alexey
It looks like memmove() is broken by design for mips. This has come up
before in a previous thread, but with no proper resolution:
https://mailman.uclibc-ng.org/pipermail/devel/2016-April/000837.html
Per the man pages and posix specification, memmove() must work with
overlapping regions:
https://linux.die.net/man/3/memmovehttps://www.unix.com/man-page/POSIX/3posix/memmove/
Unless __ARCH_HAS_BWD_MEMCPY__ is set, the generic memmove() (which is
used for mips) will use memcpy() when the destination pointer is lower
than the source pointer, whether the regions are overlapping or not.
The author of libc/string/mips/memcpy.S is clear about the fact that
the mips implementation for memcpy() cannot deal with overlapping
regions. For Android, support for overlapping regions seems to be
required for memcpy(), so memcpy() will offload to memmove() when an
overlap occurs. How this could work with memmove() again offloading to
memcpy() on mips is lost on me.
I am observing the problem on a big-endian mips 34kc with OpenSSL. We
are using nginx as an https webserver with openssl as the ssl library.
We observed unexpected Message Authentication Code failures when data
was received.
After some detective work, we were observing the uClibc memmove()
occasionally copying a source buffer cache-line worth of zero's (32
bytes) to the destination buffer instead of the actual source data.
Needless to say, I do not know of a cipher that plays nicely when the
input buffer suffers from Alzheimer's. The OpenSSL implementation of
the GCM-128 cipher rightfully fails the tag check from it's perspective,
returning a Message Authentication Code failure to the client.
I quick solution is to always define __ARCH_HAS_BWD_MEMCPY__ on mips,
but I do not consider that a clear expression of the intent.
Can anyone comment on this?
- Pieter Smith
It looks like memmove() is broken by design for mips. This has come up
before in a previous thread, but with no proper resolution:
https://mailman.uclibc-ng.org/pipermail/devel/2016-April/000837.html
Per the man pages and posix specification, memmove() must work with
overlapping regions:
https://linux.die.net/man/3/memmovehttps://www.unix.com/man-page/POSIX/3posix/memmove/
Unless __ARCH_HAS_BWD_MEMCPY__ is set, the generic memmove() (which is
used for mips) will use memcpy() when the destination pointer is lower
than the source pointer, whether the regions are overlapping or not.
The author of libc/string/mips/memcpy.S is clear about the fact that
the mips implementation for memcpy() cannot deal with overlapping
regions. For Android, support for overlapping regions seems to be
required for memcpy(), so memcpy() will offload to memmove() when an
overlap occurs. How this could work with memmove() again offloading to
memcpy() on mips is lost on me.
I am observing the problem on a big-endian mips 34kc with OpenSSL. We
are using nginx as an https webserver with openssl as the ssl library.
We observed unexpected Message Authentication Code failures when data
was received.
After some detective work, we were observing the uClibc memmove()
occasionally copying a source buffer cache-line worth of zero's (32
bytes) to the destination buffer instead of the actual source data.
Needless to say, I do not know of a cipher that plays nicely when the
input buffer suffers from Alzheimer's. The OpenSSL implementation of
the GCM-128 cipher rightfully fails the tag check from it's perspective,
returning a Message Authentication Code failure to the client.
I quick solution is to always define __ARCH_HAS_BWD_MEMCPY__ on mips,
but I do not consider that a clear expression of the intent.
Can anyone comment on this?
- Pieter Smith
Hi,
I released uClibc-ng 1.0.29 today.
The new release contains mostly bugfixes for aarch64 and x86_64.
I use Gentoo/uClibc-ng since some weeks and found some
Glibc compatibility issues. I run chromium every day on my
Lenovo X200 with lates uClibc-ng.
I integrated gettext-tiny, which allows to use uClibc-ng for
Desktop when compiling software with i18n requirements.
Attention: arc4random is removed.
best regards
Waldemar