From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12422 Path: news.gmane.org!.POSTED!not-for-mail From: Will Dietz Newsgroups: gmane.linux.lib.musl.general Subject: Re: problem compiling bash-3.2.57 bash-4.4.12, seg fault Date: Sun, 28 Jan 2018 12:29:36 +0900 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="UTF-8" X-Trace: blaine.gmane.org 1517110086 4036 195.159.176.226 (28 Jan 2018 03:28:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 28 Jan 2018 03:28:06 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-12438-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jan 28 04:28:02 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 1efddI-00009T-Vc for gllmg-musl@m.gmane.org; Sun, 28 Jan 2018 04:27:53 +0100 Original-Received: (qmail 1427 invoked by uid 550); 28 Jan 2018 03:29:51 -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 1402 invoked from network); 28 Jan 2018 03:29:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wdtz.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=QFDR2XLsYamG+e8CoiP9RFL+Yq62/sohNLMCkwUDohM=; b=GRNwS2wlEkP5TojmOhoRba6ZzFnutGFBiSmz9ao7hZYcBKZ2ecvhGK/g+hzcgLZMLi V7tf+mMcSCdoz4XqKl62X4YgG2x7XNuvmGlK2BV0ZlaLRWz7MgIfae3aXQwCGh4LwowO 4aP/g5GBrrZYO/9P+Q8oEMnsRVl7dysmppTF0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=QFDR2XLsYamG+e8CoiP9RFL+Yq62/sohNLMCkwUDohM=; b=bnrxUMIiFj+Vma3T3vMHl+MUtkQwyv5jO+EXxRNzQrJleuV+T7QW7nATUtWNqxODBr mmN/8i/QSCa+6yyQ0jG3YHqQtnBHMu9HE/S1VOs0tOvxgEp89Rvioz4H7Ig8hHmwaNMC 1VzLcjveT3MGsITfz4Bj/Rw7i35u13hI99MVoB4Y3WAYiqWv8FlYCB1VM69DIYjQ2As6 pnLCrM5RnKDstpHIQeSpwQquF7EFc7cWyaLMDTBB4GnabDGMHkq2ilKBrCn5SgFaxyqZ fyI/DarKrDcgX/BZ0HG+tf02uv8m+9Gqj0W8iwKtyBwZ078t6cNoUQ1Tuq30Ur/LS2i9 MaSw== X-Gm-Message-State: AKwxytdBvSYROUF3Z2Y/XYc5Go4rlSevK187aikH4OtKpZHIQgz1uIEf RFTYQyIvKNjD4Ulq/qJpHdzLpWrPYbRYoJ62+1yyxpEUig== X-Google-Smtp-Source: AH8x224bjMyDLUEtJ+twpUkS7ai+5yP4qINsOBPunI3nPPPztirV9dmeeYfxEud4y0LJ3ctNPsgKCOWeKOWYIpB2dmI= X-Received: by 10.157.59.245 with SMTP id k108mr15758020otc.275.1517110177605; Sat, 27 Jan 2018 19:29:37 -0800 (PST) X-Originating-IP: [211.38.165.1] In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:12422 Archived-At: For static bash I also found useful to disable loadable builtins, which required both this patch[1] and specifying these configure overrides (just append them to your ./configure invocation): ac_cv_func_dlopen=no ac_cv_func_dlclose=no ac_cv_func_dlsym=no Don't remember if this was to workaround a crash but maybe this helps you. Good luck! ~Will [1] Attachment on https://lists.gnu.org/archive/html/bug-bash/2016-10/msg00006.html On Sun, Jan 28, 2018 at 1:51 AM, Po-yi Wang wrote: > > > 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 >> >