NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/54861: Possible wrong dependencies with MODULE and COMPAT_50



>Number:         54861
>Category:       kern
>Synopsis:       Possible wrong dependencies with MODULE and COMPAT_50
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 15 11:55:00 +0000 2020
>Originator:     Izumi Tsutsui
>Release:        NetBSD 8.1
>Organization:
>Environment:
System: NetBSD 8.1
Architecture: m68k
Machine: sun3
>Description:
When I tried to build a NetBSD/sun3 8.1 kernel with "options MODULAR"
enabled, I got the following weird link error:
---
#      link  MODULAR/netbsd
/s/src/obj.sun3/tooldir.NetBSD-9.0_RC1-i386/bin/m68k--netbsdelf-ld -Map netbsd.map --cref -N -Ttext 0E004000 -e start -S -o netbsd ${SYSTEM_OBJ:[@]:Nswapnetbsd.o} ${EXTRA_OBJ} vers.o swapnetbsd.o
/s/src/sys/arch/sun3/compile/obj.sun3/MODULAR/lib/compat/libcompat.o: In function `compat_14_rt_oifmsg':
(.text+0x2c1e): undefined reference to `compat_50_route_info'
/s/src/sys/arch/sun3/compile/obj.sun3/MODULAR/lib/compat/libcompat.o: In function `compat_14_rt_oifmsg':
(.text+0x2cf8): undefined reference to `compat_50_rt_msg1'
/s/src/sys/arch/sun3/compile/obj.sun3/MODULAR/lib/compat/libcompat.o: In function `compat_14_rt_oifmsg':
(.text+0x2d0a): undefined reference to `compat_50_route_enqueue'

*** Failed target:  netbsd
---

No compat_50* symbol in *.o files:
---
% nm sys/arch/sun3/compile/obj.sun3/MODULAR/*.o | grep compat_50
---

and opt_compat_netbsd.h says
---
% grep COMPAT_50 sys/arch/sun3/compile/obj.sun3/MODULAR/opt_compat_netbsd.h
/* option `COMPAT_50' not defined */
 .ifndef _KERNEL_OPT_COMPAT_50
 .global _KERNEL_OPT_COMPAT_50
 .equiv _KERNEL_OPT_COMPAT_50,0x6e074def
__asm(" .ifndef _KERNEL_OPT_COMPAT_50\n .global _KERNEL_OPT_COMPAT_50\n .equiv _KERNEL_OPT_COMPAT_50,0x6e074def\n .endif");
---

The "MODULAR" config is copied rom GENERIC and only
"optinos MODULAR" line is enabled.
---
# $NetBSD: GENERIC,v 1.172.10.2 2018/04/12 14:06:14 martin Exp $
#
# GENERIC machine description file
# 
# This machine description file is used to generate the default NetBSD
# kernel.  The generic kernel does not include all options, subsystems
# and device drivers, but should be useful for most applications.
#
# The machine description file can be customised for your specific
# machine to reduce the kernel size and improve its performance.
#
# For further information on compiling NetBSD kernels, see the config(8)
# man page.
#
# For further information on hardware support for this architecture, see
# the intro(4) man page.  For further information about kernel options
# for this architecture, see the options(4) man page.  For an explanation
# of each device driver in this file see the section 4 man page for the
# device.

# Supports Sun3 (3/50, 3/60, 3/110, 3/160, 3/260, 3/E)
# Supports root on: ie0, le0, sd*, ...

include 	"arch/sun3/conf/std.sun3"

#options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary

#ident		"GENERIC-$Revision: 1.172.10.2 $"

makeoptions	COPTS="-Os"		# bootloader has size limit (~2MB)

# Machines to be supported by this kernel
options 	FPU_EMULATE
options 	HAVECACHE		# Sun3/260 VAC

# Needs to be set per system.  i.e change these as you see fit
maxusers	4

# Standard system options
options 	KTRACE		# system call tracing
options 	SYSVMSG		# System V message queues
options 	SYSVSEM		# System V semaphores
options 	SYSVSHM		# System V shared memory

