public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Possible Showstopper
@ 1997-12-04 18:45 G. Sumner Hayes
  1997-12-05  4:21 ` Wolfram Gloger
  1997-12-05  8:27 ` Andreas Jaeger
  0 siblings, 2 replies; 12+ messages in thread
From: G. Sumner Hayes @ 1997-12-04 18:45 UTC (permalink / raw)
  To: egcs

Andreas Jaeger (aj@arthur.rhein-neckar.de) wrote:
> --- /usr/glibc/glibc-2.0.5/glibc-2.0.5c-src/linuxthreads/sysdeps/pthread/libc-lock.h    Mon Aug 18 16:01:50 1997
> +++ linuxthreads/sysdeps/pthread/libc-lock.h    Wed Nov 19 00:47:11 1997
> 
> @@ -166,6 +166,11 @@
>  /* We need portable names for some functions.  E.g., when they are
>     used as argument to __libc_cleanup_region_start.  */
>  # define __libc_mutex_unlock __pthread_mutex_unlock
> +#else
> +# ifdef __ELF__
> +#  pragma weak _pthread_cleanup_push_defer
> +#  pragma weak _pthread_cleanup_pop_restore
> +# endif
>  #endif
>  
>  #endif /* bits/libc-lock.h */

Applying this patch does not fix things here on Red Hat 5.0.  I still
need to link all C++ programs against the pthreads library.

Should egcs and/or glibc be rebuilt after applying this?

-Sumner

-- 
rage, rage against the dying of the light

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

* Re: Possible Showstopper
  1997-12-04 18:45 Possible Showstopper G. Sumner Hayes
@ 1997-12-05  4:21 ` Wolfram Gloger
  1997-12-05  8:27   ` Paul Henning
  1997-12-05  8:27 ` Andreas Jaeger
  1 sibling, 1 reply; 12+ messages in thread
From: Wolfram Gloger @ 1997-12-05  4:21 UTC (permalink / raw)
  To: sumner; +Cc: egcs

> Andreas Jaeger (aj@arthur.rhein-neckar.de) wrote:
> > +#  pragma weak _pthread_cleanup_push_defer
> > +#  pragma weak _pthread_cleanup_pop_restore
> 
> Applying this patch does not fix things here on Red Hat 5.0.  I still
> need to link all C++ programs against the pthreads library.

Yes, this is what I found as well.  A solution is to insert into
libc-lock.h

asm(".weakext _pthread_cleanup_push_defer");
asm(".weakext _pthread_cleanup_pop_restore");

instead of the `#pragma weak's.  This is rather ugly, but works for
me.

Regards,
Wolfram.
-- 
`Surf the sea, not double-u three...'
wmglo@dent.med.uni-muenchen.de

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

* Re: Possible Showstopper
  1997-12-05  8:27 ` Andreas Jaeger
@ 1997-12-05  8:27   ` G. Sumner Hayes
  0 siblings, 0 replies; 12+ messages in thread
From: G. Sumner Hayes @ 1997-12-05  8:27 UTC (permalink / raw)
  To: egcs

On Fri, Dec 05, 1997 at 03:23:12PM +0100, Andreas Jaeger wrote:
> >>>>> G Sumner Hayes writes:
> 
> G> Applying this patch does not fix things here on Red Hat 5.0.  I still
> G> need to link all C++ programs against the pthreads library.
> 
> G> Should egcs and/or glibc be rebuilt after applying this?
> If you did apply the patch to the installed file you only need to
> rebuild egcs AFAIK.

Okay, it worked.  Thanks.

-Sumner

-- 
rage, rage against the dying of the light

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

* Re: Possible Showstopper
  1997-12-04 18:45 Possible Showstopper G. Sumner Hayes
  1997-12-05  4:21 ` Wolfram Gloger
@ 1997-12-05  8:27 ` Andreas Jaeger
  1997-12-05  8:27   ` G. Sumner Hayes
  1 sibling, 1 reply; 12+ messages in thread
From: Andreas Jaeger @ 1997-12-05  8:27 UTC (permalink / raw)
  To: sumner; +Cc: egcs

>>>>> G Sumner Hayes writes:

G> Applying this patch does not fix things here on Red Hat 5.0.  I still
G> need to link all C++ programs against the pthreads library.

G> Should egcs and/or glibc be rebuilt after applying this?
If you did apply the patch to the installed file you only need to
rebuild egcs AFAIK.

Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@alma.student.uni-kl.de
    http://www.student.uni-kl.de/~ajaeger/

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

* Re: Possible Showstopper
  1997-12-05  4:21 ` Wolfram Gloger
@ 1997-12-05  8:27   ` Paul Henning
  0 siblings, 0 replies; 12+ messages in thread
From: Paul Henning @ 1997-12-05  8:27 UTC (permalink / raw)
  To: egcs

This problem with -lpthreads and C++ does not seem limited to just
RedHat 5.0.  I have a heavily modified RedHat 4.2 system.  I built and
installed glibc-2.0.5c on it two days ago, and am having the same
problem when trying to test egcs-971201 on an i686-pc-linux-gnu host

