Re: Building on OS X

From: Patrick Mahoney <pat_at_polycrystal.org>
Date: Tue, 08 Apr 2014 11:01:15 -0500

On 07.04.2014 18:40, Laurent Bercot wrote:

>> The first changes /bin/sh to /bin/bash so that "echo -n" works as
>> intended (with /bin/sh, the "-n" is not interpreted as an argument).
>
> Do you mean it's interpreted literally instead of as an option ?
> I'd rather not depend on bash for the build.

Yes, for example:

   $ /bin/sh --version
   GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)

   $ /bin/sh -c 'echo -n hello'
   -n hello

   $ /bin/bash -c 'echo -n hello'
   hello

On a Linux machine with Bash 4, the "-n" does suppress newline,
even when invoked as /bin/sh, so not sure if it's a Bash 3 vs. 4
thing, or an OS X oddity.

For what it's worth, I'm using nix [1] to build s6, and it provides
an easy way to apply patches at build time, so it's not a big deal for
me.
I'll leave it to you if you want to change it to 'printf' or leave it
as is.

[1] http://nixos.org/nix/

> Things only break when flag-allstatic is absent, i.e. you're trying
> to
> build shared libraries.

Ah, thank you. I'm not actually using the shared libraries (building
execline
and s6 with flag-allstatic), so I will try that route for skalibs.

-- 
Patrick Mahoney
Received on Tue Apr 08 2014 - 16:01:15 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC