Bug 230899 - dns/void-zones-tools: error: unknown target CPU 'k6-3'
Summary: dns/void-zones-tools: error: unknown target CPU 'k6-3'
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-25 19:56 UTC by Marco Beishuizen
Modified: 2018-08-28 04:53 UTC (History)
2 users (show)

See Also:
vidar: maintainer-feedback+
tobik: merge-quarterly+


Attachments
dns__void-zones-tools.diff (1.33 KB, patch)
2018-08-26 02:56 UTC, Tobias Kortkamp
tobik: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Beishuizen 2018-08-25 19:56:20 UTC
After the portrevision bump of 29-07-2018, void-zones-tools fails to build:

[...]
===>  Building for void-zones-tools-1.0.2_3
--- store.o ---
--- hosts2zones.o ---
--- binutils.o ---
--- hosts2zones.o ---
cc  -march=native -mssse3 -ffast-math -std=c11 -g0 -Ofast -fstrict-aliasing -Wno-parentheses hosts2zones.c -c -o hosts2zones.o
--- store.o ---
cc  -march=native -mssse3 -ffast-math -std=c11 -g0 -Ofast -fstrict-aliasing -Wno-parentheses store.c -c -o store.o
--- binutils.o ---
cc  -march=native -mssse3 -ffast-math -std=c11 -g0 -Ofast -fstrict-aliasing -Wno-parentheses binutils.c -c -o binutils.o
error: unknown target CPU 'k6-3'
*** [binutils.o] Error code 1
[...]

My uname -a:
FreeBSD yokozuna 11.2-STABLE FreeBSD 11.2-STABLE #0 r335773: Fri Jun 29 15:55:48 CEST 2018     root@yokozuna:/usr/obj/usr/src/sys/YOKOZUNA  amd64

Regards,
Marco
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2018-08-26 02:54:28 UTC
Ports need to respect CFLAGS (see [1]) and this port evidently does
not.  Using `-march=native -msse3` is really bad because it creates
binaries that target the build host CPU only and they'll be unusable
on many machines with different (maybe older) CPUs.  The runtime when
using the binary package from pkg.FreeBSD.org is likely silently broken
on many machines too.

void-zone-tools's Makefile needs to be patched.

[1] https://www.freebsd.org/doc/en/books/porters-handbook/dads-cflags.html
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2018-08-26 02:56:36 UTC
Created attachment 196550 [details]
dns__void-zones-tools.diff
Comment 3 Vidar Karlsen 2018-08-26 21:13:02 UTC
The patch from Tobias (attc 196550) works fine in my tests[1] and should as far as I can see be implemented in any case as per the Handbook section on CFLAGS.

Marco: I don't have a k6 on which to test. Can you confirm that the patch fixes the build for you?

[1] I've run poudriere testport on 11.x on amd64, i386 and armv6 (qemu).
Comment 4 Marco Beishuizen 2018-08-27 08:35:20 UTC
(In reply to Vidar Karlsen from comment #3)
But I don't own a K6 either. My main machine is a dual Xeon (nocona). I'll test the patch later today.
Comment 5 Marco Beishuizen 2018-08-27 15:12:15 UTC
And I can confirm the patch works for me.
Thanks!

Regards,
Marco
Comment 6 Vidar Karlsen 2018-08-27 16:30:28 UTC
Comment on attachment 196550 [details]
dns__void-zones-tools.diff

Thanks!
Comment 7 Vidar Karlsen 2018-08-27 16:33:21 UTC
I'm trying to set maintainer-approval on the attachment, but nothing happens.
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-08-27 17:05:11 UTC
A commit references this bug:

Author: tobik
Date: Mon Aug 27 17:04:09 UTC 2018
New revision: 478228
URL: https://svnweb.freebsd.org/changeset/ports/478228

Log:
  dns/void-zones-tools: Respect CFLAGS and avoid using -march=native

  It currently compiles with -march=native which breaks on some
  machines

  cc  -march=native -mssse3 -ffast-math -std=c11 -g0 -Ofast -fstrict-aliasing -Wno-parentheses binutils.c -c -o binutils.o
  error: unknown target CPU 'k6-3'

  Given that the build is currently targeting the build host CPU,
  existing binary packages on pkg.FreeBSD.org (or elsewhere) might
  be broken on many machines too, so bump PORTREVISION to trigger a
  rebuild.

  PR:		230899
  Submitted by:	tobik
  Reported by:	Marco Beishuizen <mbeis@xs4all.nl>
  Approved by:	Vidar Karlsen <vidar@karlsen.tech> (maintainer)
  MFH:		2018Q3

Changes:
  head/dns/void-zones-tools/Makefile
  head/dns/void-zones-tools/files/patch-Makefile
Comment 9 Tobias Kortkamp freebsd_committer freebsd_triage 2018-08-27 17:16:26 UTC
Comment on attachment 196550 [details]
dns__void-zones-tools.diff

> I'm trying to set maintainer-approval on the attachment, but nothing happens.

Hmm, let me try.  Either way it's clear that you have given your approval,
thanks!
Comment 10 Tobias Kortkamp freebsd_committer freebsd_triage 2018-08-27 17:16:58 UTC
Waiting for MFH.
Comment 11 commit-hook freebsd_committer freebsd_triage 2018-08-28 04:53:23 UTC
A commit references this bug:

Author: tobik
Date: Tue Aug 28 04:53:12 UTC 2018
New revision: 478279
URL: https://svnweb.freebsd.org/changeset/ports/478279

Log:
  MFH: r478228

  dns/void-zones-tools: Respect CFLAGS and avoid using -march=native

  It currently compiles with -march=native which breaks on some
  machines

  cc  -march=native -mssse3 -ffast-math -std=c11 -g0 -Ofast -fstrict-aliasing -Wno-parentheses binutils.c -c -o binutils.o
  error: unknown target CPU 'k6-3'

  Given that the build is currently targeting the build host CPU,
  existing binary packages on pkg.FreeBSD.org (or elsewhere) might
  be broken on many machines too, so bump PORTREVISION to trigger a
  rebuild.

  PR:		230899
  Submitted by:	tobik
  Reported by:	Marco Beishuizen <mbeis@xs4all.nl>
  Approved by:	Vidar Karlsen <vidar@karlsen.tech> (maintainer)

  Approved by:	ports-secteam (miwi)

Changes:
_U  branches/2018Q3/
  branches/2018Q3/dns/void-zones-tools/Makefile
  branches/2018Q3/dns/void-zones-tools/files/patch-Makefile