Hello,

I tried to compile Bash 4.4 in Habitat(habitat.sh):
https://github.com/habitat-sh/core-plans/tree/master/bash and it fails to
compile with the following messages:
```
gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"'
-DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"x86_64-unknown-linux-gnu"'
-DCONF_VENDOR='"unknown"'
-DLOCALEDIR='"/hab/pkgs/lilian/bash/4.4.0/20160916115954/share/locale"'
-DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H   -I.
-I/hab/pkgs/core/readline/6.3.8/20160729192706/include -I. -I./include
-I./lib  -I/hab/pkgs/core/glibc/2.22/20160612063629/include
-I/hab/pkgs/core/ncurses/6.0/20160612075116/include
-I/hab/pkgs/core/readline/6.3.8/20160729192706/include
-I/hab/pkgs/core/make/4.2.1/20160729193703/include
-I/hab/pkgs/core/gcc/5.2.0/20160612064854/include
-I/hab/pkgs/core/glibc/2.22/20160612063629/include
-I/hab/pkgs/core/ncurses/6.0/20160612075116/include
-I/hab/pkgs/core/readline/6.3.8/20160729192706/include
-I/hab/pkgs/core/make/4.2.1/20160729193703/include
-I/hab/pkgs/core/gcc/5.2.0/20160612064854/include -Wno-parentheses
-Wno-format-security -c bashhist.c
bashhist.c: In function 'load_history':
bashhist.c:324:31: error: 'history_lines_read_from_file' undeclared (first
use in this function)
       history_lines_in_file = history_lines_read_from_file;
                                       ^
bashhist.c:324:31: note: each undeclared identifier is reported only once
for each function it appears in
bashhist.c: In function 'maybe_save_shell_history':
bashhist.c:474:32: error: 'history_lines_written_to_file' undeclared (first
use in this function)
        history_lines_in_file = history_lines_written_to_file;
                                        ^
make: *** [Makefile:99: bashhist.o] Error 1
```

The issue is very easy to reproduce if you "install"(it's a static binary)
Habitat, because it builds in an isolated environment.
I prepared the change in a fork(Bash 4.3 compiles ok, only 4.4 does not
compile).
In order to reproduce the issue, you can follow these steps:

1. Download the latest version of Habitat for Linux:
https://www.habitat.sh/docs/get-habitat/

2. tar xf hab-0.9.1-20160901204602-x86_64-linux.tar.gz && sudo mv
hab-0.9.1-20160901204602-x86_64-linux/hab /usr/local/bin/

3. alias hab="sudo hab"

4. "hab setup" is necessary to generate a key, later used to enter the hab
studio, to build "bash":
$ hab setup

5. You most probably already have Git, but to fill the steps:
$ hab install core/git && hab pkg binlink --dest /usr/local/bin core/git git

6. git clone https://github.com/lilianmoraru/core-plans.git && cd core-plans

7. hab studio enter

8. cd bash && export DO_CHECK=true

9. build

Reply via email to