Error trying to upgrade to version 15 current.

Hello everyone.
Error trying to upgrade to version 15 current.
The elfcopy utility is indeed not in the system and cannot be found by searching. There was no such problem with previous upgrades. What should I do?
Code:
make buildworld
...
...
/bin/sh: elfcopy: not found
*** Error code 127

Stop.
make[5]: stopped making "all" in /usr/src/stand/efi/boot1
*** Error code 1

Stop.
make[4]: stopped making "all" in /usr/src/stand/efi
*** Error code 1

Stop.
make[3]: stopped making "all" in /usr/src/stand
*** Error code 1

Stop.
make[2]: stopped making "all" in /usr/src
      885,21 real       827,92 user        58,72 sys
*** Error code 1

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

Stop.
make: stopped making "buildworld" in /usr/src
 
Error trying to upgrade to version 15 current.
 
Hello everyone.
Error trying to upgrade to version 15 current.
The elfcopy utility is indeed not in the system and cannot be found by searching. There was no such problem with previous upgrades. What should I do?

make buildworld
...
...
/bin/sh: elfcopy: not found
*** Error code 127

What are you currently running? Does it have `elfcopy` anywhere?

You can try edit the top-level Makefile to not recurse into stand/
 
This is the current version and it has been built without problems before.
> uname -a
FreeBSD 15.0-CURRENT main-n275179-64dcfa2593d4: Sun Feb 2 17:19:35 EET 2025

I don't have a copy of "elfcopy" anywhere. I don't understand how and why to edit the Makefile.
 
Code:
> cat /etc/make.conf

# To completely disable malloc debugging
MALLOC_PRODUCTION=
WITHOUT_DEBUG=yes

WITHOUT_PROFILE=
MK_PROFILE=no

WITHOUT_X11=yes
WITHOUT_GUI=yes
NO_X11=yes
NO_GUI=yes
OPTIONS_UNSET+=X11

OPTIONS_FILE_UNSET+=OPENGL
OPTIONS_FILE_SET+=GLESV2

DOC_LANG=en_US.ISO8859-1

IGNORE_OSVERSION=yes
ALLOW_UNSUPPORTED_SYSTEM=yes
MAKE_JOBS_UNSAFE=yes

DEFAULT_VERSIONS+=ssl=openssl

OPTIONS_UNSET+=GSSAPI_BASE
OPTIONS_SET+=GSSAPI_NONE
Code:
> cat /etc/src.conf

WITHOUT_ASSERT_DEBUG=
WITHOUT_ATM=
WITHOUT_BLUETOOTH=
WITHOUT_CROSS_COMPILER=
WITHOUT_DEBUG_FILES=
WITHOUT_FINGER=
WITHOUT_FLOPPY=
WITHOUT_GAMES=
WITHOUT_HYPERV=
WITHOUT_IPFILTER=
WITHOUT_ISCSI=
WITHOUT_JAIL=
WITHOUT_KDUMP=
WITHOUT_KERBEROS=
WITHOUT_KERBEROS_SUPPORT=
WITHOUT_KERNEL_SYMBOLS=
WITHOUT_LLVM_TARGET_AARCH64=
WITHOUT_LLVM_TARGET_ARM=
WITHOUT_LLVM_TARGET_MIPS=
WITHOUT_LLVM_TARGET_POWERPC=
WITHOUT_LLVM_TARGET_RISCV=
WITHOUT_LLVM_TARGET_SPARC=
WITHOUT_LPR=
WITHOUT_NAND=
WITHOUT_NCP=
WITHOUT_NETGRAPH=
WITHOUT_NETGRAPH_SUPPORT=
WITHOUT_PF=
WITHOUT_PPP=
WITHOUT_PROFILE=
WITHOUT_QUOTAS=
WITHOUT_RADIUS_SUPPORT=
WITHOUT_SENDMAIL=
WITHOUT_UNBOUND=
WITHOUT_VI=
WITHOUT_WIRELESS=
WITHOUT_WIRELESS_SUPPORT=
WITHOUT_WPA_SUPPLICANT_EAPOL=
 
Try cding to /usr/src/usr.bin/objcopy and do a `make install` in there.
Code:
> cd /usr/src/usr.bin/objcopy/
 > make install
