Discussion:
buildkernel with PORTS_MODULES fails: Variable OBJTOP is recursive
(too old to reply)
Vladimir Zakharov
2018-02-01 09:10:30 UTC
Permalink
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.

make[6]: stopped in <long path omitted>
*** Error code 2

Stop.
make[5]: stopped in <long path omitted>
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[4]: stopped in /home/ports/graphics/drm-next-kmod
*** Error code 1

Stop.
make[3]: stopped in /home/ports/graphics/drm-next-kmod
*** [all] Error code 1
...
--
Regards, | "In theory there is no difference between theory
Vladimir Zakharov | and practice. In practice there is."- Yogi Berra
O. Hartmann
2018-02-02 05:37:55 UTC
Permalink
On Thu, 1 Feb 2018 12:10:30 +0300
Post by Vladimir Zakharov
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 = gPORTS_MODULES raphics/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.
make[6]: stopped in <long path omitted>
*** Error code 2
Stop.
make[5]: stopped in <long path omitted>
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Stop.
make[4]: stopped in /home/ports/graphics/drm-next-kmod
*** Error code 1
Stop.
make[3]: stopped in /home/ports/graphics/drm-next-kmod
*** [all] Error code 1
...
I have had the very same issue!

You need to perform a "installworld" first (just comment out the PORTS_MODULES=
parts of /etc/src.conf or /etc/make.conf, buildworld and buildkernel (maybe not
a full buildworld, but I do not know the state of your source tree) and perform
a regular installation of the world. It could be something easier by direkctly
install-only the mk-portions, but recently, some changes to world (LLVM) made
it worth anyway to buildworld.

As recommended by others earlier on this list according to this subject, this
procedure makes the problem go away.

Kind regards,

Oliver
Vladimir Zakharov
2018-02-03 08:10:53 UTC
Permalink
Hello, Oliver!
Post by O. Hartmann
On Thu, 1 Feb 2018 12:10:30 +0300
Post by Vladimir Zakharov
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.
I have had the very same issue!
You need to perform a "installworld" first (just comment out the PORTS_MODULES=
parts of /etc/src.conf or /etc/make.conf, buildworld and buildkernel (maybe not
a full buildworld, but I do not know the state of your source tree) and perform
a regular installation of the world. It could be something easier by direkctly
install-only the mk-portions, but recently, some changes to world (LLVM) made
it worth anyway to buildworld.
As recommended by others earlier on this list according to this subject, this
procedure makes the problem go away.
Thanks for your answer. Unfortunately, this didn't help.
--
Regards, | "In theory there is no difference between theory
Vladimir Zakharov | and practice. In practice there is."- Yogi Berra
O. Hartmann
2018-02-03 10:17:06 UTC
Permalink
Am Sat, 3 Feb 2018 11:10:53 +0300
Post by Vladimir Zakharov
Hello, Oliver!
Post by O. Hartmann
On Thu, 1 Feb 2018 12:10:30 +0300
Post by Vladimir Zakharov
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.
I have had the very same issue!
You need to perform a "installworld" first (just comment out the PORTS_MODULES=
parts of /etc/src.conf or /etc/make.conf, buildworld and buildkernel (maybe not
a full buildworld, but I do not know the state of your source tree) and perform
a regular installation of the world. It could be something easier by direkctly
install-only the mk-portions, but recently, some changes to world (LLVM) made
it worth anyway to buildworld.
As recommended by others earlier on this list according to this subject, this
procedure makes the problem go away.
Thanks for your answer. Unfortunately, this didn't help.
You are correct! I made a mistake and had the portions still commented out. I'm very
sorry.

This remains a bug!
--
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten fÃŒr
Werbezwecke oder fÌr die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
O. Hartmann
2018-02-04 12:36:09 UTC
Permalink
Am Sat, 3 Feb 2018 11:17:06 +0100
Post by O. Hartmann
Am Sat, 3 Feb 2018 11:10:53 +0300
Post by Vladimir Zakharov
Hello, Oliver!
Post by O. Hartmann
On Thu, 1 Feb 2018 12:10:30 +0300
Post by Vladimir Zakharov
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.
I have had the very same issue!
You need to perform a "installworld" first (just comment out the PORTS_MODULES=
parts of /etc/src.conf or /etc/make.conf, buildworld and buildkernel (maybe not
a full buildworld, but I do not know the state of your source tree) and perform
a regular installation of the world. It could be something easier by direkctly
install-only the mk-portions, but recently, some changes to world (LLVM) made
it worth anyway to buildworld.
As recommended by others earlier on this list according to this subject, this
procedure makes the problem go away.
Thanks for your answer. Unfortunately, this didn't help.
You are correct! I made a mistake and had the portions still commented out. I'm very
sorry.
This remains a bug!
This problem has been introduced with

svn commit: r328489 - head/sys/conf

The the appropriate list for reference.

oh
--
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten fÃŒr
Werbezwecke oder fÌr die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
Vladimir Zakharov
2018-02-05 08:05:52 UTC
Permalink
Post by O. Hartmann
Am Sat, 3 Feb 2018 11:17:06 +0100
Post by O. Hartmann
Am Sat, 3 Feb 2018 11:10:53 +0300
Post by Vladimir Zakharov
Hello, Oliver!
Post by O. Hartmann
On Thu, 1 Feb 2018 12:10:30 +0300
Post by Vladimir Zakharov
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.
I have had the very same issue!
You need to perform a "installworld" first (just comment out the PORTS_MODULES=
parts of /etc/src.conf or /etc/make.conf, buildworld and buildkernel (maybe not
a full buildworld, but I do not know the state of your source tree) and perform
a regular installation of the world. It could be something easier by direkctly
install-only the mk-portions, but recently, some changes to world (LLVM) made
it worth anyway to buildworld.
As recommended by others earlier on this list according to this subject, this
procedure makes the problem go away.
Thanks for your answer. Unfortunately, this didn't help.
You are correct! I made a mistake and had the portions still commented out. I'm very
sorry.
This remains a bug!
This problem has been introduced with
svn commit: r328489 - head/sys/conf
The the appropriate list for reference.
Indeed, reverting r328489 fixes the problem.
--
Regards, | "In theory there is no difference between theory
Vladimir Zakharov | and practice. In practice there is."- Yogi Berra
Bryan Drewery
2018-02-09 22:47:10 UTC
Permalink
Post by Vladimir Zakharov
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.
--
Regards,
Bryan Drewery
Vladimir Zakharov
2018-02-12 14:54:30 UTC
Permalink
Hello, Bryan!
Post by Bryan Drewery
Post by Vladimir Zakharov
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
Bryan Drewery
2018-02-12 21:27:56 UTC
Permalink
Post by Vladimir Zakharov
Hello, Bryan!
Post by Bryan Drewery
Post by Vladimir Zakharov
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.
# 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
Please try this patch (requires a buildkernel).

https://people.freebsd.org/~bdrewery/patches/kernel-portsmodules.diff
--
Regards,
Bryan Drewery
Vladimir Zakharov
2018-02-13 09:48:19 UTC
Permalink
Post by Bryan Drewery
Post by Vladimir Zakharov
Hello, Bryan!
Post by Bryan Drewery
Post by Vladimir Zakharov
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.
# 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".
--
Regards, | "In theory there is no difference between theory
Vladimir Zakharov | and practice. In practice there is."- Yogi Berra
David Wolfskill
2018-02-13 14:02:08 UTC
Permalink
Post by Vladimir Zakharov
....
Post by Bryan Drewery
Post by Vladimir Zakharov
It seems, setting WITH_AUTO_OBJ in /etc/src-env.conf causes an error.
At least, removing it fixes build for me.
FWIW, I have never specified WITH_AUTO_OBJ -- and I do encounter the
"Variable OBJTOP is recursive" during the "make install kernel" phase
unless I take evasive action (patches).
Post by Vladimir Zakharov
...
Post by Bryan Drewery
Please try this patch (requires a buildkernel).
https://people.freebsd.org/~bdrewery/patches/kernel-portsmodules.diff
| 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".
....
In my case, I started with r329155, updated sources to r329197,
reverted an earlier patch to src/sys/conf/kern.post.mk, applied the
above, and rebuilt with no issues -- both on my headless build machine
(which runs a GENERIC kernel, has no kernel modules from ports, did not
exhibit the problem, and verified that the patch doesn't break the
"vanilla" configuration.

My laptop, which runs a moderately-customized kernel ("CANARY") based on
GENERIC, uses the x11/nvidia-driver-340 kernel module, and has exhibited
the problem in the past, made it through the build/install/smoke test
without issue (with the above patch).

Peace,
david
--
David H. Wolfskill ***@catwhisker.org
The circus around that memo helps confirm that Mr. Trump is unfit for office.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
Conrad Meyer
2018-02-13 18:34:26 UTC
Permalink
Post by David Wolfskill
....
Post by Vladimir Zakharov
It seems, setting WITH_AUTO_OBJ in /etc/src-env.conf causes an error.
At least, removing it fixes build for me.
FWIW, I have never specified WITH_AUTO_OBJ -- and I do encounter the
"Variable OBJTOP is recursive" during the "make install kernel" phase
unless I take evasive action (patches).
FYI, it is on by default since r325520.

Best,
Conrad
Bryan Drewery
2018-02-13 17:51:31 UTC
Permalink
Post by Vladimir Zakharov
Post by Bryan Drewery
Post by Vladimir Zakharov
Hello, Bryan!
Post by Bryan Drewery
Post by Vladimir Zakharov
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.
# 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
| 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.
--
Regards,
Bryan Drewery
Vladimir Zakharov
2018-02-14 08:42:03 UTC
Permalink
Post by Bryan Drewery
Post by Vladimir Zakharov
Post by Bryan Drewery
Post by Vladimir Zakharov
Hello, Bryan!
Post by Bryan Drewery
Post by Vladimir Zakharov
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.
# 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
| 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...]
...
--------------------------------------------------------------
Post by Bryan Drewery
Post by Vladimir Zakharov
Post by Bryan Drewery
Kernel build for GENERIC-NODEBUG completed on Wed Feb 14 11:09:45 MSK 2018
--------------------------------------------------------------
--------------------------------------------------------------
Post by Bryan Drewery
Post by Vladimir Zakharov
Post by Bryan Drewery
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 71

Stop.
make[7]: stopped in /home/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG/home/ports/graphics/drm-next-kmod/work/kms-drm-622fdd1/drm
*** Error code 1

Stop.
make[6]: stopped in /home/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG/home/ports/graphics/drm-next-kmod/work/kms-drm-622fdd1
*** Error code 1

Stop.
make[5]: stopped in /home/ports/graphics/drm-next-kmod
*** Error code 1

Stop.
make[4]: stopped in /home/ports/graphics/drm-next-kmod
*** Error code 1

Stop.
make[3]: stopped in /home/ports/graphics/drm-next-kmod
*** Error code 1

Stop.
make[2]: stopped in /home/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
--
Regards, | "In theory there is no difference between theory
Vladimir Zakharov | and practice. In practice there is."- Yogi Berra
Ian FREISLICH
2018-02-15 18:46:03 UTC
Permalink
Post by Vladimir Zakharov
Post by Bryan Drewery
Post by Vladimir Zakharov
Post by Bryan Drewery
Post by Vladimir Zakharov
Hello, Bryan!
Post by Bryan Drewery
Post by Vladimir Zakharov
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.
# 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
| 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...]
...
--------------------------------------------------------------
Post by Bryan Drewery
Post by Vladimir Zakharov
Post by Bryan Drewery
Kernel build for GENERIC-NODEBUG completed on Wed Feb 14 11:09:45 MSK 2018
--------------------------------------------------------------
--------------------------------------------------------------
Post by Bryan Drewery
Post by Vladimir Zakharov
Post by Bryan Drewery
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


--

Loading...