Re: OS/2: command-line length limit

2010-12-18 Thread Ralf Wildenhues
* KO Myung-Hun wrote on Fri, Dec 17, 2010 at 01:20:38PM CET:
 Ralf Wildenhues wrote:
  * KO Myung-Hun wrote on Sun, Nov 28, 2010 at 07:20:32AM CET:
  --- libltdl/m4/libtool.m4.org  2010-09-22 17:41:18.0 +0900
  +++ libltdl/m4/libtool.m4  2010-11-27 16:03:50.0 +0900
  @@ -1624,6 +1624,9 @@
 lt_cv_sys_max_cmd_len=32768
   fi
   ;;
  +  os2*)
  +lt_cv_sys_max_cmd_len=-1
  +;;
 *)
   lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2 /dev/null`
   if test -n $lt_cv_sys_max_cmd_len; then
  
  Is there really no maximum for the command line length on OS/2?
 
 It depends on a shell. I know, a default shell, cmd.exe, has 1024 length
 limit. But 4OS2.exe has other limit.
 In case of pdksh which is used really, it seems to have no limits.
 Although a computed length by libtool is 8192, it could handle a longer
 command line than 8192.

Well, what the Libtool macros do is compute a limit (that depends on
your current environment), and then only take a fraction of that, half
or so, to cope with additional environment.  If it computes 8192, then
chances are that your actual limit is not all that much higher.

Does the computation of the limit take very long?  Because if not, then
I'm inclined to leave it in and drop the above patch, as then a later
improvement to the limit will help users immediately.

 When porting VLC to OS/2, qt4 module needed a very long command line. So
 libtool try to create a reload object. The maximum length was 8192 at
 that time. Setting it to -1 does not need a reload object.

Does using the reload object work, or does it fail?
Users get fairly annoyed if the build fails due to the command line
length limit is actually exceeded.  We also need to think about users of
other packages, not just VLC, where the list may be much higher.

Thanks,
Ralf



Re: OS/2: command-line length limit

2010-12-18 Thread KO Myung-Hun
Hi/2.

Ralf Wildenhues wrote:
 * KO Myung-Hun wrote on Fri, Dec 17, 2010 at 01:20:38PM CET:
 Ralf Wildenhues wrote:
 * KO Myung-Hun wrote on Sun, Nov 28, 2010 at 07:20:32AM CET:
 --- libltdl/m4/libtool.m4.org  2010-09-22 17:41:18.0 +0900
 +++ libltdl/m4/libtool.m4  2010-11-27 16:03:50.0 +0900
 @@ -1624,6 +1624,9 @@
lt_cv_sys_max_cmd_len=32768
  fi
  ;;
 +  os2*)
 +lt_cv_sys_max_cmd_len=-1
 +;;
*)
  lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2 /dev/null`
  if test -n $lt_cv_sys_max_cmd_len; then

 Is there really no maximum for the command line length on OS/2?

 It depends on a shell. I know, a default shell, cmd.exe, has 1024 length
 limit. But 4OS2.exe has other limit.
 In case of pdksh which is used really, it seems to have no limits.
 Although a computed length by libtool is 8192, it could handle a longer
 command line than 8192.
 
 Well, what the Libtool macros do is compute a limit (that depends on
 your current environment), and then only take a fraction of that, half
 or so, to cope with additional environment.  If it computes 8192, then
 chances are that your actual limit is not all that much higher.
 
 Does the computation of the limit take very long?  

Unfortunately, yes. It takes very long time. It's the one of the parts
where it takes the most of configure time.

 When porting VLC to OS/2, qt4 module needed a very long command line. So
 libtool try to create a reload object. The maximum length was 8192 at
 that time. Setting it to -1 does not need a reload object.
 
 Does using the reload object work, or does it fail?

It depends on a output type.

OS/2 gcc can generate two output type. One is a.out, the other is OMF.

When using a.out, ld.exe is used for linkage. In this case, the reloaded
objects work well.

When using OMF, however, OMF linker does not understand the reloaded
objects by ld.exe.

In addition, a debug build can be created by OMF only.

So if possible, I want to avoid the situation using reloaded objects.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.0.11
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1GHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr




Re: OS/2: command-line length limit

2010-12-18 Thread KO Myung-Hun
Hi/2, again.

Ralf Wildenhues wrote:
 * KO Myung-Hun wrote on Fri, Dec 17, 2010 at 01:20:38PM CET:
 Ralf Wildenhues wrote:
 * KO Myung-Hun wrote on Sun, Nov 28, 2010 at 07:20:32AM CET:
 --- libltdl/m4/libtool.m4.org  2010-09-22 17:41:18.0 +0900
 +++ libltdl/m4/libtool.m4  2010-11-27 16:03:50.0 +0900
 @@ -1624,6 +1624,9 @@
lt_cv_sys_max_cmd_len=32768
  fi
  ;;
 +  os2*)
 +lt_cv_sys_max_cmd_len=-1
 +;;
*)
  lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2 /dev/null`
  if test -n $lt_cv_sys_max_cmd_len; then

 Is there really no maximum for the command line length on OS/2?

 It depends on a shell. I know, a default shell, cmd.exe, has 1024 length
 limit. But 4OS2.exe has other limit.
 In case of pdksh which is used really, it seems to have no limits.
 Although a computed length by libtool is 8192, it could handle a longer
 command line than 8192.
 
 Well, what the Libtool macros do is compute a limit (that depends on
 your current environment), and then only take a fraction of that, half
 or so, to cope with additional environment.  If it computes 8192, then
 chances are that your actual limit is not all that much higher.
 
 Does the computation of the limit take very long?  Because if not, then
 I'm inclined to leave it in and drop the above patch, as then a later
 improvement to the limit will help users immediately.
 

Ok. Please set lt_cv_sys_max_cmd_len to 8192 instead of -1. I've just
realized that I can override it when configuring.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.0.11
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1GHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr