FS#9232 - libelf needs --enable-compat for bug-buddy and friends to work

Attached to Project: Arch Linux
Opened by Val L. (onestep_ua) - Wednesday, 16 January 2008, 16:48 GMT
Last edited by Jan de Groot (JGC) - Friday, 05 December 2008, 13:31 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Jan de Groot (JGC)
Andreas Radke (AndyRTR)
Architecture x86_64
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I've started building packages as regular user from the last pacman upgrade. When I've tried to build bug-buddy, it failed with the reason that "libelf.h" not found. So I've tried to build libelf as root, and it worked.
When I compared built packages, they had a difference with libelf.h, gelf.h and nlist.h in /usr/include. For some reason --enable-compat is set to false in fakeroot and these files won't be installed.

Additional info:
* package version(s): libelf 0.8.10-3.1, bug-buddy 2.20.1-1
* build environment: pacman 3.1.0-1, fakeroot 1.7.1-3

Steps to reproduce:
Build libelf as regular user.

Proposed solution:
Add --enable-compat to libelf's configure flags.
This task depends upon

Closed by  Jan de Groot (JGC)
Friday, 05 December 2008, 13:31 GMT
Reason for closing:  Fixed
Comment by Roman Kyrylych (Romashka) - Monday, 21 January 2008, 08:17 GMT
This may be not a packaging error at all. See  FS#9242 
Comment by Andreas Radke (AndyRTR) - Friday, 15 August 2008, 13:47 GMT
see http://www.mr511.de/software/libelf-0.8.10.README

"If you are running Linux with libc 5.* as the default C library,
and you plan to use the 64-bit functions, you must either use
``-I.../include/libelf'', or remove /usr/include/libelf.h and use
``--enable-compat'' when running configure. Libc 6.* (aka glibc2)
doesn't have its own <libelf.h>, <nlist.h> or <gelf.h>."

So the option --enable-compat shouldn't be needed. Also our packages that depend on libelf seem to build fine. Can you show me a PKGBUILD that is broken right now?
Comment by Val L. (onestep_ua) - Sunday, 24 August 2008, 05:36 GMT
Yes, though it isn't a PKGBUILD issue. :) bug-buddy 2.22.0 still fails:

checking for elf_version in -lelf... yes
checking libelf.h usability... no
checking libelf.h presence... no
checking for libelf.h... no
configure: error: libelf.h not found.
==> ERROR: Build Failed.

I think that adding --enable-compat is pretty safe and even required, because "Libc 6.* (aka glibc2) doesn't have its own <libelf.h>, <nlist.h> or <gelf.h>" and configure says that --enable-compat is "install <libelf.h>, <nlist.h> and <gelf.h> (default: auto)"

The interesting this is that --enable-compat automatically turns on when building package as root user without fakeroot, and everything works fine then. So, I think the problem can be related to:
1) fakeroot
2) user privileges (configure cannot check smth when building in fakeroot as user, etc.)
3) configure script itself.
Comment by Val L. (onestep_ua) - Sunday, 24 August 2008, 06:14 GMT
And, certainly, the other way to go is to fix bug-buddy. :) I've opened a new bug #11298 to discuss this issue from the other side.
Comment by Jan de Groot (JGC) - Monday, 25 August 2008, 06:45 GMT
Builds fine here with fakeroot. The autodetection doesn't detect the need of compat headers when libelf is already installed, so adding --enable-compat to the libelf package should fix this.

Loading...