This is the mail archive of the gcc-bugs@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]

Re: bug on alpha. already fixed?


> Success :
> 
> g++ -I/opt/kde/include -I/opt/qt/include -I/usr/X11R6/include -L/opt/kde/lib
> -L/opt/qt/lib -L/usr/X11R6/lib test.cpp  -lkfile -lkfm -lkdeui -lkdecore -lqt
> -lXext -lX11 -lpthread
> 
> 
>  SEGFAULT :
>  
> g++ -I/opt/kde/include -I/opt/qt/include -I/usr/X11R6/include -L/opt/kde/lib
> -L/opt/qt/lib -L/usr/X11R6/lib test.cpp  -lpthread -lkfile -lkfm -lkdeui
>  -lkdecore -lqt  -lXext -lX11
> 
> 
> The only difference is the linking order of the pthread library.

It seems unlikely that this is a compiler bug.

It is probably something to do with libraries.  Note that shared
library initialization happens in reverse order of declaration,
so in the later case, libpthread may not have been initialized
before KDE does something with it.

If true, this would be a bug in KDE, since it should have been
linked against the libraries it requires to ensure a correct 
partial ordering of initialization.

You'll have to stick a dubugger on this to find out what's up.


r~


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