public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: objc/2713: Most objc tests fail on solaris2 w/missing thread functions
@ 2001-05-02 15:16 Kaveh R. Ghazi
  0 siblings, 0 replies; 4+ messages in thread
From: Kaveh R. Ghazi @ 2001-05-02 15:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR objc/2713; it has been noted by GNATS.

From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
To: ro@TechFak.Uni-Bielefeld.DE
Cc: gcc-gnats@gcc.gnu.org, ovidiu@cup.hp.com, shebs@apple.com
Subject: Re: objc/2713: Most objc tests fail on solaris2 w/missing thread functions
Date: Wed, 2 May 2001 18:10:54 -0400 (EDT)

  > From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
  > 
  > ghazi@caip.rutgers.edu writes:
  > 
  > > The problem for all of the failures on my platform are of
  > > this form:
  > > 
  > > Undefined                       first referenced
  > >  symbol                             in file
  > > sched_get_priority_max              /teal/caip5/ghazi/gcc-testing/build/sparc-sun-solaris2.7/libobjc/.libs/libobjc.a(thr-objc.o)
  > > sched_get_priority_min              /teal/caip5/ghazi/gcc-testing/build/sparc-sun-solaris2.7/libobjc/.libs/libobjc.a(thr-objc.o)
  > > 
  > > These functions are called from libobjc/thr-posix.c.
  > > >How-To-Repeat:
  > > Bootstrap on solaris2 and run the objc testsuite
  > > >Fix:
  > 
  > I've already posted a patch two months ago:
  > 
  > 	http://gcc.gnu.org/ml/gcc-patches/2001-03/msg00125.html
 
 Thanks Rainer!
 
 Two issues:
 
 1.  I think the following bit:
 
 AC_CHECK_LIB(rt, sched_get_priority_max,, AC_CHECK_LIB(posix4, sched_get_priority_max))
 AC_CHECK_FUNCS(sched_get_priority_max)
 
 might be more concisely implemented using AC_SEARCH_LIBS, e.g.
 
 AC_SEARCH_LIBS(sched_get_priority_max, rt posix4)
 
 You may need to stick AC_DEFINE(HAVE_SCHED_GET_PRIORITY_MAX) in the
 [ACTION-IF-FOUND] field, I can't remember.  LIBS will get either
 nothing or -lrt or -lposix4 as necessary.
 
 
 2.  On a more general note, how does checking for the library at
 configure time get it used when linking with libobjc during the
 testsuite run or later when gcc is installed and used by users?  Is
 that handled magically by libtool?  (I don't know libtool at all.)
 
 		Thanks,
 		--Kaveh
 --
 Kaveh R. Ghazi			Engagement Manager / Project Services
 ghazi@caip.rutgers.edu		Qwest Internet Solutions


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: objc/2713: Most objc tests fail on solaris2 w/missing thread functions
@ 2001-05-03  5:16 Rainer Orth
  0 siblings, 0 replies; 4+ messages in thread
From: Rainer Orth @ 2001-05-03  5:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR objc/2713; it has been noted by GNATS.

From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
To: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
Cc: gcc-gnats@gcc.gnu.org, ovidiu@cup.hp.com, shebs@apple.com,
        gcc-bugs@gcc.gnu.org
Subject: Re: objc/2713: Most objc tests fail on solaris2 w/missing thread functions
Date: Thu, 3 May 2001 14:06:14 +0200 (MEST)

 Kaveh R. Ghazi writes:
 
 > Two issues:
 > 
 > 1.  I think the following bit:
 > 
 > AC_CHECK_LIB(rt, sched_get_priority_max,, AC_CHECK_LIB(posix4, sched_get_priority_max))
 > AC_CHECK_FUNCS(sched_get_priority_max)
 > 
 > might be more concisely implemented using AC_SEARCH_LIBS, e.g.
 > 
 > AC_SEARCH_LIBS(sched_get_priority_max, rt posix4)
 > 
 > You may need to stick AC_DEFINE(HAVE_SCHED_GET_PRIORITY_MAX) in the
 > [ACTION-IF-FOUND] field, I can't remember.  LIBS will get either
 > nothing or -lrt or -lposix4 as necessary.
 
 true, but you had to stick the HAVE_SCHED_GET_PRIORITY_MAX template into
 acconfig.h manually, and add the found library to LIBS if [ACTION-IF-FOUND]
 isn't empty.  The best route is probably
 
 AC_SEARCH_LIBS(sched_get_priority_max, rt posix4)
 AC_CHECK_FUNCS(sched_get_priority_max)
 
 This adds the required libraries to LIBS and defines
 HAVE_SCHED_GET_PRIORITY_MAX.  I haven't tried this yet, though.
 
 > 2.  On a more general note, how does checking for the library at
 > configure time get it used when linking with libobjc during the
 > testsuite run or later when gcc is installed and used by users?  Is
 > that handled magically by libtool?  (I don't know libtool at all.)
 
 It works ok for the shared libobjc: libtool records the dependency in
 libobjc.so.  But you're right: this won't work when a static libobjc needs
 -lrt or -lposix4 and libtool isn't used for linking, either during the
 testsuite run or when the installed static libobjc.a is used.  I'm not
 really certain how to handle this: the objc testsuite will have to be
 converted to use libtool for linking anyway, since GNU ld on Linux seems to
 require some obscene flag to find the right uninstalled libgcc_s at link
 time, something which should be done via libtool instead of hardcoding this
 stuff in the testsuite.  I think that the new dejagnu based libstdc++ v3
 testsuite (only on the mainline right now) has the necessary support, which
 can probably be stolen from there or (better yet) moved to a common place.
 
 Linking an installed (or uninstalled) static libobjc without libtool is
 another issue: I have no idea what we should do about this.
 
 	Rainer
 
 -----------------------------------------------------------------------------
 Rainer Orth, Faculty of Technology, Bielefeld University
 
 Email: ro@TechFak.Uni-Bielefeld.DE
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: objc/2713: Most objc tests fail on solaris2 w/missing thread functions
@ 2001-05-02 13:16 Rainer Orth
  0 siblings, 0 replies; 4+ messages in thread
From: Rainer Orth @ 2001-05-02 13:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR objc/2713; it has been noted by GNATS.

From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
To: ghazi@caip.rutgers.edu
Cc: gcc-gnats@gcc.gnu.org, shebs@apple.com, ovidiu@cup.hp.com
Subject: Re: objc/2713: Most objc tests fail on solaris2 w/missing thread functions
Date: 02 May 2001 22:14:48 +0200

 ghazi@caip.rutgers.edu writes:
 
 > The problem for all of the failures on my platform are of
 > this form:
 > 
 > Undefined                       first referenced
 >  symbol                             in file
 > sched_get_priority_max              /teal/caip5/ghazi/gcc-testing/build/sparc-sun-solaris2.7/libobjc/.libs/libobjc.a(thr-objc.o)
 > sched_get_priority_min              /teal/caip5/ghazi/gcc-testing/build/sparc-sun-solaris2.7/libobjc/.libs/libobjc.a(thr-objc.o)
 > 
 > These functions are called from libobjc/thr-posix.c.
 > >How-To-Repeat:
 > Bootstrap on solaris2 and run the objc testsuite
 > >Fix:
 
 I've already posted a patch two months ago:
 
 	http://gcc.gnu.org/ml/gcc-patches/2001-03/msg00125.html
 
 and the relevant part has been ok'd
 
 	http://gcc.gnu.org/ml/gcc-patches/2001-04/msg00074.html
 	
 but never checked in.
 
 	Rainer
 
 -- 
 -----------------------------------------------------------------------------
 Rainer Orth, Faculty of Technology, Bielefeld University
 
 Email: ro@TechFak.Uni-Bielefeld.DE


^ permalink raw reply	[flat|nested] 4+ messages in thread

* objc/2713: Most objc tests fail on solaris2 w/missing thread functions
@ 2001-05-02  8:56 ghazi
  0 siblings, 0 replies; 4+ messages in thread
From: ghazi @ 2001-05-02  8:56 UTC (permalink / raw)
  To: gcc-gnats; +Cc: shebs, ovidiu

>Number:         2713
>Category:       objc
>Synopsis:       Most objc tests fail on solaris2 w/missing thread functions
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 02 08:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Kaveh Ghazi
>Release:        3.0 20010501 (prerelease)
>Organization:
>Environment:
sparc-sun-solaris2.7
>Description:
Most of the objc testsuite entries fail on solaris2 as shown
in the following URLs:

http://gcc.gnu.org/ml/gcc-testresults/2001-05/msg00016.html
http://gcc.gnu.org/ml/gcc-testresults/2001-05/msg00007.html
http://gcc.gnu.org/ml/gcc-testresults/2001-05/msg00005.html

                === objc Summary for unix ===

# of expected passes            10
# of unexpected failures        68
# of untested testcases         68

The problem for all of the failures on my platform are of
this form:

Undefined                       first referenced
 symbol                             in file
sched_get_priority_max              /teal/caip5/ghazi/gcc-testing/build/sparc-sun-solaris2.7/libobjc/.libs/libobjc.a(thr-objc.o)
sched_get_priority_min              /teal/caip5/ghazi/gcc-testing/build/sparc-sun-solaris2.7/libobjc/.libs/libobjc.a(thr-objc.o)

These functions are called from libobjc/thr-posix.c.
>How-To-Repeat:
Bootstrap on solaris2 and run the objc testsuite
>Fix:
According to the man page, the sched_get_priority_{min,max}
functions are available when linking with -lrt.  The man
page also says solaris2.6 was the first release to fully
support them.  Prior to that they always returned -1 and set
errno to ENOSYS.

I think the proper fix would be to have -lrt passed to all
the objc tests on solaris2.6 (or greater).  I verified this
works by running one of the failing testsuite compilations
by hand and adding that library link.  Although I'm not
sure how to do that via the testsuite for just solaris2.6
or greater.  I'm also not sure what to do for versions of
solaris prior to 2.6.  However since only 2.7 is a "primary"
platform, solving the problem for >=2.6 would be a good
step forward IMHO.
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-05-03  5:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-02 15:16 objc/2713: Most objc tests fail on solaris2 w/missing thread functions Kaveh R. Ghazi
  -- strict thread matches above, loose matches on Subject: below --
2001-05-03  5:16 Rainer Orth
2001-05-02 13:16 Rainer Orth
2001-05-02  8:56 ghazi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).