After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 675743 - configure check for libelf always defines HAVE_LIBELF
configure check for libelf always defines HAVE_LIBELF
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gio
2.32.x
Other Solaris
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-05-09 11:55 UTC by Fabian Groffen
Modified: 2018-05-24 14:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glib-2.32.2-solaris-libelf.patch (846 bytes, patch)
2012-05-09 11:55 UTC, Fabian Groffen
committed Details | Review

Description Fabian Groffen 2012-05-09 11:55:33 UTC
Created attachment 213733 [details] [review]
glib-2.32.2-solaris-libelf.patch

The configure check for libelf unintentionally always defines LIBELF when no pkg-config entry for libelf is available, such as when using the host-provided libelf on Solaris or FreeBSD.  As a result, even though the configure checks properly detected the found libelf is not sufficient, the code still tries to use it, with compilation errors as result.  The trivial patch attached avoids the default action of AC_SEARCH_LIB to define HAVE_LIBELF.
Comment 1 Matthias Clasen 2012-05-13 03:17:37 UTC
Review of attachment 213733 [details] [review]:

ok
Comment 2 Fabian Groffen 2012-05-29 08:20:56 UTC
Reopening.  Bug is still (or again?) present in 2.32.3.  The configure check has changed slightly by saving and restoring LIBS, but the real problem is that AC_SEARCH_LIB defines HAVE_LIBELF as default action.

commit
http://git.gnome.org/browse/glib/commit/?id=431d3adacdd640141f83a6c3496760adc6aba5eb
seems to have been overridden, or on a different branch.
Comment 3 Colin Walters 2012-05-29 22:27:52 UTC
This should be fixed for 2.32.4; http://git.gnome.org/browse/glib/commit/?h=glib-2-32&id=7fe1f97a128be5f48dcd1232250e96bd581a35c1

But it isn't released yet.
Comment 4 Fabian Groffen 2012-05-30 06:22:38 UTC
(In reply to comment #3)
> This should be fixed for 2.32.4;
> http://git.gnome.org/browse/glib/commit/?h=glib-2-32&id=7fe1f97a128be5f48dcd1232250e96bd581a35c1
> 
> But it isn't released yet.

That commit is in 2.32.3, and doesn't fix the issue (HAVE_LIBELF being defined).  Solaris HAS a libelf, but it doesn't have e.g. elf_getshdrstrndx, still HAVE_LIBELF is defined because elf_begin exists.  My original patch, and the one committed as http://git.gnome.org/browse/glib/commit/?id=431d3adacdd640141f83a6c3496760adc6aba5eb make sure HAVE_LIBELF isn't defined AND nothing added to LIBS.
Comment 5 Matthias Clasen 2012-09-03 14:49:06 UTC
Review of attachment 213733 [details] [review]:

This change is in master already
Comment 6 GNOME Infrastructure Team 2018-05-24 14:13:18 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/546.