[Creating objdir /usr/obj/usr/src/amd64.amd64/usr.bin/objcopy...]
[Creating nested objdir /usr/obj/usr/src/amd64.amd64/usr.bin/objcopy/sys...]
install  -s -o root -g wheel -m 555   elfcopy /usr/bin/elfcopy
install: elfcopy: No such file or directory
*** Error code 71

Stop.
make: stopped making "install" in /usr/src/usr.bin/objcopy
 
You need a `make` first.
Code:
ld: error: unable to find library -lelftc_pie
ld: error: unable to find library -lpe_pie
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make: stopped making "all" in /usr/src/usr.bin/objcopy
 
make buildkernel
Code:
In file included from /usr/src/sys/dev/mii/mcommphy.c:47:
/usr/src/sys/dev/mii/mii_fdt.h:38:2: error: unknown type name 'phandle_t'
   38 |         phandle_t       macnode;        /* Node (not xref) of parent MAC */
      |         ^
/usr/src/sys/dev/mii/mii_fdt.h:39:2: error: unknown type name 'phandle_t'
   39 |         phandle_t       phynode;        /* Node (not xref) of PHY */
      |         ^
/usr/src/sys/dev/mii/mii_fdt.h:65:35: error: unknown type name 'phandle_t'
   65 | mii_contype_t mii_fdt_get_contype(phandle_t macnode);
      |                                   ^
/usr/src/sys/dev/mii/mcommphy.c:247:2: error: use of undeclared identifier 'pcell_t'
  247 |         pcell_t val;
      |         ^
