Bug 213841 - net-im/qTox: fix build on 9i386
Summary: net-im/qTox: fix build on 9i386
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jason E. Hale
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-27 21:35 UTC by Matthew Rezny
Modified: 2016-10-31 21:56 UTC (History)
2 users (show)

See Also:
yuri: maintainer-feedback+


Attachments
fix build of net-im/qTox on 9i386 (881 bytes, patch)
2016-10-27 21:35 UTC, Matthew Rezny
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Rezny freebsd_committer freebsd_triage 2016-10-27 21:35:42 UTC
Created attachment 176229 [details]
fix build of net-im/qTox on 9i386

qTox was recently marked BROKEN on 9 i386 due to a compilation error that I happen to recognize. I don't run 9 so this doesn't affect me, but I know the solution from using it on other ports; GCC defaults to 486 compatibility on i386 so 64bit atomic ops are not available unless specifying arch as 586 or better. The attached patch does just that, it sets march=586 when gcc is the compiler, arch is i386, and no march was set already by CPUTYPE. I verified this builds clean in a 9i386 jail with poudriere.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2016-10-27 22:03:52 UTC
Thanks!
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-10-31 07:00:14 UTC
A commit references this bug:

Author: jhale
Date: Mon Oct 31 07:00:10 UTC 2016
New revision: 424975
URL: https://svnweb.freebsd.org/changeset/ports/424975

Log:
  Fix build for 9.x i386

  Quarterly branch has a different version, but suffers from the same error, so
  the fix should be backported.

  videoframe.o: In function `VideoFrame::VideoFrame(unsigned long long, AVFrame*, QRect, int, bool)':
  videoframe.cpp:(.text+0x19db): undefined reference to `__atomic_fetch_add_8'
  camerasource.o: In function `CameraSource::CameraSource()':
  camerasource.cpp:(.text+0x327): undefined reference to `__atomic_fetch_add_8'
  corevideosource.o: In function `CoreVideoSource::CoreVideoSource()':
  corevideosource.cpp:(.text+0x121): undefined reference to `__atomic_fetch_add_8'
  collect2: error: ld returned 1 exit status
  gmake: *** [Makefile:793: qtox] Error 1

  PR:		213841
  Submitted by:	<matthew@reztek.cz>
  Approved by:	<yuri@rawbw.com> (maintainer)
  MFH:		2016Q4

Changes:
  head/net-im/qTox/Makefile
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-10-31 21:48:00 UTC
A commit references this bug:

Author: jhale
Date: Mon Oct 31 21:47:44 UTC 2016
New revision: 425030
URL: https://svnweb.freebsd.org/changeset/ports/425030

Log:
  MFH: r424975

  Fix build for 9.x i386

  Quarterly branch has a different version, but suffers from the same error, so
  the fix should be backported.

  videoframe.o: In function `VideoFrame::VideoFrame(unsigned long long, AVFrame*, QRect, int, bool)':
  videoframe.cpp:(.text+0x19db): undefined reference to `__atomic_fetch_add_8'
  camerasource.o: In function `CameraSource::CameraSource()':
  camerasource.cpp:(.text+0x327): undefined reference to `__atomic_fetch_add_8'
  corevideosource.o: In function `CoreVideoSource::CoreVideoSource()':
  corevideosource.cpp:(.text+0x121): undefined reference to `__atomic_fetch_add_8'
  collect2: error: ld returned 1 exit status
  gmake: *** [Makefile:793: qtox] Error 1

  PR:		213841
  Submitted by:	<matthew@reztek.cz>
  Approved by:	<yuri@rawbw.com> (maintainer)

  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2016Q4/
  branches/2016Q4/net-im/qTox/Makefile
Comment 4 Jason E. Hale freebsd_committer freebsd_triage 2016-10-31 21:56:18 UTC
Fixed in head and 2016Q4, thanks!