options 	MODULAR		# new style module(7) framework
#options 	MODULAR_DEFAULT_AUTOLOAD

#options 	INSECURE	# disable kernel security level
#options 	USERCONF	# userconf(4) support
options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
#options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel

# Alternate buffer queue strategies for better responsiveness under high
# disk I/O load.
#options 	BUFQ_READPRIO
#options 	BUFQ_PRIOCSCAN

# Which kernel debugger?  Uncomment either this:
options 	DDB
# ... or these for KGDB (gdb remote target)
#makeoptions	DEBUG="-g"	# debugging symbols for gdb
#options 	KGDB
#options 	KGDB_DEV=0x0C01	# ttya=0C00 ttyb=0C01

# Other debugging options
options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
#options 	DEBUG		# kernel debugging code
#options 	DIAGNOSTIC	# extra kernel sanity checking
#options 	PMAP_DEBUG
#options 	SCSIDEBUG
#options 	SCSIVERBOSE		# Verbose SCSI errors

# Compatibility options
#options 	COMPAT_SUNOS	# can run SunOS 4.1.1 executables
#options 	COMPAT_SVR4	# can run SVR4 executables
options 	COMPAT_43	# and 4.3BSD and ...
# Originally in NetBSD 1.0, but limited to 6.0 for size.
#options 	COMPAT_10	# NetBSD 1.0,
#options 	COMPAT_11	# NetBSD 1.1,
#options 	COMPAT_12	# NetBSD 1.2,
#options 	COMPAT_13	# NetBSD 1.3,
#options 	COMPAT_14	# NetBSD 1.4,
#options 	COMPAT_15	# NetBSD 1.5,
#options 	COMPAT_16	# NetBSD 1.6,
#options 	COMPAT_20	# NetBSD 2.0,
#options 	COMPAT_30	# NetBSD 3.0,
#options 	COMPAT_40	# NetBSD 4.0,
#options 	COMPAT_50	# NetBSD 5.0,
options 	COMPAT_60	# NetBSD 6.0, and
options 	COMPAT_70	# NetBSD 7.0 binary compatibility.
#options 	COMPAT_AOUT_M68K # support for NetBSD a.out executables
#options 	COMPAT_LINUX	# can run Linux/m68k executables
#options 	EXEC_AOUT	# support for a.out executables
#options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.

# Filesystem options
file-system	FFS		# Berkeley Fast Filesystem
file-system	NFS		# Sun NFS client support
file-system	CD9660		# ISO 9660 + Rock Ridge file system
#file-system	FDESC		# /dev/fd/*
#file-system	KERNFS		# /kern
file-system	NULLFS		# loopback file system
#file-system	OVERLAY		# overlay file system
file-system	PROCFS		# /proc
#file-system	UNION		# union file system
file-system	MFS		# memory-based filesystem
file-system	PTYFS		# /dev/pts/N support
# Disabled as 20KB larger than MFS.
#file-system	TMPFS		# Efficient memory file-system
#file-system	UDF		# experimental - OSTA UDF CD/DVD file-system

#options 	NFSSERVER	# nfs server support
#options 	QUOTA		# legacy UFS quotas
#options 	QUOTA2		# new, in-filesystem UFS quotas
#options 	FFS_EI		# FFS Endian Independent support
#options 	WAPBL		# File system journaling support
#options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
#options 	UFS_EXTATTR	# Extended attribute support for UFS1

# Networking options
options 	INET		# IP protocol stack support
#options 	INET6		# IPV6
#options 	IPSEC		# IP security
#options 	IPSEC_DEBUG	# debug for IP security
#options 	GATEWAY		# IP packet forwarding
#options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG

#options 	ALTQ		# Manipulate network interfaces' output queues
#options 	ALTQ_BLUE	# Stochastic Fair Blue
#options 	ALTQ_CBQ	# Class-Based Queueing
#options 	ALTQ_CDNR	# Diffserv Traffic Conditioner
#options 	ALTQ_FIFOQ	# First-In First-Out Queue
#options 	ALTQ_FLOWVALVE	# RED/flow-valve (red-penalty-box)
#options 	ALTQ_HFSC	# Hierarchical Fair Service Curve
#options 	ALTQ_LOCALQ	# Local queueing discipline
#options 	ALTQ_PRIQ	# Priority Queueing
#options 	ALTQ_RED	# Random Early Detection
#options 	ALTQ_RIO	# RED with IN/OUT
#options 	ALTQ_WFQ	# Weighted Fair Queueing

