discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failed gui test:NSView_autoresize_and_rounding WAS: gnustep compiled


From: David Chisnall
Subject: Re: Failed gui test:NSView_autoresize_and_rounding WAS: gnustep compiled with clang and gworkspace problem
Date: Wed, 5 Oct 2011 10:51:35 +0100

On 5 Oct 2011, at 10:46, Sebastian Reitenbach wrote:

> Hi,
> 
> On Wednesday, October 5, 2011 11:18 CEST, Fred Kiefer <fredkiefer@gmx.de> 
> wrote: 
> 
>> First off and completely unrelated to the actual issue: GNUstep seems to 
>> use fake main on your system. Why is this the case? As far as I know 
>> this shouldn't be needed on any normal operating system. Could you 
>> please check the configuration output of base to find out what is going 
>> on here?
> 
> what is actually the purpose of this fake main? I just hear the first time 
> about it.

GNUstep needs access to the program arguments.  If there is a libc API for 
doing this, it could use that.  Typically it uses procfs to look up the 
arguments.  If neither of these is available, it will interpose its own main() 
function in front of the real one so that it can capture argc / argv and then 
call your main().  This is a really ugly hack, but it's sometimes the only 
option...

> configure is called this way:
> 
> 
>  $ ./configure --disable-procfs --disable-procfs-psinfo --enable-debug 
> --disable-strip --prefix=/usr/local --sysconfdir=/etc --mandir=/usr/local/man 
> --infodir=/usr/local/info --disable-silent-rules

If you're disabling procfs, then you're probably getting fake main.

> in configure output I see:
> checking use of pass-through arguments... no
> checking use of fake-main definition... yes
> checking ffi.h usability... yes
> checking ffi.h presence... yes
> 
> in config.log I see:
> configure:21520: checking use of fake-main definition
> configure:21563: result: yes
> 
> in configure:21520 I see:
> 
> 
> { $as_echo "$as_me:$LINENO: checking use of fake-main definition" >&5
> $as_echo_n "checking use of fake-main definition... " >&6; }
> # Check whether --enable-fake-main was given.
> if test "${enable_fake_main+set}" = set; then
>  enableval=$enable_fake_main;
> else
>  enable_fake_main=no
> fi
> 
> 
> if test "$enable_pass_arguments" = "no"; then
>  case "$target_os" in
>    freebsd2*)  enable_fake_main=yes;;
>    freebsd*)   ;;
>    netbsd*)    enable_fake_main=yes;;
>    openbsd*)   enable_fake_main=yes;;
>    *sysv*)     enable_fake_main=yes;;
>  esac
> fi
> 
> so it's set unconditionally.
> 
> I can remove the line, and retry rebuilding everything and test whether it 
> will work without the fake main.

It will only work if there is some other mechanism for getting the arguments.  
I don't know if there is a codepath for OpenBSD.  If not, and there is a 
sensible way of accessing it, then it's worth adding...

David

-- Sent from my brain




reply via email to

[Prev in Thread] Current Thread [Next in Thread]