From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12416 Path: news.gmane.org!.POSTED!not-for-mail From: Po-yi Wang Newsgroups: gmane.linux.lib.musl.general Subject: Re: problem compiling bash-3.2.57 bash-4.4.12, seg fault Date: Sat, 27 Jan 2018 08:51:46 -0800 (PST) Message-ID: References: <20180127164517.GK1627@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: blaine.gmane.org 1517071813 10537 195.159.176.226 (27 Jan 2018 16:50:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 27 Jan 2018 16:50:13 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-12432-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jan 27 17:50:09 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1efTfx-0001fJ-VT for gllmg-musl@m.gmane.org; Sat, 27 Jan 2018 17:49:58 +0100 Original-Received: (qmail 15807 invoked by uid 550); 27 Jan 2018 16:52:00 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 15789 invoked from network); 27 Jan 2018 16:51:59 -0000 In-Reply-To: <20180127164517.GK1627@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:12416 Archived-At: On Sat, 27 Jan 2018, Rich Felker wrote: > On Sat, Jan 27, 2018 at 08:19:55AM -0800, Po-yi Wang wrote: >> hi >> >> i am attempting to statically compile bash-3.2.57 or bash-4.4.12, with >> gcc-4.0.4 binutils-2.24 and musl-1.1.18 musl-gcc wrapper. >> (seg fault occurred on arm target)(musl compiled with -g3) > > What configure command line did you use? By default bash uses (or at > least used to use) its own broken malloc replacement that's > incompatible with musl (and inherently UB). You need to disable that. > Look at the build recipe from any distro using musl, like: WGET_UNPACK bash-3.2.57.tar.xz LDFLAGS="-static" CC=musl-gcc ./configure --prefix=/usr/musl --enable-static-link --disable-nls --without-bash-malloc LDFLAGS="-static" CC=musl-gcc make > > https://git.alpinelinux.org/cgit/aports/tree/main/bash/APKBUILD?id=v3.7.0#n72 > > Rich >