Re: buildkernel with PORTS_MODULES fails: Variable OBJTOP is recursive

From: Ian FREISLICH <ian.freislich_at_capeaugusta.com>
Date: Thu, 15 Feb 2018 13:46:03 -0500
On 02/14/18 03:42, Vladimir Zakharov wrote:
> On Tue, Feb 13, 2018, Bryan Drewery wrote:
>> On 2/13/2018 1:48 AM, Vladimir Zakharov wrote:
>>> On Mon, Feb 12, 2018, Bryan Drewery wrote:
>>>> On 2/12/2018 6:54 AM, Vladimir Zakharov wrote:
>>>>> Hello, Bryan!
>>>>>
>>>>> On Fri, Feb 09, 2018, Bryan Drewery wrote:
>>>>>> On 2/1/2018 1:10 AM, Vladimir Zakharov wrote:
>>>>>>> Hello!
>>>>>>>
>>>>>>> For some time (about a week) building and installing kernel fails with
>>>>>>> the error "Variable OBJTOP is recursive." when going to build/install
>>>>>>> module from ports.
>>>>>>>
>>>>>>> Last successful build was at r328426. Next build at r328527 failed and
>>>>>>> still broken at r328649.
>>>>>>>
>>>>>>> Without PORTS_MODULES building and installing kernel succeeds. Another
>>>>>>> workaround: ignore error and build/install module directly from ports.
>>>>>>> ...
>>>>>> For some reason I cannot recreate this issue.
>>>>> It seems, setting WITH_AUTO_OBJ in /etc/src-env.conf causes an error.
>>>>> At least, removing it fixes build for me.
>>>>>
>>>>> Build successful with the following settings:
>>>>> # cat /etc/src-env.conf
>>>>> WITH_META_MODE=
>>>>> #WITH_AUTO_OBJ=
>>>>>
>>>> Please try this patch (requires a buildkernel).
>>>>
>>>> https://people.freebsd.org/~bdrewery/patches/kernel-portsmodules.diff
>>>>
>>> Fixed partly:
>>>                                 | buildkernel  | installkernel |
>>> r329196                         |     OK       |     FAIL(*)   |
>>> r329169 + patch                 |     OK       |     OK        |
>>> r329196 + WITH_AUTO_OBJ         |     FAIL     |               |
>>> r329169 + WITH_AUTO_OBJ + patch |     FAIL     |               |
>>>
>>> (*) - same error "Variable OBJTOP is recursive".
>>>
>> Thanks, r329232 should fix it.
> Not yet. 'installkernel' still fails (see below). Can be fixed either by
> explicit setting WITHOUT_AUTO_OBJ in /etc/src-env.conf or by applying
> previous patch (s/build/stage/ in kern.post.mk:89).
>
> # svn info
> Path: .
> Working Copy Root Path: /usr/src
> URL: https://svn.freebsd.org/base/head
> Relative URL: ^/head
> Repository Root: https://svn.freebsd.org/base
> Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
> Revision: 329259
> Node Kind: directory
> Schedule: normal
> Last Changed Author: eadler
> Last Changed Rev: 329259
> Last Changed Date: 2018-02-14 10:59:30 +0300 (Wed, 14 Feb 2018)
>
> # cat /etc/src-env.conf
> WITH_META_MODE=
> #WITH_AUTO_OBJ=
>
> # env | grep MAKE
> MAKEOBJDIRPREFIX=/home/obj
>
> # make -j 4 buildkernel && make installkernel
> ...
> ===> Ports module graphics/drm-next-kmod (all)
> cd ${PORTSDIR:-/usr/ports}/graphics/drm-next-kmod; env  -u CC  -u CXX  -u CPP  -u MAKESYSPATH  -u MAKEOBJDIR  MAKEFLAGS="-j 4 -J 15,16 -j 4 -J 15,16 -D NO_MODULES_OBJ .MAKE.LEVEL.ENV=MAKELEVEL KERNEL=kernel TARGET=amd64 TARGET_ARCH=amd64"  SYSDIR=/usr/src/sys  PATH=/home/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/home/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/home/obj/usr/src/amd64.amd64/tmp/legacy/bin:/home/obj/usr/src/amd64.amd64/tmp/usr/sbin:/home/obj/usr/src/amd64.amd64/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin  SRC_BASE=/usr/src  OSVERSION=1200058  WRKDIRPREFIX=/home/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG make -B clean build
> ===>  Cleaning for drm-next-kmod-g20180117
> ===>  License BSD2CLAUSE MIT GPLv2 accepted by the user
> ===>   drm-next-kmod-g20180117 depends on file: /usr/local/sbin/pkg - found
> ===> Fetching all distfiles required by drm-next-kmod-g20180117 for building
> ===>  Extracting for drm-next-kmod-g20180117
> => SHA256 Checksum OK for FreeBSDDesktop-kms-drm-g20180117-622fdd1_GH0.tar.gz.
> ===>  Patching for drm-next-kmod-g20180117
> ===>   drm-next-kmod-g20180117 depends on file: /usr/local/bin/ccache - found
> ===>  Configuring for drm-next-kmod-g20180117
> ===>  Building for drm-next-kmod-g20180117
> [Creating objdir obj...]
> ...
> --------------------------------------------------------------
>>>> Kernel build for GENERIC-NODEBUG completed on Wed Feb 14 11:09:45 MSK 2018
> --------------------------------------------------------------
> --------------------------------------------------------------
>>>> Installing kernel GENERIC-NODEBUG on Wed Feb 14 11:09:45 MSK 2018
> --------------------------------------------------------------
> ...
> kldxref /boot/kernel
> ===> Ports module graphics/drm-next-kmod (install)
> cd ${PORTSDIR:-/usr/ports}/graphics/drm-next-kmod; env  -u CC  -u CXX  -u CPP  -u MAKESYSPATH  -u MAKEOBJDIR  MAKEFLAGS=".MAKE.LEVEL.ENV=MAKELEVEL KERNEL=kernel MK_AUTO_OBJ=no TARGET=amd64 TARGET_ARCH=amd64"  SYSDIR=/usr/src/sys  PATH=/home/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/home/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/home/obj/usr/src/amd64.amd64/tmp/legacy/bin:/home/obj/usr/src/amd64.amd64/tmp/usr/sbin:/home/obj/usr/src/amd64.amd64/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin  SRC_BASE=/usr/src  OSVERSION=1200058  WRKDIRPREFIX=/home/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG make -B deinstall reinstall
> ===>  Deinstalling for drm-next-kmod
> ===>   drm-next-kmod not installed, skipping
> ===>  Staging for drm-next-kmod-g20180117
> ===>   drm-next-kmod-g20180117 depends on package: gpu-firmware-kmod>=g20170403 - found
> ===>   Generating temporary packing list
> ===> drm (install)
> install -T release -o root -g wheel -m 555   drm.ko /home/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG/home/ports/graphics/drm-next-kmod/work/stage/boot/modules/
> install: drm.ko: No such file or directory
> *** Error code 1

