help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Errors statically compiling bash on a Mac M1 (aarch64e).


From: Jeffrey Walton
Subject: Re: Errors statically compiling bash on a Mac M1 (aarch64e).
Date: Tue, 28 Feb 2023 10:55:01 -0500

On Tue, Feb 28, 2023 at 9:10 AM hi@tofn.xyz via <help-bash@gnu.org> wrote:
>
> I'm trying to statically compile bash-5.15 on my Mac M1 and I get an error 
> that
>
> checking size of size_t... configure: error: in 
> `/Volumes/ws/ws/blogs/bash-5.2.15':configure: error: cannot compute sizeof 
> (size_t)See `config.log' for more details
>
> As a sanity check I confirmed the following compiles and runs without error 
> using gcc and apples variant of clang:
>
> #include <stdint.h>
> int main() {    printf("%lu", sizeof(size_t));}

As a work around, I believe you can configure with size(size_t)
precomputed for configure. Something like:

    ./configure \
        <regular options> \
        ac__sizeof_size_t=8

I'm less sure about how to pass the result of a sizeof test. For
functions, you would use ac_func, like ac_func_malloc=yes. But I am
not sure about ac__sizeof. Maybe you can check the generated configure
script for the shell variable.

Jeff



reply via email to

[Prev in Thread] Current Thread [Next in Thread]