From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2678 Path: news.gmane.org!not-for-mail From: John Spencer Newsgroups: gmane.linux.lib.musl.general Subject: Re: Question about missing linux/version.h while statically compiling Redis Date: Fri, 25 Jan 2013 17:28:55 +0100 Message-ID: <5102B2C7.4020804@barfooze.de> References: <51028FD0.9050604@barfooze.de> <20130125150122.GG10600@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080404040606040602020706" X-Trace: ger.gmane.org 1359131388 20478 80.91.229.3 (25 Jan 2013 16:29:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Jan 2013 16:29:48 +0000 (UTC) Cc: Olivier Goudron To: musl@lists.openwall.com Original-X-From: musl-return-2679-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jan 25 17:30:08 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TymAC-0001Yr-QD for gllmg-musl@plane.gmane.org; Fri, 25 Jan 2013 17:30:00 +0100 Original-Received: (qmail 27888 invoked by uid 550); 25 Jan 2013 16:29:43 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 27880 invoked from network); 25 Jan 2013 16:29:43 -0000 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Mail/1.0 In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:2678 Archived-At: This is a multi-part message in MIME format. --------------080404040606040602020706 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 01/25/2013 04:52 PM, Olivier Goudron wrote: > Thanks to your explainations Nagy, i have understand what was needed. > > The compilation goes further but end now here : > debug.c:37:22: error: execinfo.h: No such file or directory > > Does execinfo.h is specific to gnu libc ? yes, it is specific to glibc. it provides: backtrace() backtrace_symbols() backtrace_symbols_fd() which are not defined in any standard. man backtrace says: VERSIONS backtrace(), backtrace_symbols(), and backtrace_symbols_fd() are pro‐ vided in glibc since version 2.1. CONFORMING TO These functions are GNU extensions. so the configure script of redis should check for availability of this functionality, and only make use of it when it is available. however this functionality is of dubious value, it is not the job of a program to print a backtrace after it crashed. especially since a crash means that undefined behaviour was invoked, so anything can happen. getting a backtrace is the job of the debugger (gdb). i have attached a dummy header which makes these symbols a no-op, you can drop it into musl's include dir or into the redis source tree. --------------080404040606040602020706 Content-Type: text/x-chdr; name="execinfo.h" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="execinfo.h" #ifndef _EXECINFO_H #define _EXECINFO_H define backtrace(A,B) 0 define backtrace_symbols(A, B) 0 define backtrace_symbols_fd(A,B,C) 0 #endif --------------080404040606040602020706--