Bug 1027199 - Headers include platform dependant include files
Summary: Headers include platform dependant include files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: opencl-headers
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fabian Deutsch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-06 11:14 UTC by Fabian Deutsch
Modified: 2014-06-11 16:29 UTC (History)
7 users (show)

Fixed In Version: opencl-headers-1.2-5.fc19
Clone Of:
Environment:
Last Closed: 2014-06-11 16:27:52 UTC
Type: Bug
Embargoed:


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

Description Fabian Deutsch 2013-11-06 11:14:34 UTC
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 11:27:30 UTC
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 08:05:56 UTC
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 08:11:01 UTC
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 08:48:41 UTC
Created attachment 889565 [details]
Second try to attach the commit

Comment 5 Fabian Deutsch 2014-04-25 08:49:34 UTC
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 08:53:11 UTC
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 08:55:38 UTC
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 08:58:55 UTC
That can only be done by airlied I'm afraid.

Comment 9 Fabian Deutsch 2014-04-25 10:16:39 UTC
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 10:24:23 UTC
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 10:24:30 UTC
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 11:44:00 UTC
> 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 11:48:23 UTC
(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 12:20:11 UTC
%setup -T -c

http://www.rpm.org/max-rpm-snapshot/s1-rpm-inside-macros.html

Comment 15 Hans de Goede 2014-04-25 12:54:06 UTC
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 13:59:06 UTC
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 09:17:16 UTC
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 16:27:52 UTC
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 16:29:07 UTC
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.