/usr/src/sys/dev/mii/mcommphy.c:252:6: error: call to undeclared function 'OF_getencprop'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
  252 |         if (OF_getencprop(cfg->phynode, "rx-internal-delay-ps", &val,
      |             ^
/usr/src/sys/dev/mii/mcommphy.c:253:13: error: use of undeclared identifier 'val'
  253 |             sizeof(val)) > 0) {
      |                    ^
/usr/src/sys/dev/mii/mcommphy.c:252:59: error: use of undeclared identifier 'val'
  252 |         if (OF_getencprop(cfg->phynode, "rx-internal-delay-ps", &val,
      |                                                                  ^
/usr/src/sys/dev/mii/mcommphy.c:254:7: error: use of undeclared identifier 'val'
  254 |                 if (val <= RXC_DLY_THRESH && val % INTERNAL_DLY_DIV == 0) {
      |                     ^
/usr/src/sys/dev/mii/mcommphy.c:254:32: error: use of undeclared identifier 'val'
  254 |                 if (val <= RXC_DLY_THRESH && val % INTERNAL_DLY_DIV == 0) {
      |                                              ^
/usr/src/sys/dev/mii/mcommphy.c:255:15: error: use of undeclared identifier 'val'
  255 |                         rx_delay = val / INTERNAL_DLY_DIV;
      |                                    ^
/usr/src/sys/dev/mii/mcommphy.c:258:16: error: use of undeclared identifier 'val'
  258 |                         rx_delay = (val - RXC_DLY_ADDON) / INTERNAL_DLY_DIV;
      |                                     ^
/usr/src/sys/dev/mii/mcommphy.c:259:9: error: use of undeclared identifier 'val'
  259 |                         if ((val - RXC_DLY_ADDON) % INTERNAL_DLY_DIV != 0)
      |                              ^
/usr/src/sys/dev/mii/mcommphy.c:265:13: error: use of undeclared identifier 'val'
  265 |             sizeof(val)) > 0) {
      |                    ^
/usr/src/sys/dev/mii/mcommphy.c:264:59: error: use of undeclared identifier 'val'
  264 |         if (OF_getencprop(cfg->phynode, "tx-internal-delay-ps", &val,
      |                                                                  ^
/usr/src/sys/dev/mii/mcommphy.c:266:14: error: use of undeclared identifier 'val'
  266 |                 tx_delay = val / INTERNAL_DLY_DIV;
      |                            ^
/usr/src/sys/dev/mii/mcommphy.c:267:7: error: use of undeclared identifier 'val'
  267 |                 if (val % INTERNAL_DLY_DIV != 0)
      |                     ^
/usr/src/sys/dev/mii/mcommphy.c:303:6: error: call to undeclared function 'OF_hasprop'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
  303 |         if (OF_hasprop(cfg->phynode, "motorcomm,tx-clk-10-inverted"))
      |             ^
17 errors generated.
*** Error code 1

Stop.
make[2]: stopped making "all" in /usr/obj/usr/src/amd64.amd64/sys/C4M4
       80,40 real        75,88 user         4,55 sys
*** Error code 1

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

Stop.
make: stopped making "buildkernel" in /usr/src
 
I built 15-current yesterday. No problems.

Chances are your make.conf or src.conf entries are responsible.
Probably your current version of freebsd matters and it is probably different from mine. My make.conf and src.conf are shown above and there have been no problems with them so far. I have updated my current version 15 many times before this quite successfully. Something has changed and now I have these problems. The question is what exactly has changed and how to deal with it?
 
Probably your current version of freebsd matters and it is probably different from mine. My make.conf and src.conf are shown above and there have been no problems with them so far. I have updated my current version 15 many times before this quite successfully. Something has changed and now I have these problems. The question is what exactly has changed and how to deal with it?

That UPDATING entry T-Aoki pointed out is probably relevant, and your last update crosses that dateline.
 
Unfortunately, it didn't help. The result is the same.
Code:
> grep WITHOUT_LLVM_BINUTILS /etc/src.conf
WITHOUT_LLVM_BINUTILS=
Code:
make buildworld
...
/bin/sh: elfcopy: not found
*** Error code 127
Stop.
make[5]: stopped making "all" in /usr/src/stand/efi/boot1
*** Error code 1
 
Not updated this week, but at least src upgrade from commit 780a4667bbde0daa90db900bb0f93f6337d6208b (commit date: 2025-03-07) to commit 7a4907250452de0818dcd4c084a138b03f153f55 (commit date: 2025-03-29) built fine on amd64 for me last week.
 
Not updated this week, but at least src upgrade from commit 780a4667bbde0daa90db900bb0f93f6337d6208b (commit date: 2025-03-07) to commit 7a4907250452de0818dcd4c084a138b03f153f55 (commit date: 2025-03-29) built fine on amd64 for me last week.
Can you show your /etc/make.conf and /etc/src.conf ? If it's not a secret. Or send them to me directly. There must be some difference, I think. Or compare with my data above. Thanks.
 
Can you show your /etc/make.conf and /etc/src.conf ? If it's not a secret.
Sure. Stripping out commented out portions and ports-specific (i.e., conditional options) parts that shouldn't affect building src.

/etc/src-env.conf
Code:
WITH_META_MODE= YES

/etc/src.conf
Makefile:
WITHOUT_CLEAN=yes
WITHOUT_REPRODUCIBLE_BUILD=yes

WITHOUT_PTHREADS_ASSERTIONS=yes
WITH_MALLOC_PRODUCTION=yes

## Control selective enabling of LLVM targets.
WITHOUT_LLVM_TARGET_AARCH64=yes
WITHOUT_LLVM_TARGET_ARM=yes
WITHOUT_LLVM_TARGET_MIPS=yes
WITHOUT_LLVM_TARGET_POWERPC=yes
WITHOUT_LLVM_TARGET_SPARC=yes
WITH_LLVM_TARGET_X86=yes

WITH_KERNEL_RETPOLINE=yes
WITH_RETPOLINE=yes

WITHOUT_TESTS=yes
WITHOUT_DEBUG_FILES=yes
WITHOUT_MANSPLITPKG=yes

/etc/make.conf
Makefile:
MALLOC_PRODUCTION=yes

KERNCONF?=MY_DEFAULT_KERN_CONF

# WITH_CCACHE_BUILD=yes
CCACHE_DIR=    /var/cache/ccache

.if !${.CURDIR:M/usr/src/stand/*} && !${.CURDIR:M/usr/ports/devel/wasi-libcxx19*}
CPUTYPE?=    haswell
.endif
 
Sure. Stripping out commented out portions and ports-specific (i.e., conditional options) parts that shouldn't affect building src.
The problem is solved. With your src.conf both the world and the kernel were built and installed normally. Now /usr/bin/elfcopy appeared where it should be. After rebooting, I returned my src.conf and everything was built and installed normally again. Some kind of mysticism, but your src.conf really helped, thank you.
 
Back
Top