Bug 1027199 - Headers include platform dependant include files
Headers include platform dependant include files
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: opencl-headers (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Fabian Deutsch
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-06 06:14 EST by Fabian Deutsch
Modified: 2014-06-11 12:29 EDT (History)
7 users (show)

See Also:
Fixed In Version: opencl-headers-1.2-5.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-11 12:27:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to make headers usable on arm (2.61 KB, patch)
2014-04-25 04:05 EDT, Fabian Deutsch
no flags Details | Diff
Second try to attach the commit (2.61 KB, text/plain)
2014-04-25 04:48 EDT, Fabian Deutsch
no flags Details

  None (edit)
Description Fabian Deutsch 2013-11-06 06:14:34 EST
Description of problem:
It seems that cl.hpp includes platform dependant headers. This prevents the usage of opencl apps on non x86 arches. E.g. arm.
E.g.: https://koji.fedoraproject.org/koji/taskinfo?taskID=6143396

Version-Release number of selected component (if applicable):
f19

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
In file included from /usr/include/CL/cl.hpp:215:0,
                 from /builddir/build/BUILD/ocltoys-39c5bb1b3c2a/common/opencl.h:32,
                 from /builddir/build/BUILD/ocltoys-39c5bb1b3c2a/common/utils.h:25,
                 from /builddir/build/BUILD/ocltoys-39c5bb1b3c2a/common/ocltoy.h:25,
                 from /builddir/build/BUILD/ocltoys-39c5bb1b3c2a/common/ocltoy.cpp:29:
/usr/lib/gcc/i686-redhat-linux/4.8.2/include/emmintrin.h:31:3: error: #error "SSE2 instruction set not enabled"
 # error "SSE2 instruction set not enabled"
   ^
Comment 1 Fabian Deutsch 2013-11-06 06:27:30 EST
Seems to be a problem of the upstream khronos headers:
http://krblogs.com/post/64565799647/opencl-on-arm-linux

mabye we should point this out to khronos.

Why the heck are arch specific bits included in that header!? ...
Comment 2 Fabian Deutsch 2014-04-25 04:05:56 EDT
Created attachment 889553 [details]
Patch to make headers usable on arm

This patch is needed to build any opencl app on arm
Comment 3 Hans de Goede 2014-04-25 04:11:01 EDT
Hi,

(In reply to Fabian Deutsch from comment #2)
> Created attachment 889553 [details]
> Patch to make headers usable on arm
> 
> This patch is needed to build any opencl app on arm

Your attachment seems to be missing the arm-nosse2.patch it introdices.

Regards,

Hans
Comment 4 Fabian Deutsch 2014-04-25 04:48:41 EDT
Created attachment 889565 [details]
Second try to attach the commit
Comment 5 Fabian Deutsch 2014-04-25 04:49:34 EDT
Hey Hans,

thanks - updated the patch. I believe that bugzilla stripped some parts from the first patch. Attahced it as plain text now.
Comment 6 Hans de Goede 2014-04-25 04:53:11 EDT
Thanks, looks good now, I would say go ahead and commit + build it for rawhide, and then git merge f20 and f19 to master, and build them too.
Comment 7 Fabian Deutsch 2014-04-25 04:55:38 EDT
Yep - that is what I want to do.

Can you grant me the permissions in pkgdb - or can ths only be done by airlied?
Comment 8 Hans de Goede 2014-04-25 04:58:55 EDT
That can only be done by airlied I'm afraid.
Comment 9 Fabian Deutsch 2014-04-25 06:16:39 EDT
Hah.

That patch did not work!
It was a bit tricky to figure out why it did not.
The problem is that in this package we don't have a build root where all the sources are.

What I do now is, I install the files and apply the patch after installation. (still in %install, not in some %post).
Comment 10 Fedora Update System 2014-04-25 06:24:23 EDT
opencl-headers-1.2-4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/opencl-headers-1.2-4.fc20
Comment 11 Fedora Update System 2014-04-25 06:24:30 EDT
opencl-headers-1.2-4.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/opencl-headers-1.2-4.fc19
Comment 12 Michael Schwendt 2014-04-25 07:44:00 EDT
> The problem is that in this package we don't have a build root where all the
> sources are.

You are confusing the term "buildroot" with "builddir".

The underlying problem with the current spec is that %prep is empty. You could %setup an empty builddir as normal, copy the sources into that builddir, then %patch the files in the builddir as normal, and copy the final files into the %buildroot in %install.
Comment 13 Fabian Deutsch 2014-04-25 07:48:23 EDT
(In reply to Michael Schwendt from comment #12)
> > The problem is that in this package we don't have a build root where all the
> > sources are.
> 
> You are confusing the term "buildroot" with "builddir".

Yes, I probably mixed up builddir and -root.

> The underlying problem with the current spec is that %prep is empty. You
> could %setup an empty builddir as normal, copy the sources into that
> builddir, then %patch the files in the builddir as normal, and copy the
> final files into the %buildroot in %install.

Yes, I considered this (setting up a builddir using %setup).
But I did not see a benefit in doing this intermediate step. Furthermore I was not sure if I could use %setup without a tarball.
Comment 14 Michael Schwendt 2014-04-25 08:20:11 EDT
%setup -T -c

http://www.rpm.org/max-rpm-snapshot/s1-rpm-inside-macros.html
Comment 15 Hans de Goede 2014-04-25 08:54:06 EDT
Hi,

I've to side with Michael here, patching files in %install is just very very ugly, can you please fix things to do this properly ?

Thanks,

Hans
Comment 16 Fabian Deutsch 2014-04-25 09:59:06 EDT
Hey Hans and Michael,

I didn't get that Michael's comment was aimed at me to change it and use a builddir. But now that this was made clear - I'm happy to do so :)
Comment 17 Fedora Update System 2014-04-26 05:17:16 EDT
Package opencl-headers-1.2-5.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing opencl-headers-1.2-5.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5613/opencl-headers-1.2-5.fc20
then log in and leave karma (feedback).
Comment 18 Fedora Update System 2014-06-11 12:27:52 EDT
opencl-headers-1.2-5.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 19 Fedora Update System 2014-06-11 12:29:07 EDT
opencl-headers-1.2-5.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.