wbx-github / uclibc-ng Goto Github PK
View Code? Open in Web Editor NEWEmbedded C Library (mirror)
Home Page: https://uclibc-ng.org
License: GNU Lesser General Public License v2.1
Embedded C Library (mirror)
Home Page: https://uclibc-ng.org
License: GNU Lesser General Public License v2.1
It seems the procedure for syncing this mirror with upstream is missing to push new tags. Cloning this repo today the latest four release tags v1.0.4[1-4] aren't there.
There is brk and exiting abnormal.
root@OpenWrt:/# strace netdata
execve("/usr/sbin/netdata", ["netdata"], [/* 10 vars /]) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/usr/sbin/netdata", 4096) = 17
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb6fd3000
stat("/etc/ld.so.cache", 0xbeb82ad0) = -1 ENOENT (No such file or directory)
open("/lib/libm.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=36908, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb6fd2000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\220\26\0\0004\0\0\0"..., 4096) = 4096
mmap2(NULL, 73728, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fb5000
mmap2(0xb6fb5000, 34436, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb6fb5000
mmap2(0xb6fc5000, 4140, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x8000) = 0xb6fc5000
close(3) = 0
munmap(0xb6fd2000, 4096) = 0
open("/lib/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libz.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=66217, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb6fd2000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\260\25\0\0004\0\0\0"..., 4096) = 4096
mmap2(NULL, 69632, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fa4000
mmap2(0xb6fa4000, 65288, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb6fa4000
mmap2(0xb6fb4000, 681, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x10000) = 0xb6fb4000
close(3) = 0
munmap(0xb6fd2000, 4096) = 0
open("/lib/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libuuid.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=8664, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb6fd2000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\344\r\0\0004\0\0\0"..., 4096) = 4096
mmap2(NULL, 45056, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f99000
mmap2(0xb6f99000, 8040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb6f99000
mmap2(0xb6fa3000, 472, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0xb6fa3000
close(3) = 0
munmap(0xb6fd2000, 4096) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=41819, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb6fd2000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\320;\0\0004\0\0\0"..., 4096) = 4096
mmap2(NULL, 77824, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f86000
mmap2(0xb6f86000, 41280, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb6f86000
mmap2(0xb6f98000, 859, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xa000) = 0xb6f98000
close(3) = 0
munmap(0xb6fd2000, 4096) = 0
open("/lib/libpthread.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=65971, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb6fd2000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\200F\0\0004\0\0\0"..., 4096) = 4096
mmap2(NULL, 110592, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f6b000
mmap2(0xb6f6b000, 64464, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb6f6b000
mmap2(0xb6f82000, 4531, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xf000) = 0xb6f82000
mmap2(0xb6f84000, 4736, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6f84000
close(3) = 0
munmap(0xb6fd2000, 4096) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=295883, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb6fd2000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\260\235\0\0004\0\0\0"..., 4096) = 4096
mmap2(NULL, 344064, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f17000
mmap2(0xb6f17000, 291532, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb6f17000
mmap2(0xb6f66000, 5067, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x47000) = 0xb6f66000
mmap2(0xb6f68000, 10160, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6f68000
close(3) = 0
munmap(0xb6fd2000, 4096) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=295883, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=295883, ...}) = 0
close(3) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=41819, ...}) = 0
close(3) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=41819, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=295883, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=295883, ...}) = 0
close(3) = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=28677, ...}) = 0
open("/lib/libdl.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=12469, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb6fd2000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\0\f\0\0004\0\0\0"..., 4096) = 4096
mmap2(NULL, 49152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f0b000
mmap2(0xb6f0b000, 8177, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb6f0b000
mmap2(0xb6f15000, 4277, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0xb6f15000
close(3) = 0
munmap(0xb6fd2000, 4096) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=295883, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=295883, ...}) = 0
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb6fd2000
set_tls(0xb6fd2490, 0xb6fd2b30, 0xb6fd2b38, 0xb6fd2490, 0xb6fd5f74) = 0
mprotect(0xb6fc5000, 4096, PROT_READ) = 0
mprotect(0xb6f82000, 4096, PROT_READ) = 0
mprotect(0xb6f66000, 4096, PROT_READ) = 0
mprotect(0xb6fd5000, 4096, PROT_READ) = 0
mprotect(0xb6f15000, 4096, PROT_READ) = 0
set_tid_address(0xb6fd2068) = 2011
set_robust_list(0xb6fd2070, 12) = 0
rt_sigaction(SIGRTMIN, {0xb6f736f8, [], SA_SIGINFO|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb6f735b4, [], SA_RESTART|SA_SIGINFO|0x4000000}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192_1024, rlim_max=RLIM_INFINITY}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B115200 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B115200 opost isig icanon echo ...}) = 0
brk(0) = 0x79000
brk(0x7a000) = 0x7a000
open("/etc/netdata/netdata.conf", O_RDONLY) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0xbeb807d4) = -1 ENOTTY (Inappropriate ioctl for device)
brk(0x7b000) = 0x7b000
read(3, "[global]\n\trun as user = nobody\n\t"..., 4096) = 250
read(3, "", 4096) = 0
close(3) = 0
chdir("/etc/netdata") = 0
open("/etc/netdata", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
close(3) = 0
chdir("/usr/lib/netdata/plugins.d") = 0
open("/usr/lib/netdata/plugins.d", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=245, ...}) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
close(3) = 0
chdir("/usr/share/netdata/web") = 0
open("/usr/share/netdata/web", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=419, ...}) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
close(3) = 0
chdir("/var/cache/netdata") = 0
open("/var/cache/netdata", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=40, ...}) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
brk(0x7c000) = 0x7c000
close(3) = 0
chdir("/var/lib/netdata") = 0
open("/var/lib/netdata", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=40, ...}) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
close(3) = 0
chdir("/var/log/netdata") = 0
open("/var/log/netdata", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=40, ...}) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
close(3) = 0
chdir("/etc/netdata") = 0
uname({sys="Linux", node="OpenWrt", ...}) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], NULL, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, ~[RTMIN RT_1], 0x4000000 /* SA??? /}, NULL, 8) = 0
rt_sigaction(SIGINT, {0xde30, ~[RTMIN RT_1], 0x4000000 / SA_??? /}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0xde30, ~[RTMIN RT_1], 0x4000000 / SA_??? /}, NULL, 8) = 0
rt_sigaction(SIGHUP, {0xde94, ~[RTMIN RT_1], 0x4000000 / SA_??? /}, NULL, 8) = 0
rt_sigaction(SIGUSR1, {0xdee0, ~[RTMIN RT_1], 0x4000000 / SA_??? /}, NULL, 8) = 0
rt_sigaction(SIGUSR2, {0xdf2c, ~[RTMIN RT_1], 0x4000000 / SA_??? */}, NULL, 8) = 0
getuid32() = 0
open("/etc/passwd", O_RDONLY) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0xbeb827b4) = -1 ENOTTY (Inappropriate ioctl for device)
read(3, "root:x:0:0:root:/root:/bin/ash\nd"..., 4096) = 416
close(3) = 0
open("/etc/group", O_RDONLY) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0xbeb827b4) = -1 ENOTTY (Inappropriate ioctl for device)
read(3, "root:x:0:mvsysem,mvsys\ndaemon:x:"..., 4096) = 220
close(3) = 0
open("/etc/gai.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 3
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(3, SOL_IPV6, IPV6_V6ONLY, [1], 4) = 0
bind(3, {sa_family=AF_INET6, sin6_port=htons(19999), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
listen(3, 100) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(4, {sa_family=AF_INET, sin_port=htons(19999), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
listen(4, 100) = 0
open("/dev/null", O_WRONLY|O_CREAT|O_APPEND, 0664) = 5
dup2(5, 0) = 0
close(5) = 0
open("/dev/null", O_WRONLY|O_CREAT|O_APPEND, 0664) = 5
dup2(5, 1) = 1
close(5) = 0
open("/dev/null", O_WRONLY|O_CREAT|O_APPEND, 0664) = 5
dup2(5, 2) = 2
close(5) = 0
open("/dev/null", O_WRONLY|O_CREAT|O_APPEND, 0664) = 5
fcntl(5, F_GETFL) = 0x401 (flags O_WRONLY|O_APPEND)
ioctl(5, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0xbeb827e4) = -1 ENOTTY (Inappropriate ioctl for device)
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb6fd2068) = 2012
exit_group(0) = ?
+++ exited with 0 +++
root@OpenWrt:/#
When running make allnoconfig
followed by make
, I get the following compiler error:
libc/stdlib/malloc/malloc.c: In function'__malloc_from_heap':
libc/stdlib/malloc/malloc.c:127:36: error 'MAP_UNINITIALIZED' undeclared (first use in this function)
MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZED, 0, 0);
^
libc/stdlib/malloc/malloc.c:127:36: note: each undeclared identifier is reported only once for each function it appears in
libc/stdlib/malloc/malloc.c: At top level:
cc1: warning: unrecognized command line option '-Wno-nonnull-compare'
Makerules:368: recipe for target 'libc/stdlib/malloc/malloc.o' failed
make: *** [libc/stdlib/malloc/malloc.0] Error 1
My environment is:
Ubuntu 16.04
gcc 5.4.0
The error I am getting is:
CC libuargp/argp-ba.os
CC libuargp/argp-eexst.os
CC libuargp/argp-fmtstream.os
CC libuargp/argp-fs-xinl.os
CC libuargp/argp-help.os
libuargp/argp-help.c In function '__argp_short_program_name':
libuargp/argp-help.c:1702:4: warning: #warning No reasonable value to return [-Wcpp]
# warning No reasonable value to return
libuargp/argp-help.c: At top level:
cc1: warning: unrecognized command line option '-Wno-nonnull-compare'
CC libuargp/argp-parse.os
libuargp/argp-parse.c: In function 'argp_default_parser':
libuargp/argp-parse.c:116:7: error: 'program_invocation_name' undeclared (first use in this function)
program_invocation_name = arg;
^
libuargp/argp-parse.c:116:7: note: each undeclared identifier is reported only once for each function it appears in
libuargp/argp-parse.c:130:7: error 'program_invocation_short_name' undeclared (first use in this function)
program_invocation_short_name = state->name;
^
libuargp/argp-parse.c: At top level:
cc1: warning: unrecognized command line option '-Wno-nonnull-compare'
Makerules:369: recipe for target 'libuargp/argp-parse.os' failed
make: *** [libuargp/argp-parse.os] Error 1
I've converted from make to CMake (it has better toolchain support - imho). I was trying to compile using clang, but there is at least one nested function in the Native pthread code, in particular allocatestack.c. It would be great to fix these as well, so that we can compile using other compilers.
E.g. mnt->mnt_opts = "rw,relatime,errors=remount-ro", hasmntopt(mnt, MNTOPT_RO) will match "errors".
As a practical matter, e2fsck with uClibc determines that a device mounted with read-write is read-only.
I'm not sure if this is a real problem or just my misunderstanding, but I noticed what I believe should be object files in the libc.a archive. They get compiled but do not appear to get into the archive. There are 45 of them. They are listed below. The configuration I used was with the default values, except for:
Target Architecture (TARGET_X86_64): 29
Enable shared libraries (HAVE_SHARED): n
Thread support: 3 (UCLIBC_HAS_THREADS_NATIVE)
Syslog support (UCLIBC_HAS_SYSLOG): n
Support GNU extensions for error-reporting (UCLIBC_HAS_GNU_ERROR): n
Support fmemopen(), open_memstream(), and fopencookie() (glibc-compat) (UCLIBC_HAS_GLIBC_CUSTOM_STREAMS): y
Include errno message text in the library (UCLIBC_HAS_ERRNO_MESSAGES): n
Include signum message text in the library (UCLIBC_HAS_SIGNUM_MESSAGES): n
I need to be able to test the build of uClibc, where only the static library libc.a is built (and not installed). Is there such a thing? Thanks.
I'm attempting to build uClibc from scratch using a combination of CMake and clang and/or gcc. I'd like to test my builds and have the uclibc-ng-test respository. I'd prefer not to actually install the libraries, but I want the build for the test code to use the code from the directory where I built it. I've tried using LD_LIBRARY_PATH, but want to see what would be the best way to do this and not use the libraries that are actually installed. Any direction someone can give me would be greatly appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.