mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Will Dietz <w@wdtz.org>
To: musl@lists.openwall.com
Subject: Re: problem compiling bash-3.2.57 bash-4.4.12, seg fault
Date: Sun, 28 Jan 2018 12:29:36 +0900	[thread overview]
Message-ID: <CAKGWAO9gUA=mB06hZtsm0VRH02r8n=4TbqRi86ytOvsocmehiA@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1801270850030.11219@vcn.bc.ca>

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 <player@vcn.bc.ca> 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
>>
>


  reply	other threads:[~2018-01-28  3:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-27 16:19 Po-yi Wang
2018-01-27 16:45 ` Rich Felker
2018-01-27 16:51   ` Po-yi Wang
2018-01-28  3:29     ` Will Dietz [this message]
2018-01-28  6:49       ` Po-yi Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKGWAO9gUA=mB06hZtsm0VRH02r8n=4TbqRi86ytOvsocmehiA@mail.gmail.com' \
    --to=w@wdtz.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).