Re: Aieee! Need help with gmodule!
- From: Todd Graham Lewis <tlewis mindspring net>
- To: Michael Lausch <mla gams co at>
- cc: gnome-list gnome org
- Subject: Re: Aieee! Need help with gmodule!
- Date: Thu, 3 Dec 1998 09:47:19 -0500 (EST)
On Thu, 3 Dec 1998, Michael Lausch wrote:
> not correct, but i hope you get it:
> gcc -fpic -DPIC .... $file -o -o ${file%.c}.lo
> gcc -shared -i module.so *.lo
Hey, that helped a lot! I compiled it like this:
% gcc -fpic -DPIC -c module.c -o module.lo
% gcc -shared module.lo -o module.so
and it now runs, but dies within g_module_open.
% gdb min2
(gdb) b main
(gdb) r
Breakpoint 1, main (argc=1, argv=0xbffffcb8) at min2.c:7
7 GModule *module = NULL;
(gdb) s
9 if(g_module_supported()){
(gdb)
0x40028990 in g_module_supported () at gmodule-dl.c:127
127 }
(gdb)
main (argc=1, argv=0xbffffcb8) at min2.c:10
10 module = g_module_open ("./module.so\0", G_MODULE_BIND_LAZY);
(gdb)
0x400289d9 in g_module_open () at gmodule-dl.c:127
127 }
(gdb)
_g_module_open (file_name=0x804866c "./module.so", bind_lazy=1)
at gmodule-dl.c:67
67 handle = dlopen (file_name, RTLD_GLOBAL | (bind_lazy ? RTLD_LAZY : RTLD_NOW));
(gdb)
68 if (!handle)
68 if (!handle)
(gdb)
104 }
(gdb) b
Breakpoint 2 at 0x400287c1: file gmodule.c, line 104.
(gdb) backtrace
#0 _g_module_open (file_name=0x804866c "./module.so", bind_lazy=1)
at gmodule.c:104
#1 0x40028ad7 in g_module_open () at gmodule-dl.c:127
#2 0x80485e4 in main (argc=1, argv=0xbffffcb8) at min2.c:10
(gdb) l
99 if (error)
100 module_error = g_strdup (error);
101 else
102 module_error = NULL;
103 errno = 0;
104 }
105
106
107 /* --- include platform specifc code --- */
108 #define CHECK_ERROR(rv) { g_module_set_error (NULL); }
(gdb) s
Program exited with code 0220.
(gdb)
I must say that this quiet but horrible death within gmodule-dl.c/
_g_module_open() is quite confusing.
I am going to follow Elliot's advice and upgrade my system to see if
that helps.
--
Todd Graham Lewis tlewis@mindspring.net (800) 719-4664, x2804
"It's still ludicrous that nobody's ever made a run at us by making UNIX
a popular platform on PCs. It's almost too late now." -- Steve Balmer
"It is too late." -- Bill Gates _Newsweek_, 6/23/97, p. 82
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]