Skip to contentSkip to conversation

htop: work-around old uClibc issue when static linking

PATCH New Thomas Petazzoni 2 participants 2 messages Feb 26, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 htop: work-around old uClibc issue when static linking

htop wants to use backtrace() support from the C library. Unfortunately, with old uClibc versions such as the one we use for the ARC architecture, the backtrace() implementation is in libubacktrace. In addition, this implementation needs dladdr() support, which is in libdl, not available when static linking.

Since this problem no longer exists in more recent versions of uClibc, we simply special case the ARC+static linking case, and make the configure script believe that <execinfo.h> is not available.

Fixes:

http://autobuild.buildroot.net/results/cdea351fad7a0f61ddec3e6a141da8da0523a902/

---
 package/htop/htop.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/htop/htop.mk +7 -0
index adc5090..9451d15 100644
@@ -18,4 +18,11 @@ else
 HTOP_CONF_OPTS += --disable-unicode
 endif
 
+# ARC uses an old uClibc that needs dladdr() for backtrace support,
+# which doesn't work for static only scenario, so as a workaround, we
+# pretend that execinfo.h is not available.
+ifeq ($(BR2_arc)$(BR2_STATIC_LIBS),yy)
+HTOP_CONF_ENV += ac_cv_header_execinfo_h=no
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 htop: work-around old uClibc issue when static linking

Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

htop wants to use backtrace() support from the C library. Unfortunately, with old uClibc versions such as the one we use for the ARC architecture, the backtrace() implementation is in libubacktrace. In addition, this implementation needs dladdr() support, which is in libdl, not available when static linking.

Since this problem no longer exists in more recent versions of uClibc, we simply special case the ARC+static linking case, and make the configure script believe that <execinfo.h> is not available.

Quoted 5 lines

Fixes:

http://autobuild.buildroot.net/results/cdea351fad7a0f61ddec3e6a141da8da0523a902/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard