Index | Thread | Search

From:
Christian Schulte <cs@schulte.it>
Subject:
Failure compiling fdboot on amd64
To:
tech@openbsd.org
Date:
Wed, 27 Nov 2024 19:30:21 +0100

Download raw body.

Thread
Is this just me? make build on current amd64 fails due to this since 2 or more
days. <http://www.openbsd.org/faq/current.html> does not give any hints.

ld: error: undefined symbol: ufs2_open
>>> referenced by conf.c
>>>               conf.o:(file_system)
>>> did you mean: ufs_open
>>> defined in: ufs.o

ld: error: undefined symbol: ufs2_close
>>> referenced by conf.c
>>>               conf.o:(file_system)
>>> did you mean: ufs_close
>>> defined in: ufs.o

ld: error: undefined symbol: ufs2_read
>>> referenced by conf.c
>>>               conf.o:(file_system)

ld: error: undefined symbol: ufs2_write
>>> referenced by conf.c
>>>               conf.o:(file_system)

ld: error: undefined symbol: ufs2_seek
>>> referenced by conf.c
>>>               conf.o:(file_system)

ld: error: undefined symbol: ufs2_stat
>>> referenced by conf.c
>>>               conf.o:(file_system)

ld: error: undefined symbol: ufs2_readdir
>>> referenced by conf.c
>>>               conf.o:(file_system)

ld: error: undefined symbol: ufs2_fchmod
>>> referenced by conf.c
>>>               conf.o:(file_system)
*** Error 1 in /usr/src/sys/arch/amd64/stand/fdboot (../boot/Makefile:67 'fdboot')

Applying this diff makes it compile again. I do not have a floppy drive around,
so cannot test this. Clearly fdboot references those ufs2_* functions and
does so for a long time. Not sure why this could be compiled before and now
is failing.


Index: sys/arch/amd64/stand//boot/Makefile
===================================================================
RCS file: /cvs/src/sys/arch/amd64/stand/boot/Makefile,v
retrieving revision 1.50
diff -u -p -u -r1.50 Makefile
--- sys/arch/amd64/stand//boot/Makefile	30 Jun 2024 18:17:09 -0000	1.50
+++ sys/arch/amd64/stand//boot/Makefile	27 Nov 2024 18:18:16 -0000
@@ -40,10 +40,8 @@ SRCS+=	alloc.c ctime.c exit.c getchar.c 
 SRCS+=	close.c closeall.c cons.c cread.c dev.c disklabel.c dkcksum.c fchmod.c \
 	fstat.c lseek.c open.c read.c readdir.c stat.c
 SRCS+=	elf32.c elf64.c loadfile.c arc4.c
-SRCS+=	ufs.c
-.if empty(COPTS:M-DFDBOOT)
-SRCS+=	ufs2.c
-.endif
+SRCS+=	ufs.c ufs2.c
+
 .if ${SOFTRAID:L} == "yes"
 SRCS+=	aes_xts.c bcrypt_pbkdf.c blowfish.c explicit_bzero.c hmac_sha1.c \
 	pkcs5_pbkdf2.c rijndael.c sha1.c sha2.c softraid.c
Index: sys/arch/amd64/stand//fdboot/Makefile
===================================================================
RCS file: /cvs/src/sys/arch/amd64/stand/fdboot/Makefile,v
retrieving revision 1.3
diff -u -p -u -r1.3 Makefile
--- sys/arch/amd64/stand//fdboot/Makefile	30 Mar 2016 06:38:45 -0000	1.3
+++ sys/arch/amd64/stand//fdboot/Makefile	27 Nov 2024 18:18:16 -0000
@@ -4,7 +4,6 @@ MAN=
 
 .if ${MACHINE} == "amd64"
 PROG=	fdboot
-COPTS=	-DFDBOOT
 .endif
 
 .PATH:	${.CURDIR}/../boot