On Sat, Nov 06, 1999 at 04:16:34PM -0800, Guy Harris wrote:
> > # compile, then the posix signature is assumed as
> > # the default.
> > cat > conftest.$ac_ext <<EOF
> > #line 5215 "configure"
> > #include "confdefs.h"
> > #include <pwd.h>
> > int main() {
> > getpwuid_r(0, NULL, NULL, 0);
> > ; return 0; }
> > EOF
> > ==============================================================================
> >
> > What is happening is, xlc_r compiles this program, and flags it with the
> > "(E) Missing arguments" warning.
>
> Missing arguments is only a *warning*? Yeesh....
>
> Is there a flag that can be passed to "xlc" to get it to treat procedure
> calls not matching the function prototype as an *error*, so that it
> refuses to produce an object file, and exits with a non-zero exit
> status? If so, perhaps the "autoconf" stuff needs to use that flag when
Yes, it is. There is a flag -qhalt=e which will cause the compiler
to stop after all warnings marked with (E). The only problem is,
this causes a lot of other stuff to not compile (mostly having to
do with operations on char * and unsigned char * not mixing).
I think the "correct" thing to do is:
(1) Check for the POSIX version of getpwuid_r(), if that fails go to (2)
(2) Check for the getpwuid_r(0, NULL, NULL, 0) prototype, if that fails
go to (3)
(3) etc.
Right now, the configure script checks for (2), and if that fails, assumes
(1), and I believe that this is the "incorrect" way to do it.
On a side note, I still consistently get coredumps in the gdk_check_init()
function:
=======================================================================
[cr01@discworld]~/gtk+-1.2.6/examples/base% ./base
Segmentation fault (core dumped)
[cr01@discworld]~/gtk+-1.2.6/examples/base% dbx base core
Segmentation fault in gdk_init_check at 0xd2e34884
0xd2e34884 (gdk_init_check+0x8) 800c0000 lwz r0,0x0(r12)
(dbx) where
gdk_init_check() at 0xd2e34884
gtk_init_check(0x2ff22b98, 0x2ff22b9c), line 199 in "gtkmain.c"
gtk_init(0x2ff22b98, 0x2ff22b9c), line 423 in "gtkmain.c"
main(argc = 1, argv = 0x2ff22bc8), line 10 in "base.c"
(dbx)
=======================================================================
I wrote a small stub program which just calls the gdk_init_check() function
and it worked (ie. did not coredump).
So this is my hypothesis.
gtk_init_check() is in libgtk.a
gdk_init_check() is in libgdk.a
If you have a shared object which requires symbols that are in another
shared object, if you don't do things right, the run-time linker
will screw things up, and you will segfault. (The run-time linker
could be buggy as well).
If anyone is familiar with debugging these lowlevel issues related
to run-time linking, I would
greatly appreciate their assistance, since I am beginning to hit
my limit of expertise. I wanted to use gtk+ to compile nice
GUI applications to ease my life. :)
As these issues seem to be GTK+ issues, and not ethereal issues,
I will stop forwarding these posts to the ethereal-dev mailing list,
unless people there want me to keep sending them. :)
HEEEEELPPPPPPPPP!!!!!!!!! :)
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@xxxxxxxxxxxx