Fedora Linux Support Community & Resources Center
Old 21st July 2009, 04:28 AM
Hlingler Offline
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,307
F11: "Hacking" libdrm SRPM/specfile [SOLVED]

I would like to re-build libdrm-devel (and libdrm) to include the Mach64 'include' file(s), to enable subsequent re-building of the mesa DRI driver and kmod. To date, F8 through F10, I've resorted to compiling the whole big mess from DRI GIT source code, and using checkinstall to create RPMs, but this is extremely tedious and even more of a "hack", and not reproducible (i.e.: no SRPMs available for re-build on other ARCHs).

The current stable libdrm for F11 is here: http://koji.fedoraproject.org/koji/b...buildID=112038

After reviewing the contents of the SRPM and it's spec file, I simply edited the %files list for libdrm-devel to add in the mach64_drm.h file, but the re-build fails at the very end, when checking for missing/unpackaged files: "file glob "mach64_drm.h" not found". I've stared at the spec file and source tarball, and all the other patches and such, but I can't see where things are going wrong. Any thoughts/help appreciated.

Reply With Quote
Old 21st July 2009, 05:28 AM
SuperNu Offline
Registered User
Join Date: Mar 2004
Posts: 617
The problem is that the spec file removes all *_drm.h files during compilation with the line 65
find $RPM_BUILD_ROOT -type f -name '*_drm.h' | xargs rm -f -- || :
In order to include mach64_drm.h, you will either have to remove this line and add
to the files section, or create a for loop like the one just below the find statement and remove all of the *_drm.h files you do not want to include.

for i in i915_drm.h mga_drm.h nouveau_drm.h r128_drm.h savage_drm.h sis_drm.h via_drm.h xgi_drm.h
rm -f $RPM_BUILD_ROOT/usr/include/drm/$i
I have attached a spec file with all the changes.

Attached Files
File Type: spec libdrm.spec (11.3 KB, 85 views)
Reply With Quote
Old 21st July 2009, 05:56 AM
Hlingler Offline
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,307
Thanks SuperNu. I figured it was something relatively simple that I was overlooking. I saw the line above it (and the comment above that) that removes the static libs (? *.la), I guess that threw me off. I'll fire up F11 in VBox here ASAP and try again with your edits.

Reply With Quote
Old 21st July 2009, 07:13 AM
Hlingler Offline
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,307
OK, yes, that worked. I had to add radeon_drm.h to the list of files to be purged, but as you set me on the path to righteousness and enlightenment, I figured out the rest easily. Seems like a lot of extra work and hacking to get the necessary stuff. Who knows why some of these files have been moved to kernel-headers, others left in libdrm-devel, others just plain dropped (much like live hand grenades)? Only the guys at Red Hat/Fedora Project....

All fixed!

I'm not sure that I (or my machine) am up to re-building all of Mesa tonight, but hopefully it should now build with the mach64_dri.so 3D driver. That's what the mach64_drm.h header file is (apparently) needed for.

Thanks Again,

EDIT: F11 Mesa re-build from SRPM succeeded today (with previous minor edits to spec file) including the desired mach64_dri.so 3D driver, as well as (re)compile of the drm.ko and mach64.ko kernel modules, so the above was indeed the missing piece of the puzzle. So far all software installs/loads successfully. Testing to follow....

Last edited by Hlingler; 22nd July 2009 at 03:18 AM.
Reply With Quote

f11, hacking, libdrm, solved, srpm or specfile

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Recompile From SRPM : How to change "new" config files?? Time2IPL Using Fedora 9 22nd February 2008 04:27 AM
system-config-date SRPM build requires "anaconda" on install? SHtRO Using Fedora 0 1st May 2006 10:16 PM
Where can I find "Mozilla SRPM" for Fedora 5? yinglcs Using Fedora 1 23rd March 2006 01:58 AM
Any "higher Level" tools for module hacking olwe Programming & Packaging 2 23rd January 2006 11:00 PM

Current GMT-time: 01:54 (Thursday, 17-08-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat