Bug 216771 - graphics/rawstudio: fails to build with clang 4.0
Summary: graphics/rawstudio: fails to build with clang 4.0
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: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-patch
Depends on:
Blocks: 216008
  Show dependency treegraph
 
Reported: 2017-02-04 05:22 UTC by Jan Beich
Modified: 2017-12-21 20:34 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (samm)


Attachments
Use anonymous labels in inline asm (2.14 KB, patch)
2017-02-04 22:33 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2017-02-04 05:22:53 UTC
fftwindow.cpp:177:7: error: invalid symbol redefinition
      "loop_analysis_sse_ua:\n"
      ^
<inline asm>:1:2: note: instantiated into assembly here
        loop_analysis_sse_ua:
        ^
fftwindow.cpp:205:7: error: invalid symbol redefinition
      "loop_analysis_sse_a:\n"
      ^
<inline asm>:1:2: note: instantiated into assembly here
        loop_analysis_sse_a:
        ^

http://package18.nyi.freebsd.org/data/headi386PR216008-default/2017-02-02_16h22m03s/logs/errors/rawstudio-2.0_14.log
http://package18.nyi.freebsd.org/data/headamd64PR216008-default/2017-01-29_16h09m05s/logs/errors/rawstudio-2.0_14.log
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-02-04 05:23:04 UTC
devel/llvm40 or CC=clang40 is unaffected, so you may need full environment to reproduce:

  $ poudriere jail -cj clang40 -v projects/clang400-import -m svn
  $ poudriere bulk -Ctj clang40 lang/julia
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2017-02-04 22:33:30 UTC
Created attachment 179618 [details]
Use anonymous labels in inline asm

The problem is that FFTWindow::applyAnalysisWindowSSE() contains named asm labels, and this gives trouble when inlining into the previous function.

It can be fixed easily by using anonymous labels, as in the attached patch.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2017-12-20 17:02:49 UTC
Comment on attachment 179618 [details]
Use anonymous labels in inline asm

Looks OK. Can you land it?

Approved by:	maintainer timeout (8 months)
Approved by:	jbeich
MFH:	 	2017Q4
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-12-21 20:31:29 UTC
A commit references this bug:

Author: dim
Date: Thu Dec 21 20:30:35 UTC 2017
New revision: 456945
URL: https://svnweb.freebsd.org/changeset/ports/456945

Log:
  Fix build of graphics/rawstudio with clang (or any recent optimizing
  compiler), by using anonymous labels in asm fragments.

  PR:		216771
  Approved by:	maintainer timeout (8 months)
  Approved by:	jbeich
  MFH:		2017Q4

Changes:
  head/graphics/rawstudio/files/patch-plugins_denoise_fftwindow.cpp