Re: ruby gem and library in C and debuginfo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello:

Dan Horák wrote, at 05/01/2009 04:34 AM +9:00:
Hi,

I am doing a review for a ruby gem package that includes a library
written in C (https://bugzilla.redhat.com/show_bug.cgi?id=497640) and
there are problems with proper generation of the debuginfo package. It
cannot find the source files, because the paths in the debugsources.list
contains the "ext/<libname>" part twice and that's wrong.

+ /usr/lib/rpm/find-debuginfo.sh
--strict-build-id /home/dan/rpmbuild/BUILD/rubygem-RedCloth-4.1.9
extracting debug info
from /home/dan/rpmbuild/BUILDROOT/rubygem-RedCloth-4.1.9-3.fc10.x86_64/usr/lib64/ruby/site_ruby/1.8/x86_64-linux/redcloth_scan.so
cpio:
rubygem-RedCloth-4.1.9/usr/lib/ruby/gems/1.8/gems/RedCloth-4.1.9/ext/redcloth_scan/ext/redcloth_scan/redcloth_attributes.c: Cannot stat: No such file or directory
cpio:
rubygem-RedCloth-4.1.9/usr/lib/ruby/gems/1.8/gems/RedCloth-4.1.9/ext/redcloth_scan/ext/redcloth_scan/redcloth_attributes.c.rl: Cannot stat: No such file or directory

<snip>
This is because .%{geminstdir}/ext/redcloth/*.{c,ri} contains #line directive.
For example, from redcloth_attributes.c:
-----------------------------------------------------------------
   10  #line 15 "ext/redcloth_scan/redcloth_attributes.c.rl"
11 12 13 14 #line 15 "ext/redcloth_scan/redcloth_attributes.c"
-----------------------------------------------------------------
In such case debuginfo tries to pick up files #line directive points to.
So this is not rubygem specific.

The easiest solution is something like
-----------------------------------------------------------------
%install
rm -rf %{buildroot}
# For short-circuit
rm -rf .%{geminstdir}/ext/redcloth_scan/ext/redcloth_scan
..
..
cp -a .%{gemdir}/* %{buildroot}%{gemdir}
..
..
# For debuginfo
mkdir -p .%{geminstdir}/ext/redcloth_scan/ext/redcloth_scan
cp -p .%{geminstdir}/ext/redcloth_scan/*.{c,rl} \
	.%{geminstdir}/ext/redcloth_scan/ext/redcloth_scan
-----------------------------------------------------------------

Regards,
Mamoru

--
Fedora-packaging mailing list
Fedora-packaging@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux