pkgsrc-Users archive

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

emulators/qemu fails to build on NetBSD 4.0 (with workaround)



This is from the stable branch, pkgsrc-2007Q4.

The build stops with

gmake -C i386-softmmu all
gmake[1]: Entering directory 
`/pkg_comp/obj/pkgsrc/emulators/qemu/default/qemu-0.9.0/i386-softmmu'
gcc -Wall -O2 -g -fno-strict-aliasing -fno-stack-protector -fno-reorder-blocks 
-fno-optimize-sibling-calls  -I. -I.. 
-I/pkg_comp/obj/pkgsrc/emulators/qemu/default/qemu-0.9.0/target-i386 
-I/pkg_comp/obj/pkgsrc/emulators/qemu/default/qemu-0.9.0 -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 
-I/pkg_comp/obj/pkgsrc/emulators/qemu/default/qemu-0.9.0/fpu -DHAS_AUDIO 
-I/pkg_comp/obj/pkgsrc/emulators/qemu/default/qemu-0.9.0/slirp -c -o op.o 
/pkg_comp/obj/pkgsrc/emulators/qemu/default/qemu-0.9.0/target-i386/op.c
cc1: error: unrecognized option `-fno-stack-protector'
gmake[1]: *** [op.o] 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 also note in the Makefile

GCC_REQD+=              3.0

Apparently pkgsrc uses gcc 3 for building now even though gcc 4 is
installed in the base system? (I was already wondering why it would even
build gcc-3-c, even though gcc34 was also being built due to yet another
build-time dependency, and even though it wasn't needed in the previous
stable pkgsrc branch).

/p/obj/pkgsrc/emulators/qemu/default/.gcc/bin/gcc confirms this; it
contains

#!/bin/sh
exec /usr/pkg/gcc3/bin/gcc "$@"

(I hope that this stack protector is not on by default...)

The following patch to the Makefile at least lets qemu build; I have not
run it yet.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/qemu/Makefile,v
retrieving revision 1.50
diff -u -r1.50 Makefile
--- Makefile    24 Dec 2007 10:18:22 -0000      1.50
+++ Makefile    15 Mar 2008 23:44:42 -0000
@@ -22,10 +22,10 @@
 
 .include "../../mk/bsd.prefs.mk"
 
-GCC_REQD+=             3.0
+#GCC_REQD+=            3.0
 
 .if !empty(MACHINE_PLATFORM:MNetBSD-4*)
-USE_PKGSRC_GCC=        yes
+#USE_PKGSRC_GCC=       yes
 .endif
 
 CONFIGURE_ENV+=                PKGMANDIR=${PKGMANDIR}

I also find that I have this local patch for amd64 (I needed it to build
on 3.0)

--- fpu/softfloat-native.c.dist 2007-02-06 00:01:54.000000000 +0100
+++ fpu/softfloat-native.c      2007-09-19 21:01:41.000000000 +0200
@@ -223,7 +223,8 @@
 *----------------------------------------------------------------------------*/
 float64 float64_trunc_to_int( float64 a STATUS_PARAM )
 {
-    return trunc(a);
+    /*return trunc(a);*/
+    return floor(a);   /* loses precision? */
 }
 
 float64 float64_round_to_int( float64 a STATUS_PARAM )

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert      -- You author it, and I'll reader it.
\X/ rhialto/at/xs4all.nl        -- Cetero censeo "authored" delendum esse.


Home | Main Index | Thread Index | Old Index