Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 744785

Summary: libcrystalhd doesn't build on ARM due to use of sse compile options
Product: [Fedora] Fedora Reporter: Peter Robinson <pbrobinson>
Component: libcrystalhdAssignee: Jarod Wilson <jarodwilson>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jarodwilson, kwizart
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-11 08:06:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 245418    

Description Peter Robinson 2011-10-10 13:13:23 UTC
Being a mini PCIe card it should be possible to use these on ARM devices but it doesn't compile because it doesn't use optimal compile options for the ARM platform. It should probably use standard CFLAGS so it compiles optimal on all platforms.

failed job: http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=181261

+ make
OBJFILES = libcrystalhd_if.o libcrystalhd_int_if.o libcrystalhd_fwcmds.o libcrystalhd_priv.o libcrystalhd_fwdiag_if.o libcrystalhd_fwload_if.o libcrystalhd_parser.o
SRCFILES = libcrystalhd_if.cpp libcrystalhd_int_if.cpp libcrystalhd_fwcmds.cpp libcrystalhd_priv.cpp libcrystalhd_fwdiag_if.cpp libcrystalhd_fwload_if.cpp libcrystalhd_parser.cpp
LNM = libcrystalhd.so.3.6 libcrystalhd.so.3
g++  -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -O2 -Wall -fPIC -shared -fstrict-aliasing -msse2  -c -o libcrystalhd_if.o libcrystalhd_if.cpp
cc1plus: error: unrecognized command line option "-msse2"
make: *** [libcrystalhd_if.o] Error 1

Comment 1 Nicolas Chauvet (kwizart) 2012-08-01 23:01:18 UTC
Actually this is not as easy as removing -msse2 as CFLAGS. There is also a need to replace the whole chroma conversion done exclusively in SSE2 asm from this file:
http://git.linuxtv.org/jarod/crystalhd.git/blob/HEAD:/linux_lib/libcrystalhd/libcrystalhd_int_if.cpp

I've done a stupid patch that comment out the SSE2 assembly, but I wonder if another library couldn't do the job.

Comment 2 Peter Robinson 2012-08-01 23:06:30 UTC
> I've done a stupid patch that comment out the SSE2 assembly, but I wonder if
> another library couldn't do the job.

ORC is one that comes to mind (http://code.entropywave.com/orc/) as it does conversion into SIMD instructions for different platforms so SSE for x86 or NEON for ARM etc.