Re: bash-4.2, crosscompiling and job control compile failure

2012-03-28 Thread bigbigboy
On Sep 15, 9:20 am, Chet Ramey chet.ra...@case.edu wrote:
 On 9/14/11 4:57 PM, Maciej Grela wrote:

  In which tarball will your fix be released ? I don't understand the
  code flow between the tarballs and git on savannah, the git repo
  contains only imports from tarballs until 4.0, and the newest tarball
  is 4.2.

 It will come out as part of bash-4.3.  It may be released as a patch to
 bash-4.2, but, based on the number of reports, it's not a high-priority
 issue.

 Chet

 --
 ``The lyf so short, the craft so long to lerne.'' - Chaucer
                  ``Ars longa, vita brevis'' - Hippocrates
 Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Chet,
I tried to cross compile with arm toolchain.
Would you please have a check if the following patch is proper?
Thanks!

diff --git a/execute_cmd.c b/execute_cmd.c
index 485b0c7..20be69a 100644
--- a/execute_cmd.c
+++ b/execute_cmd.c
@@ -2202,7 +2202,11 @@ execute_pipeline (command, asynchronous,
pipe_in, pipe_out, fds_to_close)
   /* If the `lastpipe' option is set with shopt, and job control is
not
  enabled, execute the last element of non-async pipelines in the
  current shell environment. */
+#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
 {
   lstdin = move_to_high_fd (0, 0, 255);
   if (lstdin  0)


Re: bash-4.2, crosscompiling and job control compile failure

2012-03-28 Thread Chet Ramey
On 9/16/11 12:35 PM, bigbigboy wrote:
 On Sep 15, 9:20 am, Chet Ramey chet.ra...@case.edu wrote:
 On 9/14/11 4:57 PM, Maciej Grela wrote:

 In which tarball will your fix be released ? I don't understand the
 code flow between the tarballs and git on savannah, the git repo
 contains only imports from tarballs until 4.0, and the newest tarball
 is 4.2.

 It will come out as part of bash-4.3.  It may be released as a patch to
 bash-4.2, but, based on the number of reports, it's not a high-priority
 issue.

This came out as bash-4.2 patch 18.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



bash-4.2, crosscompiling and job control compile failure

2011-09-14 Thread Maciej Grela
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



Re: bash-4.2, crosscompiling and job control compile failure

2011-09-14 Thread Chet Ramey
 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

Surrounding those two lines with #ifdef JOB_CONTROL is the right fix.
I posted it here before when the issue first came up.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



Re: bash-4.2, crosscompiling and job control compile failure

2011-09-14 Thread Maciej Grela
2011/9/14 Chet Ramey chet.ra...@case.edu:
 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

 Surrounding those two lines with #ifdef JOB_CONTROL is the right fix.
 I posted it here before when the issue first came up.


In which tarball will your fix be released ? I don't understand the
code flow between the tarballs and git on savannah, the git repo
contains only imports from tarballs until 4.0, and the newest tarball
is 4.2.

Best regards,
Maciej Grela



Re: bash-4.2, crosscompiling and job control compile failure

2011-09-14 Thread Chet Ramey
On 9/14/11 4:57 PM, Maciej Grela wrote:

 In which tarball will your fix be released ? I don't understand the
 code flow between the tarballs and git on savannah, the git repo
 contains only imports from tarballs until 4.0, and the newest tarball
 is 4.2.

It will come out as part of bash-4.3.  It may be released as a patch to
bash-4.2, but, based on the number of reports, it's not a high-priority
issue.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/