I can confirm this.  I think the issue is with the drm-next-kmod port
(virtualbox-ose-kmod works correctly when used in PORTS_MODULES)  It
appears that staging for the port is not working in this context:

[zen]
/usr/obj/usr/src/amd64.amd64/sys/ZEN/usr/ports/graphics/drm-next-kmod #
find . -name "*.ko"
./work/kms-drm-622fdd1/amd/amdgpu/amdgpu.ko
./work/kms-drm-622fdd1/amd/amdkfd/amdkfd.ko
./work/kms-drm-622fdd1/drm/drm.ko
./work/kms-drm-622fdd1/i915/i915kms.ko
./work/kms-drm-622fdd1/lindebugfs/debugfs.ko
./work/kms-drm-622fdd1/linuxkpi/linuxkpi_gplv2.ko
./work/kms-drm-622fdd1/radeon/radeonkms.ko

compare with the port:

[zen] /usr/ports/graphics/drm-next-kmod # find . -name "*.ko"
./work/kms-drm-622fdd1/amd/amdgpu/amdgpu.ko
./work/kms-drm-622fdd1/amd/amdkfd/amdkfd.ko
./work/kms-drm-622fdd1/drm/drm.ko
./work/kms-drm-622fdd1/i915/i915kms.ko
./work/kms-drm-622fdd1/lindebugfs/debugfs.ko
./work/kms-drm-622fdd1/linuxkpi/linuxkpi_gplv2.ko
./work/kms-drm-622fdd1/radeon/radeonkms.ko
./work/stage/boot/modules/drm.ko
./work/stage/boot/modules/amdgpu.ko
./work/stage/boot/modules/amdkfd.ko
./work/stage/boot/modules/i915kms.ko
./work/stage/boot/modules/radeonkms.ko
./work/stage/boot/modules/debugfs.ko
./work/stage/boot/modules/linuxkpi_gplv2.ko

Ian


-- 
Received on Thu Feb 15 2018 - 17:46:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:14 UTC