So, my question is, how did RedHat and I build/install glibc-2.0.5c
differently than anyone else that isn't seeing this problem?

My suggestion is that we don't make the fix for the problem dependent
on detecting that we are on a RedHat 5.0 system.

Thanks,
Paul Henning

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

* Re: Possible Showstopper
  1997-12-03 10:46   ` Joe Buck
  1997-12-03 12:54     ` Jeffrey A Law
@ 1997-12-04  3:06     ` Andreas Jaeger
  1 sibling, 0 replies; 12+ messages in thread
From: Andreas Jaeger @ 1997-12-04  3:06 UTC (permalink / raw)
  To: egcs

>>>>> Joe Buck writes:

>> In message < 199712022253.OAA06067@supernova.earthlink.net >you write:
>> > 
>> > The new 971201 snapshot did not fix the problem I am having on my
>> > RedHat 5.0 system (i686-pc-linux-gnu).  In particular, make check
>> > fails horribly for many C++ tests, like this:
>> With RedHat only being out for 2 days I think the way to go is to make a minor
>> release in a week or so to fix this specific problem.
>> 
>> > At the very least, something needs to go in the release notes about
>> > this.
>> Agreed.

 > Will it work around the problem if users add -lpthread to their link
 > line?
That might work but is unneccassary.
 > (Yes, it sucks that we got burned by 5.0, but we did want to support
 > popular Linux distributions).

A better solution is to change
linuxthreads/sysdeps/pthread/libc-lock.h (it's installed as
/usr/include/libc-lock.h) with the following patch (it's a bug in the
current glibc 2.0.5c):

Andreas

--- /usr/glibc/glibc-2.0.5/glibc-2.0.5c-src/linuxthreads/sysdeps/pthread/libc-lo
ck.h    Mon Aug 18 16:01:50 1997
+++ linuxthreads/sysdeps/pthread/libc-lock.h    Wed Nov 19 00:47:11 1997

@@ -166,6 +166,11 @@
 /* We need portable names for some functions.  E.g., when they are
    used as argument to __libc_cleanup_region_start.  */
 # define __libc_mutex_unlock __pthread_mutex_unlock
+#else
+# ifdef __ELF__
+#  pragma weak _pthread_cleanup_push_defer
+#  pragma weak _pthread_cleanup_pop_restore
+# endif
 #endif
 
 #endif /* bits/libc-lock.h */


-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@alma.student.uni-kl.de
    http://www.student.uni-kl.de/~ajaeger/

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

* Re: Possible Showstopper
  1997-12-03 12:54     ` Jeffrey A Law
@ 1997-12-03 15:32       ` Mark Mitchell
  0 siblings, 0 replies; 12+ messages in thread
From: Mark Mitchell @ 1997-12-03 15:32 UTC (permalink / raw)
  To: law; +Cc: Joe Buck, mmitchell, egcs

>>>>> "Jeffrey" == Jeffrey A Law <law@cygnus.com> writes:

    Jeffrey>   In message
    Jeffrey> < 199712031733.JAA25765@atrus.synopsys.com >you write:
    >> Will it work around the problem if users add -lpthread to their
    >> link line?
    Jeffrey> Dunno.  RTH has a CD on order; hopefully it'll arrive
    Jeffrey> soon, we can then do whatever is necessary to support 5.0
    Jeffrey> and spin a release with 5.0 support within a week or two.

Several people have suggested adding an #ifdef __ELF around some
pragmas in libc-lock.h.  Could we just supply a corect version of this
file, and install it if we detect RH 5.0?  That should be easy.

    >> (Yes, it sucks that we got burned by 5.0, but we did want to
    >> support popular Linux distributions).
    Jeffrey> Yup.  I think this is important enough to make a minor
    Jeffrey> release as soon as we've got 5.0 support.

    Jeffrey> jeff

-- 
Mark Mitchell		mmitchell@usa.net
Stanford University	http://www.stanford.edu


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

* Re: Possible Showstopper
  1997-12-03 10:46   ` Joe Buck
@ 1997-12-03 12:54     ` Jeffrey A Law
  1997-12-03 15:32       ` Mark Mitchell
  1997-12-04  3:06     ` Andreas Jaeger
  1 sibling, 1 reply; 12+ messages in thread
From: Jeffrey A Law @ 1997-12-03 12:54 UTC (permalink / raw)
  To: Joe Buck; +Cc: mmitchell, egcs

  In message < 199712031733.JAA25765@atrus.synopsys.com >you write:
  > Will it work around the problem if users add -lpthread to their link
  > line?
Dunno.  RTH has a CD on order; hopefully it'll arrive soon, we can then
do whatever is necessary to support 5.0 and spin a release with 5.0
support within a week or two.


  > (Yes, it sucks that we got burned by 5.0, but we did want to support
  > popular Linux distributions).
Yup.  I think this is important enough to make a minor release as soon
as we've got 5.0 support.

jeff

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

* Re: Possible Showstopper
  1997-12-02 22:54 ` Jeffrey A Law
