This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Segfault on OpenMP program


On Wed, Apr 18, 2007 at 02:38:24PM +0100, Paul Brook wrote:
> On Wednesday 18 April 2007 00:19, FX Coudert wrote:
> > Someone reported on bug on a trivial statically-linked Fortran progam
> > with OpenMP and a I/O operation. I can reproduce the segfault, which
> > happens at:
> >...
> > Andrew suggested on bugzilla that this might be a GLIBC issue (I use
> > glibc-2.4 from redhat), with "pthreads not linking in correctly".
> > Does this ring a bell? Can someone confirm that it's not a GCC issue
> > (or that it is)? Details can be found in PR 31604.
> 
> The answer to any question involving glibc and static linking is 
> generally "don't do that".

Yeah, especially anything involving libpthread.  As a workaround you can
link whole libpthread.a in (... -static ... -Wl,--whole-archive -lpthread \
-Wl,--no-whole-archive) but even that it really is not supported, if it
works for you, fine, though even then you should study all the reasons why
we don't recommend static linking, if it doesn't, just link dynamically.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]