make kernel error

Started by moonmoonbird, October 26, 2020, 09:12:58 AM

Previous topic - Next topic
command: make kernel-again

result:


>>> stage 3.1: building everything
--------------------------------------------------------------
In file included from /usr/src/sys/kern/imgact_elf32.c:33:
/usr/src/sys/kern/imgact_elf.c:2682:25: error: use of undeclared identifier 'MAP_ASLR'
        if ((imgp->map_flags & MAP_ASLR) == 0)
                               ^
1 error generated.
--- imgact_elf32.o ---
*** [imgact_elf32.o] Error code 1

make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/SMP
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/src/sys/modules/aac
--- all_subdir_aac ---
*** [all_subdir_aac] Error code 2

make[3]: stopped in /usr/src/sys/modules
1 error

make[3]: stopped in /usr/src/sys/modules
--- modules-all ---
*** [modules-all] Error code 2

make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/SMP
2 errors

make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/SMP
--- buildkernel ---
*** [buildkernel] Error code 2

make[1]: stopped in /usr/src
1 error

make[1]: stopped in /usr/src
--- buildkernel ---
*** [buildkernel] Error code 2

make: stopped in /usr/src
1 error

make: stopped in /usr/src
*** Error code 2

Stop.
make: stopped in /usr/tools


how to make it right , thanks.

This thread is missing to much information. Do you use stock sources? When did it run successfully the last time?

i was originally doing `make prefetch-packages,base,kernel dvd VERSION=20.7`
to make build time shorter. after it successfully generated an iso image, i changed a little bit in config file under tools directory, so i thought make each stage rebuild, so i ran `make base-again`, but it took so long, i interrupt it and ran `make kernel-again`, so error just like that.

Os build from source takes a long time (also depending on your computer hardware).. make sure you do make clean between your runs especially if you had kill the process manually.

Looks like you are trying to build HardenedBSD outside its scope (ASLR off). We really can't help with that.

https://github.com/opnsense/src/blob/master/sys/kern/imgact_elf.c#L2675


Cheers,
Franco

options      PAX
options      PAX_ASLR
options      PAX_HARDENING
options      PAX_SEGVGUARD
options      PAX_INSECURE_MODE
options      PAX_CONTROL_ACL
options      PAX_CONTROL_ACL_OVERRIDE_SUPPORT
options      PAX_CONTROL_EXTATTR
options      PAX_JAIL_SUPPORT


I removed these options in tools/config/20.7/SMP file, maybe it is the reason why program stopped. so we cant build opnsense without PAX, is that right?

Yes, but you can swap for FreeBSD 12.1 code in /usr/src if you want where PAX doesn't exist.


Cheers,
Franco

I removed hardendedBSD options, and compiled successfully, Opnsense can run on it normally.

Hi Franco & moonmoonbird

i have the same error, want to build a custom kernel.
how exactly did you go about downloading the alternative FreeBSD 12.1 sources ?

You write that you have a version without PAX compiled...

Can you tell me;
how did you do that ? via git ?

That would be very helpful,

Thanks Wilbo