@ 1997-12-03 10:46   ` Joe Buck
  1997-12-03 12:54     ` Jeffrey A Law
  1997-12-04  3:06     ` Andreas Jaeger
  0 siblings, 2 replies; 12+ messages in thread
From: Joe Buck @ 1997-12-03 10:46 UTC (permalink / raw)
  To: law; +Cc: mmitchell, egcs

>   In message < 199712022253.OAA06067@supernova.earthlink.net >you write:
>   > 
>   > The new 971201 snapshot did not fix the problem I am having on my
>   > RedHat 5.0 system (i686-pc-linux-gnu).  In particular, make check
>   > fails horribly for many C++ tests, like this:
> With RedHat only being out for 2 days I think the way to go is to make a minor
> release in a week or so to fix this specific problem.
> 
>   > At the very least, something needs to go in the release notes about
>   > this.
> Agreed.

Will it work around the problem if users add -lpthread to their link
line?

(Yes, it sucks that we got burned by 5.0, but we did want to support
popular Linux distributions).



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

* Re: Possible Showstopper
  1997-12-02 21:17 Mark Mitchell
  1997-12-02 22:54 ` Jeffrey A Law
@ 1997-12-03  5:14 ` Neal Becker
  1 sibling, 0 replies; 12+ messages in thread
From: Neal Becker @ 1997-12-03  5:14 UTC (permalink / raw)
  To: mmitchell; +Cc: egcs

You can fix this by editing /usr/include/libc-lock.h.  I don't have
the info in front of me, but it's to put declarations

#ifdef __ELF__
#pragma weak xxx

for the two offending symbols.  I use a homespun system including
glibc-2.0.5.

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

* Re: Possible Showstopper
  1997-12-02 21:17 Mark Mitchell
@ 1997-12-02 22:54 ` Jeffrey A Law
  1997-12-03 10:46   ` Joe Buck
  1997-12-03  5:14 ` Neal Becker
  1 sibling, 1 reply; 12+ messages in thread
From: Jeffrey A Law @ 1997-12-02 22:54 UTC (permalink / raw)
  To: mmitchell; +Cc: egcs

  In message < 199712022253.OAA06067@supernova.earthlink.net >you write:
  > 
  > The new 971201 snapshot did not fix the problem I am having on my
  > RedHat 5.0 system (i686-pc-linux-gnu).  In particular, make check
  > fails horribly for many C++ tests, like this:
With RedHat only being out for 2 days I think the way to go is to make a minor
release in a week or so to fix this specific problem.

  > At the very least, something needs to go in the release notes about
  > this.
Agreed.

jeff

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

* Possible Showstopper
@ 1997-12-02 21:17 Mark Mitchell
  1997-12-02 22:54 ` Jeffrey A Law
  1997-12-03  5:14 ` Neal Becker
  0 siblings, 2 replies; 12+ messages in thread
From: Mark Mitchell @ 1997-12-02 21:17 UTC (permalink / raw)
  To: egcs

The new 971201 snapshot did not fix the problem I am having on my
RedHat 5.0 system (i686-pc-linux-gnu).  In particular, make check
fails horribly for many C++ tests, like this:

/mnt/u1/mitchell/projects/egcs/objdir/libraries//libstdc++/libstdc++.so: undefined reference to `_pthread_cleanup_pop_restore'
/mnt/u1/mitchell/projects/egcs/objdir/libraries//libstdc++/libstdc++.so: undefined reference to `_pthread_cleanup_push_defer'
collect2: ld returned 1 exit status

I understand that these functions are defined in libpthread, but if
this library is needed, then egcs should be linking it in by default.
At the very least, something needs to go in the release notes about
this.  More probably, we need to work out a fix.  I don't understand
enough about the way glibc works to know how to fix this, but I'm
happy to answer any questions about my system that might help folks.
My system is a completely stock RedHat 5.0, so we can be sure I won't
be the only one to run into this problem!

-- 
Mark Mitchell		mmitchell@usa.net
Stanford University	http://www.stanford.edu


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

end of thread, other threads:[~1997-12-05  8:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-04 18:45 Possible Showstopper G. Sumner Hayes
1997-12-05  4:21 ` Wolfram Gloger
1997-12-05  8:27   ` Paul Henning
1997-12-05  8:27 ` Andreas Jaeger
1997-12-05  8:27   ` G. Sumner Hayes
  -- strict thread matches above, loose matches on Subject: below --
1997-12-02 21:17 Mark Mitchell
1997-12-02 22:54 ` Jeffrey A Law
1997-12-03 10:46   ` Joe Buck
1997-12-03 12:54     ` Jeffrey A Law
1997-12-03 15:32       ` Mark Mitchell
1997-12-04  3:06     ` Andreas Jaeger
1997-12-03  5:14 ` Neal Becker

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).