[Debian GNUstep maintainers] Bug#644868: gnustep-back-common: postinst fails: Error: for some reason, argv not properly set up during GNUstep base initialization

Yavor Doganov yavor at gnu.org
Mon Oct 10 09:23:42 UTC 2011


reassign 644868 libgnustep-base1.22
retitle 644868 Programs abort on kfreebsd* when arguments exceed 512
affects 644868 gnustep-back-common
block 629477 with 644868
thanks

On Sun, Oct 09, 2011 at 11:02:25PM +0200, Axel Beckert wrote:
> Package: gnustep-back-common
> Version: 0.20.1-2
> Severity: serious

> gnustep-back-common reproducibly fails to configure after upgrade on
> one of my systems (kfreebsd-i386) as follows.

> Error: for some reason, argv not properly set up during GNUstep base 
> initialization
> xargs: mknfonts: terminated by signal 6

This is a reincarnation of #593898, when the number of arguments exceeds 
512.  The attached test program demonstrates the problem:

$ make
$ i=0; d=0; while test $i -eq 0; do for d in `expr $((d + 1))`; do \
./obj/test `seq $d`; i=$?; done; done
Arguments given: 1
Arguments given: 2
...
Arguments given: 512
Error: for some reason, argv not properly set up during GNUstep base 
initialization

The condition which leads to the error is

  if (argv != 0 && argv[0] != 0)

which for some bizarre reason is false in this case.  It's either a 
kernel bug or limitation, I hope the GNU/kFreeBSD people have some clue?  
There's nothing wrong in the gnustep-base code...

The only way I see as a workaround is to build gnustep-base with 
--enable-fake-main, which is already the case on a number of *BSD 
systems.  However, this change is ABI-incompatible so all GNUstep 
packages must be binNMUed _again_ on kfreebsd*.  Is this acceptable for 
the release team?
-------------- next part --------------
#import <Foundation/Foundation.h>

int
main (int argc, char **argv)
{
  CREATE_AUTORELEASE_POOL (pool);
  NSProcessInfo *procinfo = [NSProcessInfo processInfo];
  NSArray *args = [procinfo arguments];
  printf ("Arguments given: %d\n", [args count]);
  RELEASE (pool);
  exit (EXIT_SUCCESS);
}
-------------- next part --------------
ifndef GNUSTEP_MAKEFILES
GNUSTEP_MAKEFILES := $(shell gnustep-config --variable=GNUSTEP_MAKEFILES)
endif

include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = test
test_OBJC_FILES = test.m
include $(GNUSTEP_MAKEFILES)/tool.make


More information about the pkg-GNUstep-maintainers mailing list