Bug 184984 - emulators/kqemu-kmod fails to build on 10.0
Summary: emulators/kqemu-kmod fails to build on 10.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Juergen Lock
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-19 03:40 UTC by Alex Wied
Modified: 2014-09-20 09:58 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Wied 2013-12-19 03:40:00 UTC
===>   kqemu-kmod-1.3.0.p11_12 depends on executable: gmake - found
===>   kqemu-kmod-1.3.0.p11_12 depends on executable: gcc46 - found
===>   kqemu-kmod-1.3.0.p11_12 depends on file: /usr/local/bin/as - found
===>  Configuring for kqemu-kmod-1.3.0.p11_12
===>   FreeBSD 10 autotools fix applied to /usr/home/jojo/ports/emulators/kqemu-kmod/work/kqemu-1.3.0pre11/configure
Source path       /usr/home/jojo/ports/emulators/kqemu-kmod/work/kqemu-1.3.0pre11
C compiler        gcc46
Host C compiler   gcc
make              gmake
host CPU          x86_64
===>  Building for kqemu-kmod-1.3.0.p11_12
@ -> /usr/src/sys
machine -> /usr/src/sys/amd64/include
x86 -> /usr/src/sys/x86/include
gmake[1]: Entering directory `/usr/home/jojo/ports/emulators/kqemu-kmod/work/kqemu-1.3.0pre11/common'
gcc46 -Wall -O2 -Werror -g -D__KERNEL__ -I.. -o genoffsets genoffsets.c
./genoffsets > monitor_def.h
gcc46  -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -D__ASSEMBLY__ -c -o x86_64/nexus_asm.o x86_64/nexus_asm.S
gcc46  -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -D__ASSEMBLY__ -c -o x86_64/monitor_asm.o x86_64/monitor_asm.S
gcc46 -Wall -O2 -fomit-frame-pointer -fno-strict-aliasing -Werror  -mno-red-zone -fno-stack-protector    -fpic  -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -c -o monitor.o monitor.c
gcc46 -Wall -O2 -fomit-frame-pointer -fno-strict-aliasing -Werror  -mno-red-zone -fno-stack-protector    -fpic  -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -c -o monitor-utils.o monitor-utils.c
gcc46 -Wall -O2 -fomit-frame-pointer -fno-strict-aliasing -Werror  -mno-red-zone -fno-stack-protector    -fpic  -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -c -o interp.o interp.c
ori     lld -T x86_64/monitor.ld -o monitor-image.out x86_64/nexus_asm.o x86_64/monitor_asm.o monitor.o monitor-utils.o interp.o
objcopy -O binary monitor-image.out monitor-image.bin
gcc46 -Wall -O2 -Werror -g -o genmon genmon.c
./genmon < monitor-image.bin > monitor-image.h
gcc46 -Wall -O2 -fomit-frame-pointer -fno-strict-aliasing -Werror  -mno-red-zone  -mcmodel=kernel -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -c -o kernel.o kernel.c
gcc46  -D__KERNEL__ -nostdinc -iwithprefix include -I. -I.. -D__ASSEMBLY__ -c -o x86_64/kernel_asm.o x86_64/kernel_asm.S
ld -r -o ../kqemu-mod-x86_64.o kernel.o x86_64/kernel_asm.o
gmake[1]: Leaving directory `/usr/home/jojo/ports/emulators/kqemu-kmod/work/kqemu-1.3.0pre11/common'
usage: make [-BeikNnqrstWwX] 
            [-C directory] [-D variable] [-d flags] [-f makefile]
            [-I directory] [-J private] [-j max_jobs] [-m directory] [-T file]
            [-V variable] [variable=value] [target ...]
*** Error code 2

How-To-Repeat: cd /usr/ports/emulators/kqemu-kmod
make
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-12-19 03:40:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->nox

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-01-11 22:03:34 UTC
Author: nox
Date: Sat Jan 11 22:03:26 2014
New Revision: 339459
URL: http://svnweb.freebsd.org/changeset/ports/339459

Log:
  Mark BROKEN on 10+: KPI changes in 10 and up, use bhyve or vbox.
  (If someone wants to fix it: patches welcome! :)
  
  PR:		ports/184984
  Submitted by:	Alex <alex323@gmail.com>

Modified:
  head/emulators/kqemu-kmod-devel/Makefile
  head/emulators/kqemu-kmod/Makefile

Modified: head/emulators/kqemu-kmod-devel/Makefile
==============================================================================
--- head/emulators/kqemu-kmod-devel/Makefile	Sat Jan 11 21:37:10 2014	(r339458)
+++ head/emulators/kqemu-kmod-devel/Makefile	Sat Jan 11 22:03:26 2014	(r339459)
@@ -31,6 +31,7 @@ USE_RC_SUBR=	kqemu
 NO_STAGE=	yes
 
 USES=		kmod
+
 .include <bsd.port.pre.mk>
 
 PORTDOCS=	kqemu-doc.html kqemu-tech.html
@@ -42,7 +43,7 @@ PLIST_FILES+=	"@cwd"
 
 MAKEFILE=	Makefile.freebsd
 
