Bug 216771

Summary: graphics/rawstudio: fails to build with clang 4.0
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: dim, samm
Priority: --- Keywords: needs-patch
Version: LatestFlags: bugzilla: maintainer-feedback? (samm)
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 216008    
Attachments:
Description Flags
Use anonymous labels in inline asm none

Description Jan Beich freebsd_committer 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 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 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 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 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