Subject: pkg/36893: emulators/qemu fails on NetBSD/amd64 3.1
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <jan.m.danielsson@gmail.com>
List: pkgsrc-bugs
Date: 09/04/2007 07:35:01
>Number:         36893
>Category:       pkg
>Synopsis:       emulators/qemu fails on NetBSD/amd64 3.1
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 04 07:35:01 +0000 2007
>Originator:     Jan Danielsson
>Release:        NetBSD/amd64 3.1
>Organization:
Confuse A Cat Inc.
>Environment:
NetBSD nl102-238-202.student.uu.se 3.1 NetBSD 3.1 (ANCA) #4: Tue Jul 17 18:57:21 CEST 2007  root@nl102-238-202.student.uu.se:/usr/src/sys/arch/amd64/compile/ANCA amd64

>Description:
Build results in:
========================================
[---]
gcc -O2 -pipe -I/usr/pkg/include -DGLX_GLXEXT_LEGACY -I/usr/include -Wall -O2 -g -fno-strict-aliasing -I. -I.. -I/pkg_comp/obj/pkgsr
gcc -O2 -pipe -I/usr/pkg/include -DGLX_GLXEXT_LEGACY -I/usr/include -Wall -O2 -g -fno-strict-aliasing -I. -I.. -I/pkg_comp/obj/pkgsr
gcc -O2 -pipe -I/usr/pkg/include -DGLX_GLXEXT_LEGACY -I/usr/include -Wall -O2 -g -fno-strict-aliasing -I. -I.. -I/pkg_comp/obj/pkgsr
gcc -O2 -pipe -I/usr/pkg/include -DGLX_GLXEXT_LEGACY -I/usr/include -Wall -O2 -g -fno-strict-aliasing -I. -I.. -I/pkg_comp/obj/pkgsr
rm -f libqemu.a
ar rcs libqemu.a exec.o kqemu.o translate-op.o translate-all.o cpu-exec.o translate.o op.o  fpu/softfloat-native.o helper.o helper2.
gcc  -o qemu vl.o osdep.o readline.o monitor.o pci.o console.o loader.o isa_mmio.o cutils.o block.o block-raw.o block-cow.o block-qc
libqemu.a(softfloat-native.o)(.text+0x21a): In function `float64_trunc_to_int':
/pkg_comp/obj/pkgsrc/emulators/qemu/default/qemu-0.9.0/fpu/softfloat-native.c:226: undefined reference to `trunc'
gmake[1]: *** [qemu] Error 1
gmake[1]: Leaving directory `/pkg_comp/obj/pkgsrc/emulators/qemu/default/qemu-0.9.0/i386-softmmu'
gmake: *** [subdir-i386-softmmu] Error 2
*** Error code 2
========================================

I was told that this problem does not exist on NetBSD 4.0 systems.
>How-To-Repeat:
Just build emulators/qemu on a NetBSD/amd64 3.1 system.
>Fix:
I believe changing the trunc() to rint() in qemu-0.9.0/fpu/softfloat-native.c solves the problem.