-MAKE_ARGS+=	LDFLAGS=${LDFLAGS:S/^-Wl,//}
+MAKE_ARGS+=	LDFLAGS="${LDFLAGS:S/^-Wl,//}"
 
 .if ${ARCH} == "amd64"
 GMAKE_ARGS+=	ARCH=x86_64
@@ -50,6 +51,11 @@ GMAKE_ARGS+=	ARCH=x86_64
 
 CFLAGS+=	${DEBUG_FLAGS}
 
+# Not sure about the exact OSVERSION:
+.if ${OSVERSION} > 1000015
+BROKEN=		KPI changes in 10 and up, use bhyve or vbox
+.endif
+
 post-patch:
 # Apply extra patches from the qemu-devel list; in the unlikely case that
 # these cause regressions please define WITHOUT_EXTRA_PATCHES and post

Modified: head/emulators/kqemu-kmod/Makefile
==============================================================================
--- head/emulators/kqemu-kmod/Makefile	Sat Jan 11 21:37:10 2014	(r339458)
+++ head/emulators/kqemu-kmod/Makefile	Sat Jan 11 22:03:26 2014	(r339459)
@@ -31,6 +31,7 @@ USE_RC_SUBR=	kqemu
 NO_STAGE=	yes
 
 USES=		kmod
+
 .include <bsd.port.pre.mk>
 
 PORTDOCS=	kqemu-doc.html kqemu-tech.html
@@ -42,7 +43,7 @@ PLIST_FILES+=	"@cwd"
 
 MAKEFILE=	Makefile.freebsd
 
-MAKE_ARGS+=	LDFLAGS=${LDFLAGS:S/^-Wl,//}
+MAKE_ARGS+=	LDFLAGS="${LDFLAGS:S/^-Wl,//}"
 
 .if ${ARCH} == "amd64"
 GMAKE_ARGS+=	ARCH=x86_64
@@ -50,6 +51,11 @@ GMAKE_ARGS+=	ARCH=x86_64
 
 CFLAGS+=	${DEBUG_FLAGS}
 
+# Not sure about the exact OSVERSION:
+.if ${OSVERSION} > 1000015
+BROKEN=		KPI changes in 10 and up, use bhyve or vbox
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e '/CC=/s,gcc,${CC},' ${WRKSRC}/common/Makefile
 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 nick.nolan 2014-03-14 15:10:04 UTC
Hello, 

Is there any way I could be added to the mailing lists of pr ports/184984 (or the appropriate bug if it has a new standing) 

I have gotten past the compiler issue that was originally reported; but I'm hitting a new issue, "Exec format error" 
tried with both kqemu-kmod and kqemu-kmod-devel, using a portsnap from yesterday. 
I don't know if this is worthy of a new bug, as its priority as already low and the package is marked as broken. 
root@workstation:/usr/ports/emulators/kqemu-kmod # kldload /boot/modules/kqemu.ko 
kldload: can't load /boot/modules/kqemu.ko: Exec format error 
root@workstation:/usr/ports/emulators/kqemu-kmod # file /boot/modules/kqemu.ko 
/boot/modules/kqemu.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), not stripped 
root@workstation:/usr/ports/emulators/kqemu-kmod # uname -rp 
10.0-RELEASE amd64 


I've found a variety of historic threads when searching " 
http://osdir.com/ml/freebsd-ports-bugs/2009-02/msg00694.html 
http://mailing.freebsd.ports-bugs.narkive.com/kYJsaffB/ports-131603-patch-emulators-kqemu-kmod-devel-unit2minor 



---- 
No I can not use bhyve instead, as it is not designed for pre-nehalem VT-x enabled Xeons with no EPT. 


Thanks, 
Nick Nolan 
Comment 4 Juergen Lock 2014-03-14 23:09:35 UTC
On Fri, Mar 14, 2014 at 03:10:04PM +0000, nick.nolan@comcast.net wrote:
> I've found a variety of historic threads when searching " 
> http://osdir.com/ml/freebsd-ports-bugs/2009-02/msg00694.html 
> http://mailing.freebsd.ports-bugs.narkive.com/kYJsaffB/ports-131603-patch-emulators-kqemu-kmod-devel-unit2minor 
> 
 Yeah that's an older update, this time around the problem is more tricky.

 You might be interested in this -virtualization thread:

	http://lists.freebsd.org/pipermail/freebsd-virtualization/2014-February/002236.html

(you can pass the raw email from mid.cgi to mutt -f to extract the patch:

	http://docs.freebsd.org/cgi/mid.cgi?CAExw994XswAp4yOVK54VTOg8Zy54sqAzxMNtUds1TJRiTnwisQ

)

 According to the patch author it still isn't complete but maybe it
still helps you...

 Good luck, :)
	Juergen
Comment 5 commit-hook freebsd_committer freebsd_triage 2014-09-20 09:51:54 UTC
A commit references this bug:

Author: nox
Date: Sat Sep 20 09:51:05 UTC 2014
New revision: 368631
URL: http://svnweb.freebsd.org/changeset/ports/368631

Log:
  - Finally import syrinx' fix for 10.0+, it seems to work no worse
    than kqemu worked before. [1]
  - Fix build on 10/i386.

  PR:		184984 [1]
  Submitted by:	syrinx [1]

Changes:
  head/emulators/kqemu-kmod-devel/Makefile
  head/emulators/kqemu-kmod-devel/files/patch-z-common-kernel.c
  head/emulators/kqemu-kmod-devel/files/patch-z-kqemu-freebsd.c
Comment 6 Juergen Lock freebsd_committer freebsd_triage 2014-09-20 09:58:55 UTC
Fix committed.  Thanks!