Bug 155558 - emulators/qemu-devel broken on recent installs of CURRENT
Summary: emulators/qemu-devel broken on recent installs of CURRENT
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: 2011-03-14 19:40 UTC by Enji Cooper
Modified: 2013-04-27 18:20 UTC (History)
0 users

See Also:


Attachments
qemu-devel-patch-bsd-user-syscall.patch (537 bytes, patch)
2011-03-15 12:55 UTC, Enji Cooper
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer freebsd_triage 2011-03-14 19:40:10 UTC
Since mdf's rototilling of SYSCTL(9) in r217586, emulators/*qemu* is failing to build with errors like this:

/usr/ports/emulators/qemu-devel/work/qemu-0.13.0/bsd-user/syscall.c: In function 'sysctl_oldcvt':
/usr/ports/emulators/qemu-devel/work/qemu-0.13.0/bsd-user/syscall.c:215: error: 'CTLTYPE_QUAD' undeclared (first use in this function)
/usr/ports/emulators/qemu-devel/work/qemu-0.13.0/bsd-user/syscall.c:215: error: (Each undeclared identifier is reported only once
/usr/ports/emulators/qemu-devel/work/qemu-0.13.0/bsd-user/syscall.c:215: error: for each function it appears in.)

What needs to happen is that the instance of CTLTYPE_QUAD needs to be replaced with CTLTYPE_U64:

$ grep -B 4 -A 4 _QUAD /usr/ports/emulators/qemu-devel/work/qemu-0.13.0/bsd-user/syscall.c 
    case CTLTYPE_ULONG:
        *(uint64_t *)holdp = tswap64(*(unsigned long *)holdp);
        break;
#endif
    case CTLTYPE_QUAD:
        *(uint64_t *)holdp = tswap64(*(uint64_t *)holdp);
        break;
    case CTLTYPE_STRING:
        break;

Fix: 

Patch with an ifdef, like:

#if __FreeBSD_version__ < 900031
    case CTLTYPE_QUAD:
#else
    case CTLTYPE_U64:
#endif

