Hi, I'm trying to crosscompile bash-4.2 for a parisc CPU using Gentoo and I've hit the following error:
hppa-unknown-linux-gnu-gcc -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"hppa"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"hppa-unknown-linux-gnu"' -DCONF_VENDOR ='"unknown"' -DLOCALEDIR='"/usr/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -DDEFAULT_PATH_VALUE='"/usr/local/ sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' -DSTANDARD_UTILS_PATH='"/bin:/usr/bin:/sbin:/usr/sbin"' -DSYS_BASHRC='"/etc/bash/bashrc"' -DSYS_BASH_LOG OUT='"/etc/bash/bash_logout"' -DNON_INTERACTIVE_LOGIN_SHELLS -DSSH_SOURCE_BASHRC -Os -pipe -fomit-frame-pointer -I/usr/hppa-unknown-linux-gnu/usr/include/ -I/usr/hppa-unknown-linux-gnu/include/ -c execute_cmd.c rm -f lsignames.h ./mksignames lsignames.h execute_cmd.c: In function ‘execute_in_subshell’: execute_cmd.c:1507:5: warning: passing argument 1 of ‘execute_command_internal’ discards qualifiers from pointer target type execute_cmd.c:522:1: note: expected ‘struct COMMAND *’ but argument is of type ‘volatile struct COMMAND *’ rm -f version.o execute_cmd.c: In function ‘execute_pipeline’: execute_cmd.c:2205:23: error: ‘job_control’ undeclared (first use in this function) execute_cmd.c:2205:23: note: each undeclared identifier is reported only once for each function it appears in hppa-unknown-linux-gnu-gcc -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"hppa"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"hppa-unknown-linux-gnu"' -DCONF_VENDOR='"unknown"' -DLOCALEDIR='"/usr/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -DDEFAULT_PATH_VALUE='"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' -DSTANDARD_UTILS_PATH='"/bin:/usr/bin:/sbin:/usr/sbin"' -DSYS_BASHRC='"/etc/bash/bashrc"' -DSYS_BASH_LOGOUT='"/etc/bash/bash_logout"' -DNON_INTERACTIVE_LOGIN_SHELLS -DSSH_SOURCE_BASHRC -Os -pipe -fomit-frame-pointer -I/usr/hppa-unknown-linux-gnu/usr/include/ -I/usr/hppa-unknown-linux-gnu/include/ -c version.c execute_cmd.c: In function ‘execute_function’: execute_cmd.c:4243:3: warning: passing argument 1 of ‘array_rshift’ discards qualifiers from pointer target type array.h:56:12: note: expected ‘struct ARRAY *’ but argument is of type ‘volatile struct ARRAY *’ execute_cmd.c:4245:3: warning: passing argument 1 of ‘array_rshift’ discards qualifiers from pointer target type array.h:56:12: note: expected ‘struct ARRAY *’ but argument is of type ‘volatile struct ARRAY *’ execute_cmd.c:4320:3: warning: passing argument 1 of ‘array_shift’ discards qualifiers from pointer target type array.h:55:23: note: expected ‘struct ARRAY *’ but argument is of type ‘volatile struct ARRAY *’ execute_cmd.c:4321:3: warning: passing argument 1 of ‘array_shift’ discards qualifiers from pointer target type array.h:55:23: note: expected ‘struct ARRAY *’ but argument is of type ‘volatile struct ARRAY *’ make: *** [execute_cmd.o] Błąd 1 make: *** Oczekiwanie na niezakończone zadania.... rm -f callback.o The reason for this error seems to be, that the following line in execute_cmd.c: if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) is not protected by a "#if defined (JOB_CONTROL)" directive like all the other places in the file. I suspect this is a bug but it's the first time I'm studying bash code so I don't know if a simple fix: #if defined (JOB_CONTROL) if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) #else if (lastpipe_opt && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) #endif /* JOB_CONTROL */ will be OK in this case. What is your opinion ? Should I post a bug on Savannah or can you patch this right away ? Best regards, Maciej Grela