Needs porting to musl
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 189
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
My plan for the weekend was/is to investigate how much work is needed to port to musl. I was expecting most of the time to be spent on the testsuite, but we fail to build:
cmd/bpf_dump.c: In function 'readBPFFile':
cmd/bpf_dump.c:23:19: error: implicit declaration of function 'open64'; did you mean 'openat'? [-Wimplicit-function-declaration]
23 | if ((fd = open64(fn, O_RDONLY)) == -1) {
| ^~~~~~
| openat
from test/triggers/libproc-pldd.c:14:
include/rtld_db.h:68:9: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
68 | Lmid_t rl_lmident; /* ident of link map */
| ^~~~~~
| id_t
test/triggers/libproc-lookup-victim.c: In function 'main':
test/triggers/libproc-lookup-victim.c:57:34: error: implicit declaration of function 'dlmopen'; did you mean 'dlopen'? [-Wimplicit-function-declaration]
57 | dlmopen_handle = dlmopen(LM_ID_NEWLM,
| ^~~~~~~
| dlopen
test/triggers/libproc-lookup-victim.c:57:42: error: 'LM_ID_NEWLM' undeclared (first use in this function)
57 | dlmopen_handle = dlmopen(LM_ID_NEWLM,
| ^~~~~~~~~~~
test/triggers/libproc-lookup-victim.c:57:42: note: each undeclared identifier is reported only once for each function it appears in
test/triggers/libproc-dlmadopen.c: In function 'churn':
test/triggers/libproc-dlmadopen.c:30:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
30 | Lmid_t lmids[6] = {0};
| ^~~~~~
| gid_t
make: *** [Makerules:31: /var/tmp/portage/dev-debug/dtrace-2.0.1.1-r1/work/dtrace-utils-2.0.1.1/build/test-triggers--libproc-lookup-victim.o] Error 1
test/triggers/libproc-dlmadopen.c:54:36: error: 'LM_ID_NEWLM' undeclared (first use in this function)
54 | lmids[n] = LM_ID_NEWLM;
| ^~~~~~~~~~~
test/triggers/libproc-dlmadopen.c:54:36: note: each undeclared identifier is reported only once for each function it appears in
libproc/libproc.h:130:30: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
130 | typedef long ptrace_fun(enum __ptrace_request request, void *arg, pid_t pid,
| ^~~~~~~~~~~~~~~~
libproc/libproc.h:130:30: warning: 'enum __ptrace_request' declared inside parameter list will not be visible outside of this definition or declaration
libdtrace/drti.c:73:1: warning: constructor priorities from 0 to 100 are reserved for the implementation [-Wprio-ctor-dtor]
73 | {
| ^
test/triggers/libproc-dlmadopen.c:68:37: error: implicit declaration of function 'dlmopen'; did you mean 'dlopen'? [-Wimplicit-function-declaration]
68 | loaded[n] = dlmopen(lmids[n], "test/triggers/libproc-dlmlib.so.0", RTLD_NOW);
| ^~~~~~~
| dlopen
test/triggers/libproc-dlmadopen.c:68:35: error: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
68 | loaded[n] = dlmopen(lmids[n], "test/triggers/libproc-dlmlib.so.0", RTLD_NOW);
| ^
libdtrace/drti.c: In function 'dtrace_dof_init':
libdtrace/drti.c:81:9: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
81 | Lmid_t lmid = -1;
| ^~~~~~
| id_t
libproc/libproc.h:245:9: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
245 | Lmid_t prs_lmid; /* link map id */
| ^~~~~~
| id_t
libdtrace/drti.c:198:26: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'int' [-Wformat=]
198 | "LM%lu`%s", lmid, modname);
| ~~^ ~~~~
| | |
| | int
| long unsigned int
| %u
libproc/libproc.h:251:5: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
251 | Lmid_t, const char *, const char *, GElf_Sym *, prsyminfo_t *);
| ^~~~~~
| id_t
libproc/libproc.h:260:5: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
260 | Lmid_t, const char *);
| ^~~~~~
| id_t
libproc/libproc.h:266:53: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
266 | extern int Plmid(struct ps_prochandle *, uintptr_t, Lmid_t *);
| ^~~~~~
| id_t
test/triggers/libproc-pldd.c: In function 'print_ldd':
test/triggers/libproc-pldd.c:50:51: warning: format '%li' expects argument of type 'long int', but argument 5 has type 'int' [-Wformat=]
50 | printf("%s: dyn 0x%lx, bias 0x%lx, LMID %li: %s (", buf, loadobj->rl_dyn,
| ~~^
| |
| long int
| %i
51 | loadobj->rl_diff_addr, loadobj->rl_lmident, loadobj->rl_default_scope ?
| ~~~~~~~~~~~~~~~~~~~
| |
| int
make: *** [Makerules:31: /var/tmp/portage/dev-debug/dtrace-2.0.1.1-r1/work/dtrace-utils-2.0.1.1/build/test-triggers--libproc-dlmadopen.o] Error 1
In file included from libproc/libproc.h:25,
from test/triggers/libproc-lookup-by-name.c:15:
include/rtld_db.h:68:9: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
68 | Lmid_t rl_lmident; /* ident of link map */
| ^~~~~~
| id_t
test/utils/showUSDT.c: In function 'readObj':
test/utils/showUSDT.c:343:15: error: implicit declaration of function 'open64'; did you mean 'openat'? [-Wimplicit-function-declaration]
343 | if ((fd = open64(fn, O_RDONLY)) == -1) {
| ^~~~~~
| openat
make: *** [libdtrace/Build:249: /var/tmp/portage/dev-debug/dtrace-2.0.1.1-r1/work/dtrace-utils-2.0.1.1/build/drti.o] Error 1
In file included from libproc/libproc.h:25,
from test/triggers/libproc-consistency.c:15:
include/rtld_db.h:68:9: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
68 | Lmid_t rl_lmident; /* ident of link map */
| ^~~~~~
| id_t
make: *** [Makerules:31: /var/tmp/portage/dev-debug/dtrace-2.0.1.1-r1/work/dtrace-utils-2.0.1.1/build/test-triggers--libproc-pldd.o] Error 1
In file included from libproc/libproc.h:25,
from test/triggers/libproc-execing-bkpts.c:15:
include/rtld_db.h:68:9: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
68 | Lmid_t rl_lmident; /* ident of link map */
| ^~~~~~
| id_t
libproc/libproc.h:130:30: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
130 | typedef long ptrace_fun(enum __ptrace_request request, void *arg, pid_t pid,
| ^~~~~~~~~~~~~~~~
libproc/libproc.h:130:30: warning: 'enum __ptrace_request' declared inside parameter list will not be visible outside of this definition or declaration
libproc/libproc.h:245:9: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
245 | Lmid_t prs_lmid; /* link map id */
| ^~~~~~
| id_t
libproc/libproc.h:251:5: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
251 | Lmid_t, const char *, const char *, GElf_Sym *, prsyminfo_t *);
| ^~~~~~
| id_t
make: *** [Makerules:31: /var/tmp/portage/dev-debug/dtrace-2.0.1.1-r1/work/dtrace-utils-2.0.1.1/build/test-utils--showUSDT.o] Error 1
libproc/libproc.h:260:5: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
260 | Lmid_t, const char *);
| ^~~~~~
| id_t
libproc/libproc.h:266:53: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
266 | extern int Plmid(struct ps_prochandle *, uintptr_t, Lmid_t *);
| ^~~~~~
| id_t
test/triggers/libproc-lookup-by-name.c: In function 'main':
test/triggers/libproc-lookup-by-name.c:32:9: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
32 | Lmid_t lmid;
| ^~~~~~
| id_t
libproc/libproc.h:130:30: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
130 | typedef long ptrace_fun(enum __ptrace_request request, void *arg, pid_t pid,
| ^~~~~~~~~~~~~~~~
libproc/libproc.h:130:30: warning: 'enum __ptrace_request' declared inside parameter list will not be visible outside of this definition or declaration
In file included from libproc/libproc.h:25,
from dtprobed/dtprobed.c:71:
include/rtld_db.h:68:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
68 | Lmid_t rl_lmident; /* ident of link map */
| ^~~~~~
| gid_t
libproc/libproc.h:245:9: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
245 | Lmid_t prs_lmid; /* link map id */
| ^~~~~~
| id_t
libproc/libproc.h:251:5: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
251 | Lmid_t, const char *, const char *, GElf_Sym *, prsyminfo_t *);
| ^~~~~~
| id_t
libproc/libproc.h:260:5: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
260 | Lmid_t, const char *);
| ^~~~~~
| id_t
test/triggers/libproc-lookup-by-name.c:65:13: error: implicit declaration of function 'Pxlookup_by_name'; did you mean 'ctf_lookup_by_name'? [-Wimplicit-function-declaration]
65 | if (Pxlookup_by_name(P, lmid, PR_OBJ_EVERY, symbol, &sym, &sip) != 0) {
| ^~~~~~~~~~~~~~~~
| ctf_lookup_by_name
libproc/libproc.h:130:30: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
130 | typedef long ptrace_fun(enum __ptrace_request request, void *arg, pid_t pid,
| ^~~~~~~~~~~~~~~~
libproc/libproc.h:130:30: warning: 'enum __ptrace_request' declared inside parameter list will not be visible outside of this definition or declaration
libproc/libproc.h:266:53: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
266 | extern int Plmid(struct ps_prochandle *, uintptr_t, Lmid_t *);
| ^~~~~~
| id_t
test/triggers/libproc-consistency.c: In function 'print_ldd':
test/triggers/libproc-consistency.c:64:59: warning: format '%li' expects argument of type 'long int', but argument 5 has type 'int' [-Wformat=]
64 | printf("%s: dyn 0x%lx, bias 0x%lx, LMID %li\n", buf, loadobj->rl_dyn,
| ~~^
| |
| long int
| %i
65 | loadobj->rl_diff_addr, loadobj->rl_lmident);
| ~~~~~~~~~~~~~~~~~~~
| |
| int
libproc/libproc.h:245:9: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
245 | Lmid_t prs_lmid; /* link map id */
| ^~~~~~
| id_t
libproc/libproc.h:232:27: error: 'Lmid_t' undeclared (first use in this function); did you mean 'id_t'?
232 | #define PR_LMID_EVERY ((Lmid_t)-1UL) /* search every link map */
| ^~~~~~
test/triggers/libproc-lookup-by-name.c:70:21: note: in expansion of macro 'PR_LMID_EVERY'
70 | if (lmid != PR_LMID_EVERY && sip.prs_lmid != lmid)
| ^~~~~~~~~~~~~
libproc/libproc.h:232:27: note: each undeclared identifier is reported only once for each function it appears in
232 | #define PR_LMID_EVERY ((Lmid_t)-1UL) /* search every link map */
| ^~~~~~
test/triggers/libproc-lookup-by-name.c:70:21: note: in expansion of macro 'PR_LMID_EVERY'
70 | if (lmid != PR_LMID_EVERY && sip.prs_lmid != lmid)
| ^~~~~~~~~~~~~
test/triggers/libproc-lookup-by-name.c:71:63: warning: format '%li' expects argument of type 'long int', but argument 3 has type 'int' [-Wformat=]
71 | fprintf(stderr, "lmid error: asked for lmid %li, got back sym "
| ~~^
| |
| long int
| %i
72 | "in lmid %li\n", lmid, sip.prs_lmid);
| ~~~~
| |
| int
test/triggers/libproc-lookup-by-name.c:71:33: warning: format '%li' expects argument of type 'long int', but argument 4 has type 'int' [-Wformat=]
71 | fprintf(stderr, "lmid error: asked for lmid %li, got back sym "
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72 | "in lmid %li\n", lmid, sip.prs_lmid);
| ~~~~~~~~~~~~
| |
| int
test/triggers/libproc-lookup-by-name.c:72:32: note: format string is defined here
72 | "in lmid %li\n", lmid, sip.prs_lmid);
| ~~^
| |
| long int
| %i
libproc/libproc.h:251:5: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
251 | Lmid_t, const char *, const char *, GElf_Sym *, prsyminfo_t *);
| ^~~~~~
| id_t
libproc/libproc.h:260:5: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
260 | Lmid_t, const char *);
| ^~~~~~
| id_t
make: *** [Makerules:31: /var/tmp/portage/dev-debug/dtrace-2.0.1.1-r1/work/dtrace-utils-2.0.1.1/build/test-triggers--libproc-consistency.o] Error 1
libproc/libproc.h:130:30: warning: 'enum __ptrace_request' declared inside parameter list will not be visible outside of this definition or declaration
130 | typedef long ptrace_fun(enum __ptrace_request request, void *arg, pid_t pid,
| ^~~~~~~~~~~~~~~~
libproc/libproc.h:266:53: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
266 | extern int Plmid(struct ps_prochandle *, uintptr_t, Lmid_t *);
| ^~~~~~
| id_t
make: *** [Makerules:31: /var/tmp/portage/dev-debug/dtrace-2.0.1.1-r1/work/dtrace-utils-2.0.1.1/build/test-triggers--libproc-lookup-by-name.o] Error 1
libproc/libproc.h:245:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
245 | Lmid_t prs_lmid; /* link map id */
| ^~~~~~
| gid_t
libproc/libproc.h:251:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
251 | Lmid_t, const char *, const char *, GElf_Sym *, prsyminfo_t *);
| ^~~~~~
| gid_t
test/triggers/libproc-execing-bkpts.c: In function 'main':
test/triggers/libproc-execing-bkpts.c:104:22: error: implicit declaration of function 'Pxlookup_by_name'; did you mean 'ctf_lookup_by_name'? [-Wimplicit-function-declaration]
104 | if ((Pxlookup_by_name(P, PR_LMID_EVERY, PR_OBJ_EVERY, symbol, &sym, &sip) != 0) &&
| ^~~~~~~~~~~~~~~~
| ctf_lookup_by_name
In file included from libdtrace/dt_proc.h:13,
from libdtrace/dt_impl.h:46,
from libdtrace/dt_buf.c:21:
include/rtld_db.h:68:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
68 | Lmid_t rl_lmident; /* ident of link map */
| ^~~~~~
| gid_t
libproc/libproc.h:232:27: error: 'Lmid_t' undeclared (first use in this function); did you mean 'id_t'?
232 | #define PR_LMID_EVERY ((Lmid_t)-1UL) /* search every link map */
| ^~~~~~
test/triggers/libproc-execing-bkpts.c:104:42: note: in expansion of macro 'PR_LMID_EVERY'
104 | if ((Pxlookup_by_name(P, PR_LMID_EVERY, PR_OBJ_EVERY, symbol, &sym, &sip) != 0) &&
| ^~~~~~~~~~~~~
libproc/libproc.h:232:27: note: each undeclared identifier is reported only once for each function it appears in
232 | #define PR_LMID_EVERY ((Lmid_t)-1UL) /* search every link map */
| ^~~~~~
test/triggers/libproc-execing-bkpts.c:104:42: note: in expansion of macro 'PR_LMID_EVERY'
104 | if ((Pxlookup_by_name(P, PR_LMID_EVERY, PR_OBJ_EVERY, symbol, &sym, &sip) != 0) &&
| ^~~~~~~~~~~~~
In file included from <stdin>:8:
include/sys/glibc_internal_link.h:64:3: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
64 | Lmid_t l_ns;
| ^~~~~~
| gid_t
libproc/libproc.h:260:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
260 | Lmid_t, const char *);
| ^~~~~~
| gid_t
<stdin>: In function 'main':
<stdin>:27:9: warning: format '%li' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=]
libproc/libproc.h:266:53: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
266 | extern int Plmid(struct ps_prochandle *, uintptr_t, Lmid_t *);
| ^~~~~~
| gid_t
In file included from libdtrace/dt_proc.h:13,
from libdtrace/dt_impl.h:46,
from libdtrace/dt_as.c:13:
include/rtld_db.h:68:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
68 | Lmid_t rl_lmident; /* ident of link map */
| ^~~~~~
| gid_t
In file included from libdtrace/dt_proc.h:14:
libproc/libproc.h:130:30: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
130 | typedef long ptrace_fun(enum __ptrace_request request, void *arg, pid_t pid,
| ^~~~~~~~~~~~~~~~
libproc/libproc.h:130:30: warning: 'enum __ptrace_request' declared inside parameter list will not be visible outside of this definition or declaration
make: *** [Makerules:31: /var/tmp/portage/dev-debug/dtrace-2.0.1.1-r1/work/dtrace-utils-2.0.1.1/build/test-triggers--libproc-execing-bkpts.o] Error 1
make: *** [libproc/Build:21: /var/tmp/portage/dev-debug/dtrace-2.0.1.1-r1/work/dtrace-utils-2.0.1.1/build/rtld_offsets.stamp] Error 1
libproc/libproc.h:245:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
245 | Lmid_t prs_lmid; /* link map id */
| ^~~~~~
| gid_t
libproc/libproc.h:251:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
251 | Lmid_t, const char *, const char *, GElf_Sym *, prsyminfo_t *);
| ^~~~~~
| gid_t
In file included from libdtrace/dt_proc.h:14:
libproc/libproc.h:130:30: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
130 | typedef long ptrace_fun(enum __ptrace_request request, void *arg, pid_t pid,
| ^~~~~~~~~~~~~~~~
libproc/libproc.h:130:30: warning: 'enum __ptrace_request' declared inside parameter list will not be visible outside of this definition or declaration
libproc/libproc.h:260:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
260 | Lmid_t, const char *);
| ^~~~~~
| gid_t
libproc/libproc.h:245:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
245 | Lmid_t prs_lmid; /* link map id */
| ^~~~~~
| gid_t
libproc/libproc.h:266:53: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
266 | extern int Plmid(struct ps_prochandle *, uintptr_t, Lmid_t *);
| ^~~~~~
| gid_t
libdtrace/dt_proc.h:85:30: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
85 | enum __ptrace_request request;
| ^~~~~~~~~~~~~~~~
libdtrace/dt_proc.h:85:47: error: field 'request' has incomplete type
85 | enum __ptrace_request request;
| ^~~~~~~
libproc/libproc.h:251:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
251 | Lmid_t, const char *, const char *, GElf_Sym *, prsyminfo_t *);
| ^~~~~~
| gid_t
libdtrace/dt_proc.h:157:62: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
157 | extern const prmap_t *dt_Plmid_to_map(dtrace_hdl_t *, pid_t, Lmid_t,
| ^~~~~~
| gid_t
dtprobed/dtprobed.c: In function 'dof_parser_start':
dtprobed/dtprobed.c:383:17: error: implicit declaration of function 'mallopt'; did you mean 'malloc'? [-Wimplicit-function-declaration]
383 | mallopt(M_MMAP_MAX, 0);
| ^~~~~~~
| malloc
libdtrace/dt_proc.h:161:55: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
161 | extern int dt_Plmid(dtrace_hdl_t *, pid_t, uintptr_t, Lmid_t *);
| ^~~~~~
| gid_t
libproc/libproc.h:260:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
260 | Lmid_t, const char *);
| ^~~~~~
| gid_t
libdtrace/dt_proc.h:163:55: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
163 | extern int dt_Pxlookup_by_name(dtrace_hdl_t *, pid_t, Lmid_t, const char *,
| ^~~~~~
| gid_t
libproc/libproc.h:266:53: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
266 | extern int Plmid(struct ps_prochandle *, uintptr_t, Lmid_t *);
| ^~~~~~
| gid_t
libdtrace/dt_proc.h:85:30: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
85 | enum __ptrace_request request;
| ^~~~~~~~~~~~~~~~
libdtrace/dt_proc.h:85:47: error: field 'request' has incomplete type
85 | enum __ptrace_request request;
| ^~~~~~~
libdtrace/dt_proc.h:157:62: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
157 | extern const prmap_t *dt_Plmid_to_map(dtrace_hdl_t *, pid_t, Lmid_t,
| ^~~~~~
| gid_t
In file included from libdtrace/dt_proc.h:13,
from libdtrace/dt_impl.h:46,
from libdtrace/dt_provider.h:12,
from libdtrace/dt_cc.c:83:
include/rtld_db.h:68:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
68 | Lmid_t rl_lmident; /* ident of link map */
| ^~~~~~
| gid_t
In file included from libdtrace/dt_proc.h:13,
from libdtrace/dt_impl.h:46,
from libdtrace/dt_btf.c:15:
include/rtld_db.h:68:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
68 | Lmid_t rl_lmident; /* ident of link map */
| ^~~~~~
| gid_t
dtprobed/dtprobed.c:383:25: error: 'M_MMAP_MAX' undeclared (first use in this function)
383 | mallopt(M_MMAP_MAX, 0);
| ^~~~~~~~~~
dtprobed/dtprobed.c:383:25: note: each undeclared identifier is reported only once for each function it appears in
In file included from libdtrace/dt_proc.h:13,
from libdtrace/dt_impl.h:46,
from libdtrace/dt_bpf.c:15:
include/rtld_db.h:68:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
68 | Lmid_t rl_lmident; /* ident of link map */
| ^~~~~~
| gid_t
In file included from libdtrace/dt_proc.h:14:
libproc/libproc.h:130:30: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
130 | typedef long ptrace_fun(enum __ptrace_request request, void *arg, pid_t pid,
| ^~~~~~~~~~~~~~~~
libproc/libproc.h:130:30: warning: 'enum __ptrace_request' declared inside parameter list will not be visible outside of this definition or declaration
libdtrace/dt_proc.h:161:55: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
161 | extern int dt_Plmid(dtrace_hdl_t *, pid_t, uintptr_t, Lmid_t *);
| ^~~~~~
| gid_t
libproc/libproc.h:245:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
245 | Lmid_t prs_lmid; /* link map id */
| ^~~~~~
| gid_t
make: *** [Makerules:14: /var/tmp/portage/dev-debug/dtrace-2.0.1.1-r1/work/dtrace-utils-2.0.1.1/build/libdtrace--dt_buf.o] Error 1
libproc/libproc.h:251:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
251 | Lmid_t, const char *, const char *, GElf_Sym *, prsyminfo_t *);
| ^~~~~~
| gid_t
libdtrace/dt_proc.h:163:55: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
163 | extern int dt_Pxlookup_by_name(dtrace_hdl_t *, pid_t, Lmid_t, const char *,
| ^~~~~~
| gid_t
In file included from libdtrace/dt_proc.h:14:
libproc/libproc.h:130:30: warning: 'enum __ptrace_request' declared inside parameter list will not be visible outside of this definition or declaration
130 | typedef long ptrace_fun(enum __ptrace_request request, void *arg, pid_t pid,
| ^~~~~~~~~~~~~~~~
libproc/libproc.h:260:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
260 | Lmid_t, const char *);
| ^~~~~~
| gid_t
In file included from libdtrace/dt_proc.h:14:
libproc/libproc.h:130:30: warning: 'enum __ptrace_request' declared inside parameter list will not be visible outside of this definition or declaration
130 | typedef long ptrace_fun(enum __ptrace_request request, void *arg, pid_t pid,
| ^~~~~~~~~~~~~~~~
In file included from libdtrace/dt_proc.h:13,
from libdtrace/dt_impl.h:46,
from libdtrace/dt_cg.c:18:
include/rtld_db.h:68:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
68 | Lmid_t rl_lmident; /* ident of link map */
| ^~~~~~
| gid_t
libproc/libproc.h:266:53: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
266 | extern int Plmid(struct ps_prochandle *, uintptr_t, Lmid_t *);
| ^~~~~~
| gid_t
libdtrace/dt_proc.h:85:30: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
85 | enum __ptrace_request request;
| ^~~~~~~~~~~~~~~~
libdtrace/dt_proc.h:85:47: error: field 'request' has incomplete type
85 | enum __ptrace_request request;
| ^~~~~~~
libproc/libproc.h:245:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
245 | Lmid_t prs_lmid; /* link map id */
| ^~~~~~
| gid_t
libproc/libproc.h:245:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
245 | Lmid_t prs_lmid; /* link map id */
| ^~~~~~
| gid_t
libproc/libproc.h:251:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
251 | Lmid_t, const char *, const char *, GElf_Sym *, prsyminfo_t *);
| ^~~~~~
| gid_t
dtprobed/dtprobed.c:384:25: error: 'M_TRIM_THRESHOLD' undeclared (first use in this function)
384 | mallopt(M_TRIM_THRESHOLD, -1);
| ^~~~~~~~~~~~~~~~
libdtrace/dt_proc.h:157:62: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
157 | extern const prmap_t *dt_Plmid_to_map(dtrace_hdl_t *, pid_t, Lmid_t,
| ^~~~~~
| gid_t
libproc/libproc.h:251:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
251 | Lmid_t, const char *, const char *, GElf_Sym *, prsyminfo_t *);
| ^~~~~~
| gid_t
libdtrace/dt_proc.h:161:55: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
161 | extern int dt_Plmid(dtrace_hdl_t *, pid_t, uintptr_t, Lmid_t *);
| ^~~~~~
| gid_t
In file included from libdtrace/dt_proc.h:14:
libproc/libproc.h:130:30: warning: 'enum __ptrace_request' declared inside parameter list will not be visible outside of this definition or declaration
130 | typedef long ptrace_fun(enum __ptrace_request request, void *arg, pid_t pid,
| ^~~~~~~~~~~~~~~~
libproc/libproc.h:260:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
260 | Lmid_t, const char *);
| ^~~~~~
| gid_t
libproc/libproc.h:260:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
260 | Lmid_t, const char *);
| ^~~~~~
| gid_t
libdtrace/dt_proc.h:163:55: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
163 | extern int dt_Pxlookup_by_name(dtrace_hdl_t *, pid_t, Lmid_t, const char *,
| ^~~~~~
| gid_t
libproc/libproc.h:266:53: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
266 | extern int Plmid(struct ps_prochandle *, uintptr_t, Lmid_t *);
| ^~~~~~
| gid_t
libproc/libproc.h:266:53: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
266 | extern int Plmid(struct ps_prochandle *, uintptr_t, Lmid_t *);
| ^~~~~~
| gid_t
libdtrace/dt_proc.h:85:47: error: field 'request' has incomplete type
85 | enum __ptrace_request request;
| ^~~~~~~
libdtrace/dt_proc.h:85:47: error: field 'request' has incomplete type
85 | enum __ptrace_request request;
| ^~~~~~~
libproc/libproc.h:245:9: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
245 | Lmid_t prs_lmid; /* link map id */
| ^~~~~~
| gid_t
In file included from libdtrace/dt_proc.h:13,
from libdtrace/dt_impl.h:46,
from libdtrace/dt_aggregate.c:11:
include/rtld_db.h:68:9: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
68 | Lmid_t rl_lmident; /* ident of link map */
| ^~~~~~
| id_t
libdtrace/dt_proc.h:157:62: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
157 | extern const prmap_t *dt_Plmid_to_map(dtrace_hdl_t *, pid_t, Lmid_t,
| ^~~~~~
| gid_t
libdtrace/dt_proc.h:157:62: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
157 | extern const prmap_t *dt_Plmid_to_map(dtrace_hdl_t *, pid_t, Lmid_t,
| ^~~~~~
| gid_t
libproc/libproc.h:251:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
251 | Lmid_t, const char *, const char *, GElf_Sym *, prsyminfo_t *);
| ^~~~~~
| gid_t
dtprobed/dtprobed.c: In function 'mapping_dev_inums':
libdtrace/dt_proc.h:161:55: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
161 | extern int dt_Plmid(dtrace_hdl_t *, pid_t, uintptr_t, Lmid_t *);
| ^~~~~~
| gid_t
dtprobed/dtprobed.c:465:21: error: implicit declaration of function 'Plmid_to_map'; did you mean 'Pname_to_map'? [-Wimplicit-function-declaration]
465 | exec_mapp = Plmid_to_map(P, LM_ID_BASE, PR_OBJ_EXEC);
| ^~~~~~~~~~~~
| Pname_to_map
libdtrace/dt_proc.h:161:55: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
161 | extern int dt_Plmid(dtrace_hdl_t *, pid_t, uintptr_t, Lmid_t *);
| ^~~~~~
| gid_t
libproc/libproc.h:260:5: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
260 | Lmid_t, const char *);
| ^~~~~~
| gid_t
libdtrace/dt_proc.h:163:55: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
163 | extern int dt_Pxlookup_by_name(dtrace_hdl_t *, pid_t, Lmid_t, const char *,
| ^~~~~~
| gid_t
libdtrace/dt_proc.h:163:55: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
163 | extern int dt_Pxlookup_by_name(dtrace_hdl_t *, pid_t, Lmid_t, const char *,
| ^~~~~~
| gid_t
In file included from libdtrace/dt_proc.h:14:
libproc/libproc.h:130:30: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
130 | typedef long ptrace_fun(enum __ptrace_request request, void *arg, pid_t pid,
| ^~~~~~~~~~~~~~~~
libproc/libproc.h:266:53: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
266 | extern int Plmid(struct ps_prochandle *, uintptr_t, Lmid_t *);
| ^~~~~~
| gid_t
libproc/libproc.h:130:30: warning: 'enum __ptrace_request' declared inside parameter list will not be visible outside of this definition or declaration
libdtrace/dt_proc.h:85:47: error: field 'request' has incomplete type
85 | enum __ptrace_request request;
| ^~~~~~~
libproc/libproc.h:245:9: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
245 | Lmid_t prs_lmid; /* link map id */
| ^~~~~~
| id_t
libdtrace/dt_proc.h:157:62: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
157 | extern const prmap_t *dt_Plmid_to_map(dtrace_hdl_t *, pid_t, Lmid_t,
| ^~~~~~
| gid_t
libproc/libproc.h:251:5: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
251 | Lmid_t, const char *, const char *, GElf_Sym *, prsyminfo_t *);
| ^~~~~~
| id_t
libdtrace/dt_proc.h:161:55: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
161 | extern int dt_Plmid(dtrace_hdl_t *, pid_t, uintptr_t, Lmid_t *);
| ^~~~~~
| gid_t
dtprobed/dtprobed.c:465:37: error: 'LM_ID_BASE' undeclared (first use in this function)
465 | exec_mapp = Plmid_to_map(P, LM_ID_BASE, PR_OBJ_EXEC);
| ^~~~~~~~~~
libproc/libproc.h:260:5: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
260 | Lmid_t, const char *);
| ^~~~~~
| id_t
libdtrace/dt_proc.h:163:55: error: unknown type name 'Lmid_t'; did you mean 'gid_t'?
163 | extern int dt_Pxlookup_by_name(dtrace_hdl_t *, pid_t, Lmid_t, const char *,
| ^~~~~~
| gid_t
libproc/libproc.h:266:53: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
266 | extern int Plmid(struct ps_prochandle *, uintptr_t, Lmid_t *);
| ^~~~~~
| id_t
libdtrace/dt_proc.h:85:30: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
85 | enum __ptrace_request request;
| ^~~~~~~~~~~~~~~~
libdtrace/dt_proc.h:85:47: error: field 'request' has incomplete type
85 | enum __ptrace_request request;
| ^~~~~~~
libdtrace/dt_proc.h:157:62: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
157 | extern const prmap_t *dt_Plmid_to_map(dtrace_hdl_t *, pid_t, Lmid_t,
| ^~~~~~
| id_t
libdtrace/dt_proc.h:161:55: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
161 | extern int dt_Plmid(dtrace_hdl_t *, pid_t, uintptr_t, Lmid_t *);
| ^~~~~~
| id_t
libdtrace/dt_proc.h:163:55: error: unknown type name 'Lmid_t'; did you mean 'id_t'?
163 | extern int dt_Pxlookup_by_name(dtrace_hdl_t *, pid_t, Lmid_t, const char *,
| ^~~~~~
| id_t
I'll analyse the failures more, I don't need help at this point (may do later).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the musl build failure and inspect the affected entry points: cmd/bpf_dump.c, include/rtld_db.h, libproc/libproc.h, libdtrace/drti.c, and the listed test/triggers and test/utils files. Determine the compatibility work needed for open64, Lmid_t, and dlmopen, then run the build and testsuite to verify that dtrace-utils builds and its tests execute successfully on musl.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system, operating-systems, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100