Unfortunately mdf@ didn't bump __FreeBSD_version__ appropriately for the SYSCTL(9) KPI change.
How-To-Repeat: Upgrade to CURRENT r217586+ and try to build emulators/*qemu*.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-03-14 20:08:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->nox

Fix synopsis and assign.
Comment 2 Enji Cooper freebsd_committer freebsd_triage 2011-03-15 12:38:31 UTC
    This patch unbreaks the compile when ALL_TARGETS isn't defined in
the Makefile; unfortunately things fail to link with -lpthread when
ALL_TARGETS is specified.
Thanks,
-Garrett
Comment 3 Enji Cooper freebsd_committer freebsd_triage 2011-03-15 12:55:42 UTC
On Tue, Mar 15, 2011 at 5:38 AM, Garrett Cooper <yaneurabeya@gmail.com> wrote:
>    This patch unbreaks the compile when ALL_TARGETS isn't defined in
> the Makefile; unfortunately things fail to link with -lpthread when
> ALL_TARGETS is specified.


Let's try again.. this can and should be renamed to
files/patch-qemu-devel-patch-bsd-user-syscall.c
-Garrett
Comment 4 dfilter service freebsd_committer freebsd_triage 2011-03-15 18:30:18 UTC
nox         2011-03-15 18:30:02 UTC

  FreeBSD ports repository

  Added files:
    emulators/qemu-devel/files patch-bsd-user-syscall.c 
  Log:
  - (Attempt to) fix build on head.
  - No PORTREVISION bump since this is a build fix.
  
  PR:             ports/155558
  Submitted by:   Garrett Cooper <yaneurabeya@gmail.com>
  
  Revision  Changes    Path
  1.1       +16 -0     ports/emulators/qemu-devel/files/patch-bsd-user-syscall.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Juergen Lock freebsd_committer freebsd_triage 2011-03-15 18:34:08 UTC
State Changed
From-To: open->patched

Patch committed, please tell me if the port builds now since I currently 
don't have a head box to test it on.
Comment 6 dfilter service freebsd_committer freebsd_triage 2011-04-01 20:30:35 UTC
nox         2011-04-01 19:30:21 UTC

  FreeBSD ports repository

  Modified files:
    emulators/qemu-devel Makefile distinfo pkg-message pkg-plist 
    emulators/qemu-devel/files patch-90_security patch-Makefile 
                               patch-bsd-user-ld patch-tapclose 
                               pcap-patch 
  Added files:
    emulators/qemu-devel/files patch-qemu-timer.h 
  Removed files:
    emulators/qemu-devel/files patch-block-sheepdog.c 
                               patch-hw-vmware_vga.c 
                               patch-hw-zaurus.c patch-omap-uart 
  Log:
  - Update to 0.14.0 .
  - Update amd64 host bsd-user linker script to fix build on
    -current/amd64. [1]
  - Some updates to the pkg-message.
  
  PR:             ports/155558 [1]
  Submitted by:   Garrett Cooper <yaneurabeya@gmail.com> [1]
  
  Revision  Changes    Path
  1.119     +9 -8      ports/emulators/qemu-devel/Makefile
  1.57      +2 -3      ports/emulators/qemu-devel/distinfo
  1.8       +0 -13     ports/emulators/qemu-devel/files/patch-90_security
  1.10      +0 -9      ports/emulators/qemu-devel/files/patch-Makefile
  1.2       +0 -15     ports/emulators/qemu-devel/files/patch-block-sheepdog.c (dead)
  1.3       +239 -24   ports/emulators/qemu-devel/files/patch-bsd-user-ld
  1.3       +0 -74     ports/emulators/qemu-devel/files/patch-hw-vmware_vga.c (dead)
  1.2       +0 -24     ports/emulators/qemu-devel/files/patch-hw-zaurus.c (dead)
  1.2       +0 -146    ports/emulators/qemu-devel/files/patch-omap-uart (dead)
  1.1       +13 -0     ports/emulators/qemu-devel/files/patch-qemu-timer.h (new)
  1.2       +4 -3      ports/emulators/qemu-devel/files/patch-tapclose
  1.6       +11 -11    ports/emulators/qemu-devel/files/pcap-patch
  1.35      +26 -31    ports/emulators/qemu-devel/pkg-message
  1.28      +3 -2      ports/emulators/qemu-devel/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 Juergen Lock freebsd_committer freebsd_triage 2011-04-01 20:43:28 UTC
State Changed
From-To: patched->closed

Should be fixed with the latest update.
Comment 8 prlw1 2013-04-27 10:55:29 UTC
I saw this patch fly by one of the qemu lists. Wouldn't an OS agnostic
patch of the form:

#ifdef CTLTYPE_U64
    case CTLTYPE_U64:
#else
    case CTLTYPE_QUAD:
#endif

have worked? 

- it avoids relying on the accuracy of __FreeBSD_version__
- what happens when other OSes follow your lead in sysctl rototilling?

Cheers,

Patrick
Comment 9 Enji Cooper freebsd_committer freebsd_triage 2013-04-27 18:13:18 UTC
Yeah, that'd work too! It just makes figuring out the instigator of the chan=
ge a bit more difficult..
Thanks!
-Garrett

Sent from my iPhone

On Apr 27, 2013, at 2:55 AM, Patrick Welche <prlw1@cam.ac.uk> wrote:

> I saw this patch fly by one of the qemu lists. Wouldn't an OS agnostic
> patch of the form:
>=20
> #ifdef CTLTYPE_U64
>    case CTLTYPE_U64:
> #else
>    case CTLTYPE_QUAD:
> #endif
>=20
> have worked?=20
>=20
> - it avoids relying on the accuracy of __FreeBSD_version__
> - what happens when other OSes follow your lead in sysctl rototilling?
>=20
> Cheers,
>=20
> Patrick