Red Hat Bugzilla – Bug 112735
debuginfo should be more portable
Last modified: 2007-04-18 13:00:53 EDT
The ability to generate a separate debuginfo package is a strong
feature. It's currently limited to system with GNU utilities and
the debug shadow dirs are not site-customizable. It should be more
Created attachment 96730 [details]
Add POSIX portability and site customization
I'm unable to easily test the debugedit.c part of the patch,
and I'm not familiar with popt, but it's simple enough that
you'll be able to massage it into shape if it's bad.
I tested the find-debuginfo.sh change by pre-processing the
debugsources.list file with a s/\000/\n/ edit.
See the patch for some inline comments.
There's bigger problems than POSIX and customize that
need solve with -debuginfo first.
For example, since elf section headers are being rewritten
on the fly without realloc, -debuginfo generation is possible
pnly because the path /usr/src/debug is 1 character shorter
than /usr/src/redhat. That needs solve before it makes any sense
to make /usr/src/debug configurable for portability imho.
debugedit.c depends not on GNU tools, but specifically on elfutils.
That too needs solve before POSIX makes any sense.
NEEDINFO so I don't have to stare at this bug for months.
Yes, more work is needed, but I started with the easy parts ...
The change is a no-op (except for site cust.), so why not use
it anyway? It will at least make that part easy. It's trivial
to add a check on the name length for the debug srcdir since topdir
is available in the environment to find-debuginfo.sh.
Note that the Solaris toolchain writes debug info similarly already
(I'm told), so if you're not using GNU gcc you don't need elfutils
to do the extraction. (but you still need it for debugedit.c)
I will be looking at the elf stuff in short order. It may be beyond
my capabilities to do quickly but I think it's within reason.
Anyway, I'm happy to leave this bug pending and I'll attach more
patches as I spend more time on it.
There are bigger problems with elfutils, including licensing.
It's very unclear what is going to happen to -debuginfo.
Closing due to inactivity. If this issue still occurs with current releases,
please reopen and set the release in which you've encountered the problem.
Repost due to HW failure:
I'm currently trying to build rpm-4.4.6 on Sun Solaris 2.9 on sparc64. I've
coerced it to (almost) build completely. The exception being: debugedit. When I
put the location of libdwarf.h, /opt/SUNWspro/prod/include/libdwarf/dwarf.h,
into CPPFLAGS and the location of libdwarf.so,
/opt/SUNWspro/prod/lib/libdwarf.so, into LDFLAGS, it tries to build and fails. I
made an attachment that contains the end of my log file from attempting to build
rpm. Is it possible, yet, to have -debuginfo packages on non-Linux systems?
Created attachment 131088 [details]
End of my log file when trying to build debugedit on solaris 2.9/sparc64