# Work-around for root on slow servers (insurance...)
options 	NFS_BOOT_RWSIZE=1024
options 	NFS_BOOT_BOOTPARAM

config		netbsd root on ? type ?

# On-board I/O space (required)
include "arch/sun3/conf/obio.sun3"

# On-board memory (optional)
# See frame-buffers
obmem0 at mainbus?

# VME bus support (optional)
# One unit for each address space
vme0 at mainbus? # A16/D16
vme1 at mainbus? # A16/D32
vme2 at mainbus? # A24/D16
vme3 at mainbus? # A24/D32
vme4 at mainbus? # A32/D16
vme5 at mainbus? # A32/D32

#
# Serial ports
#
zstty0	at zsc1 channel 0	# ttya
zstty1	at zsc1 channel 1	# ttyb

kbd0	at zsc0 channel 0	# keyboard
ms0	at zsc0 channel 1	# mouse

#
# Network devices
#

# Intel Ethernet (onboard, or VME)
ie0 at obio0 addr 0x0C0000 ipl 3
ie1 at vme2 addr 0xe88000 ipl 3 vect 0x75

# Lance Ethernet (only onboard)
le0 at obio0 addr 0x120000 ipl 3

# All Sun3 machines with an "le" (3/50, 3/60) should be
# presumed to have the old, buggy LANCE chip. (Rev. C)
options 	LANCE_REVC_BUG

#
# Disk and tape devices
#

# Sun3 "si" SCSI controller (NCR 5380)
# This driver has several flags which may be enabled using
# the "flags" directive.  Valid flags are:
#
# 0x000ff	Set (1<<target) to disable disconnect/reselect
# 0x0ff00	Set (1<<(target+8)) to disable parity checking
# 0x10000	Set this bit to disable DMA interrupts (poll)
# 0x20000	Set this bit to disable DMA entirely (use PIO)
#
# For example: "flags 0x1000f" would disable DMA interrupts,
# and disable disconnect/reselect for targets 0-3
si0 at obio0 addr 0x140000 ipl 2
si0 at vme2 addr 0x200000 ipl 2 vect 0x40
si1 at vme2 addr 0x204000 ipl 2 vect 0x41

# Xylogics 450/451 controllers (VME A16/D16)
xyc0 at vme0 addr 0xee40 ipl 2 vect 0x48
xyc1 at vme0 addr 0xee48 ipl 2 vect 0x49
xy* at xyc? drive ?

# Xylogics 7053 controllers (VME A16/D32)
xdc0 at vme1 addr 0xee80 ipl 2 vect 0x44
xdc1 at vme1 addr 0xee90 ipl 2 vect 0x45
xd* at xdc? drive ?

# Xylogics 472 tape controllers?

# Sun3/E SCSI+Ethernet board (VME A24/D16)
# Note: the board uses vect and vect+1
sebuf0 at vme2 addr 0x300000 ipl 2 vect 0x74 # and 0x75
sebuf1 at vme2 addr 0x340000 ipl 2 vect 0x76 # and 0x77
si* at sebuf?
ie* at sebuf?

#
# Frame buffer devices
#

include "arch/sun3/conf/bw2.sun3"
include "arch/sun3/conf/cg4.sun3"

# 3/60 P4 accelerated 8-bit color frame buffer
# cgsix0 at obmem0 addr 0xff000000

# 3/60 P4 24-bit color frame buffer
# cgeight0 at obmem0 addr 0xff300000

# Sun-3 color board, or CG5 8-bit frame buffer (VME A24/D16).
cgtwo0 at vme2 addr 0x400000 ipl 4 vect 0xA8

# Support for the CG9 24-bit frame buffer (VME A32/D32).
# cgnine0 at vme5 addr 0x08000000 ipl 4 vect 0xAA

