discuss-gnustep
[Top][All Lists]
Advanced

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

Re: netbsd-68k compile


From: Peter Cooper
Subject: Re: netbsd-68k compile
Date: Mon, 14 Apr 2003 08:24:22 +0200
User-agent: Mutt/1.4i

Hi Riccardo

> i  am trying to compile gnustep-objc on NetBSD-1.6 (gcc 2.95, gnu-make is
> installed)
> 
> i had a problem and Adam suggested it could be a pth-version problem
> 
> I updated pth to the latest version available in the BSD repository (there
> was effectivley a revision later) but I still get:
> 
>  Compiling file sendmsg.c ...
> sendmsg.c: In function `__objc_get_forward_imp':
> sendmsg.c:109: warning: control reaches end of non-void function
>  Compiling file thr-posix.c ...
> thr-posix.c: In function `__objc_thread_set_priority':
> thr-posix.c:101: storage size of `params' isn't known
> thr-posix.c:106: warning: implicit declaration of function
> `sched_get_priority_max'
> thr-posix.c:109: warning: implicit declaration of function
> `sched_get_priority_min'
 
> so what? Any ideas? anyone had similar problems?

I've been looking at this issue this weekend (I need threading for a 
small project).

>From a first look, the libobjc POSIX threads support does not seem to
be very happy with GNU pth, specificially because the pth people haven't
implemented all the pthread semantics (from the man page):

       The following undefined feature macros in "pthread.h"
       indicate (still) unsupported features:

        #undef  _POSIX_THREAD_PRIORITY_SCHEDULING
        #undef  _POSIX_THREAD_PRIO_INHERIT
        #undef  _POSIX_THREAD_PRIO_PROTECT
        #undef  _POSIX_THREAD_PROCESS_SHARED
        #undef  _POSIX_THREAD_SAFE_FUNCTIONS

The problem you are seeing is specifically to do with an undefined 
struct, sched_param, a problem which is present at least in the NetBSD package.

A guess at a fix might be to edit your /usr/pkg/include/pthread.h to comment
out the broken struct definition, and define something that (just might) work:

//struct sched_param;

struct sched_param {
  int sched_priority;
};

I've gotten a gcc 3.2 libobjc "working" with this kind of hack, but other
strange things started happening, including gdomap instability (???).

Peter




reply via email to

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