Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Build failure for ``no options PTRACE''



OK, I got a build failure for modules:

#   compile  coredump/kern_core.o
/build/netbsd-local/tools/x86_64/amd64/bin/x86_64--netbsd-gcc -O2 -g   -std=gnu99    -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare  -Wsystem-headers   -Wno-traditional   -Wa,--fatal-warnings  -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Werror  -Wno-error=address-of-packed-member   -ffreestanding  -fno-strict-aliasing -Wno-pointer-sign -mno-red-zone -mno-mmx -mno-sse -mno-avx -msoft-float -mcmodel=kernel -fno-omit-frame-pointer   -I/build/netbsd-local/src/common/include -DDIAGNOSTIC --sysroot=/build/netbsd-local/dest/amd64 -I/build/netbsd-local/src/common/include -DDIAGNOSTIC  -nostdinc -I. -I/build/netbsd-local/src/sys/modules/coredump -isystem /build/netbsd-local/src/sys -isystem /build/netbsd-local/src/sys/arch -isystem /build/netbsd-local/src/sys/../common/include -D_KERNEL -D_MODULE -DSYSCTL_INCLUDE_DESCR -c  -Wno-cast-function-type    /build/netbsd-local/src/sys/kern/kern_
core.c
In file included from /build/netbsd-local/src/sys/sys/compat_stub.h:35,
                 from /build/netbsd-local/src/sys/kern/kern_core.c:53:
/build/netbsd-local/src/sys/kern/kern_core.c: In function 'coredump_modcmd':
/build/netbsd-local/src/sys/kern/kern_core.c:80:40: error: 'real_coredump_elf32' undeclared (first use in this function); did you mean 'real_coredump_netbsd'?
   80 |   MODULE_HOOK_SET(coredump_elf32_hook, real_coredump_elf32);
      |                                        ^~~~~~~~~~~~~~~~~~~
/build/netbsd-local/src/sys/kern/kern_core.c:80:40: note: each undeclared identifier is reported only once for each function it appears in
/build/netbsd-local/src/sys/kern/kern_core.c:81:40: error: 'real_coredump_elf64' undeclared (first use in this function); did you mean 'real_coredump_netbsd'?
   81 |   MODULE_HOOK_SET(coredump_elf64_hook, real_coredump_elf64);
      |                                        ^~~~~~~~~~~~~~~~~~~
*** [kern_core.o] Error code 1
nbmake[2]: stopped in /build/netbsd-local/src/sys/modules/coredump
1 error
nbmake[2]: stopped in /build/netbsd-local/src/sys/modules/coredump

ERROR: Failed to make dependall in "sys/modules"
*** BUILD ABORTED ***




On Sat, 17 Oct 2020, Paul Goyette wrote:

Oh, ignore this for now.  I might have to also rebuild my modules again.

On Sat, 17 Oct 2020, Paul Goyette wrote:

On Sat, 17 Oct 2020, Paul Goyette wrote:

Thanks - I'll give it a try.

OK, it builds.  But it doesn't work, and least not completely!

FWIW, in addition to

	no options COREDUMP
	no options PTRACE

my custom kernel also has

	no options EXEC_ELF32
	no options EXEC_ELF64

These modules are expected to be auto-loaded as necessary.

It seems that the exec_elf* modules fail to load, since the symbol
coredump_elf{32,64} is already defined in the kernel, even though
I have the ``no options EXEC_ELF*'' in the config.

...
[   8.0347157] init: copying out path `/sbin/init' 11
[ 8.0544213] kobj_checksyms, 1026: [%M/exec_elf32/exec_elf32.kmod]: linker error: global symbol `coredump_elf32' redefined [ 8.0544213] WARNING: module error: vfs load failed for `exec_elf32', error 8 [ 8.0544213] kobj_checksyms, 1026: [%M/exec_elf64/exec_elf64.kmod]: linker error: global symbol `coredump_elf64' redefined [ 8.0544213] WARNING: module error: vfs load failed for `exec_elf64', error 8
...


+--------------------+--------------------------+-----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost     |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost   |
+--------------------+--------------------------+-----------------------+





+--------------------+--------------------------+-----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost     |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost   |
+--------------------+--------------------------+-----------------------+

!DSPAM:5f8b271b6532105318807!



+--------------------+--------------------------+-----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost     |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost   |
+--------------------+--------------------------+-----------------------+


Home | Main Index | Thread Index | Old Index