#
# SCSI infrastructure
#
scsibus* at scsi?

sd* at scsibus? target ? lun ?		# SCSI disks
st* at scsibus? target ? lun ?		# SCSI tapes
cd* at scsibus? target ? lun ?		# SCSI CD-ROMs
#ch* at scsibus? target ? lun ?		# SCSI changer devices
#ss* at scsibus? target ? lun ?		# SCSI scanners
uk* at scsibus? target ? lun ?		# unknown SCSI devices

#
# accept filters
#pseudo-device   accf_data		# "dataready" accept filter
#pseudo-device   accf_http		# "httpready" accept filter

# Memory-disk drivers
pseudo-device	md		

# Misc.
pseudo-device	loop			# network loopback
pseudo-device	bpfilter		# packet filter
#pseudo-device	carp			# Common Address Redundancy Protocol
pseudo-device	sl			# CSLIP
pseudo-device	ppp			# PPP
#pseudo-device	pppoe			# PPP over Ethernet (RFC 2516)
#pseudo-device	tun			# network tunneling over tty
#pseudo-device	tap			# virtual Ethernet
#pseudo-device	gre			# generic L3 over IP tunnel
#pseudo-device	ipfilter		# ip filter
#pseudo-device	gif			# IPv[46] over IPv[46] tunnel (RFC1933)
#pseudo-device	faith			# IPv[46] tcp relay translation i/f
#pseudo-device	stf			# 6to4 IPv6 over IPv4 encapsulation
pseudo-device	vlan			# IEEE 802.1q encapsulation
#pseudo-device	bridge			# simple inter-network bridging
#options 	BRIDGE_IPF		# bridge uses IP/IPv6 pfil hooks too
#pseudo-device	agr			# IEEE 802.3ad link aggregation

pseudo-device	pty			# pseudo-terminals
pseudo-device	vnd			# paging to files
#options 	VND_COMPRESSION		# compressed vnd(4)
#pseudo-device	ccd			# concatenated disks
#pseudo-device	cgd			# cryptographic disk devices
#pseudo-device	raid			# RAIDframe disk driver
#options 	RAID_AUTOCONFIG		# auto-configuration of RAID components
# Options to enable various other RAIDframe RAID types.
#options 	RF_INCLUDE_EVENODD=1
#options 	RF_INCLUDE_RAID5_RS=1
#options 	RF_INCLUDE_PARITYLOGGING=1
#options 	RF_INCLUDE_CHAINDECLUSTER=1
#options 	RF_INCLUDE_INTERDECLUSTER=1
#options 	RF_INCLUDE_PARITY_DECLUSTERING=1
#options 	RF_INCLUDE_PARITY_DECLUSTERING_DS=1
#pseudo-device	fss			# file system snapshot device
pseudo-device	clockctl		# user control of clock subsystem
pseudo-device	ksyms			# /dev/ksyms
#pseudo-device	pf			# PF packet filter
#pseudo-device	pflog			# PF log if

# Veriexec
#
# a pseudo device needed for veriexec
#pseudo-device	veriexec
#
# Uncomment the fingerprint methods below that are desired. Note that
# removing fingerprint methods will have almost no impact on the kernel
# code size.
#
#options VERIFIED_EXEC_FP_RMD160
#options VERIFIED_EXEC_FP_SHA256
#options VERIFIED_EXEC_FP_SHA384
#options VERIFIED_EXEC_FP_SHA512
#options VERIFIED_EXEC_FP_SHA1
#options VERIFIED_EXEC_FP_MD5
---

Enabling "options COMPAT_50" solves the link errors.

>How-To-Repeat:
cvs -d anoncvs%anoncvs.netbsd.org@localhost:/cvsroot checkout -rnetbsd-8-1-RELEASE src
cd src
sh build.sh -U -m sun3 tools
sed -e 's/^#options MODULAR /options MODULAR /g' sys/arch/sun3/connf/GENERIC > sys/arch/sun3/conf/MODULAR
sh build.sh -U -m sun3 kernel=MODULAR

>Fix:
No idea for now.



Home | Main Index | Thread Index | Old Index