Subject: pkg/18145: freebsd_lib and
To: None <>
From: None <>
List: netbsd-bugs
Date: 09/02/2002 10:13:04
>Number:         18145
>Category:       pkg
>Synopsis:       freebsd_lib package needs file to stop SIGFPE
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 02 02:14:01 PDT 2002
>Originator:     Stephen Borrill
>Release:        NetBSD 1.5.3
Precedence Technologies Ltd
Affects 1.5 through to 1.6 and -current
System: NetBSD newbuild 1.5.3 NetBSD 1.5.3 (CLACKS3) #0: Fri Aug 30 11:19:58 BST 2002 root@mailserver:/usr/src/sys/arch/i386/compile/CLACKS3 i386

Trying to run a FreeBSD binary with the freebsd_lib package often gives a
SIGFPE immediately. Using ktrace showed that this was due to
/var/run/ being used for the FreeBSD a.out binaries. On a basic
ELF i386 system the /var/run/ file contains a small amount of
data generated by ldconfig at boot time. This causes the SIGFPE. Creating a
zero-length file or adding the 1.4 a.out compatibility package
(to generate more data in stops the error. Due to the way
emulation works, /var/run/ is only used if
/emul/freebsd/var/run/ is not found, so this gives us a simple

On a clean 1.6 i386 install (i.e. do NOT install any a.out compatibility
packages), add the freebsd_lib-2.2.7 package. Then try to run a FreeBSD 2
a.out binary (Sophos antivirus was used for testing: ). The program
will die with a floating exception. Now type:

mkdir -p /emul/freebsd/var/run
touch /emul/freebsd/var/run/

The program will now run successfully.

Add an empty file in /usr/pkg/emul/freebsd/var/run/