OpenOffice, problems II

Rupert Mazzucco rmaz at gmx.net
Mon Aug 28 11:54:29 UTC 2006


Another problem with building OOo at a later stage:  The idlc tool that 
comes with
OpenOffice hangs after announcing successful completion.  I googled for 
idlc hangs
and there are some results for an old similar problem that was related 
to thread handling
of one "libc_r" on FreeBSD, which I assume is a non-glibc, so maybe this 
one is
uclibc-related (uclibc-0.9.28):

Here is a portion of idlcmain.cxx passed through g++ -E (SAL_CALL is 
defined empty, if I traced
that correctly):

int main(int argc, char ** argv) { osl_setCommandArgs(argc, argv); 
return sal_main(argc, argv); }
int SAL_CALL sal_main(int argc, char ** argv)
{
     ... // does stuff that seems to work

    if ( nErrors > 0 )
    {
        fprintf(stdout, "%s: detected %d errors%s",
            options.getProgramName().getStr(), nErrors,
            options.prepareVersion().getStr());
    } else
    {
        fprintf(stdout, "%s: returned successful%s",
            options.getProgramName().getStr(),
            options.prepareVersion().getStr());
            // THIS IS PRINTED, SO IT MUST HANG AFTER HERE
    }
    exit(nErrors);
    return 0;
}


How can this hang?  (And by "hang", I mean "idle".  Ii doesn't use CPU 
time.)
It is linked to libpthread, so it is probably using threads somewhere.

Thanks,
Rupert


PS. The problem way back then with FreeBSD libc_r was solved by this 
seemingly simple patch:
> Index: uthread_detach.c
> ===================================================================
> RCS file: /opt/FreeBSD/cvs/src/lib/libc_r/uthread/uthread_detach.c,v
> retrieving revision 1.16
> diff -u -r1.16 uthread_detach.c
> --- uthread_detach.c    2001/05/20 23:08:32     1.16
> +++ uthread_detach.c    2002/03/06 19:00:17
> @@ -66,7 +66,9 @@
>                         PTHREAD_NEW_STATE(joiner, PS_RUNNING);
>  
>                         /* Set the return value for the woken thread: */
> -                       joiner->error = ESRCH;
> +                       joiner->join_status.error = ESRCH;
> +                       joiner->join_status.ret = NULL;
> +                       joiner->join_status.thread = NULL;
>  
>                         /*
>                          * Disconnect the joiner from the thread being detached:




More information about the uClibc mailing list