Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Feb 2018 17:54:30 +0300
From:      Vladimir Zakharov <zakharov.vv@gmail.com>
To:        Bryan Drewery <bdrewery@FreeBSD.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: buildkernel with PORTS_MODULES fails: Variable OBJTOP is recursive
Message-ID:  <20180212145430.r5ygphq3yskm7gxi@vzakharov>
In-Reply-To: <2e2d0a5d-b032-894b-b0a8-d2ab9163159c@FreeBSD.org>
References:  <20180201091030.qmq4boyzvvvqkug6@vzakharov> <2e2d0a5d-b032-894b-b0a8-d2ab9163159c@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.
> > 
> > # cat /etc/make.conf
> > MALLOC_PRODUCTION=yes
> > KERNCONF=GENERIC-NODEBUG GENERIC
> > #KERNCONF= GENERIC-NODEBUG
> > CPUTYPE?=native
> > #PORTS_MODULES = graphics/drm-next-kmod emulators/virtualbox-ose-kmod
> > PORTS_MODULES = graphics/drm-next-kmod 
> > 
> > DOC_LANG = en_US.ISO8859-1 ru_RU.KOI8-R 
> > 
> > WITH_DEBUG_PORTS = mail/neomutt
> > 
> > WITH_CCACHE_BUILD=yes
> > CCACHE_DIR=/home/ccache
> > 
> > #DEVELOPER=yes
> > 
> > ...
> > Building /home/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG/kernel.full
> > --- kernel.full ---
> > linking kernel.full
> > ctfmerge -L VERSION -g -o kernel.full ...
> >       text      data       bss        dec         hex   filename
> >   22584632   1376209   4748888   28709729   0x1b61361   kernel.full
> > Building /home/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG/kernel.debug
> > Building /home/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG/kernel
> > --- all ---
> > ===> Ports module graphics/drm-next-kmod (all)
> > cd ${PORTSDIR:-/usr/ports}/graphics/drm-next-kmod; env  -u CC  -u CXX
> > -u CPP  -u MAKESYSPATH  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=<long string omitted>
> > SRC_BASE=/usr/src  OSVERSION=1200056
> > 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
> > ===> drm (all)
> > Variable OBJTOP is recursive.
> 
> 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=

# env | grep MAKE
MAKEOBJDIRPREFIX=/home/obj

# cat /etc/make.conf
MALLOC_PRODUCTION=yes
KERNCONF= GENERIC-NODEBUG
CPUTYPE?=native
PORTS_MODULES= graphics/drm-next-kmod 
DOC_LANG = en_US.ISO8859-1 ru_RU.KOI8-R 
WITH_DEBUG_PORTS = mail/neomutt
WITH_CCACHE_BUILD=yes
CCACHE_DIR=/home/ccache
DEVELOPER=yes

-- 
Regards,                 | "In theory there is no difference between theory
  Vladimir Zakharov      | and practice. In practice there is."- Yogi Berra



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180212145430.r5ygphq3yskm7gxi>