gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Smsd Bug ?


From: Jan Derfinak
Subject: Re: Smsd Bug ?
Date: Thu, 6 Jun 2002 11:19:49 +0200 (CEST)

On Wed, 5 Jun 2002 address@hidden wrote:

> Hello, I tried to make Smsd work, but I have few problems loading the mysql 
> module. After few test (I added a print of dlerror() in  LoadDb) I got :
> 
> undefined symbol: mysql_real_escape_string
> 
> I don't know if this problem is know (I should not be the only one using Smsd 
> with Mysql !) 
> The funny thing is that on an other computer, I had the same error but for a 
> different symbol...

Please send me mysql version of both computer.
Please modify LoadDB function to:
gint LoadDB (void)
{
  void *handle;
  GString *buf;
  gchar *error;
  
  buf = g_string_sized_new (64);
  
  g_string_sprintf (buf, "%s/lib%s.so", smsdConfig.libDir, smsdConfig.dbMod);

#ifdef XDEBUG
  g_print ("Trying to load module %s\n", buf->str);
#endif
  
  handle = dlopen (buf->str, RTLD_LAZY);
  if (!handle)
  {
    g_print ("dlopen error: %s!\n", dlerror());
    return (1);
  }
    
  DB_Bye = dlsym(handle, "DB_Bye");
  if ((error = dlerror ()) != NULL)
  {
    g_print (error);
    return (2);
  }

.
.
.


Define XDEBUG in Makefile (and undefine DEBUG if defined), recompile
and send me output.

> 
> I also have a question : To debug Smsd I have to take of the -s and -rdynamic 
> option on gcc command line.I can not find documentation about these option in 
> gcc neither in ld, so I would like to know if possibles :
> - How did the author had the idea to put these option (this was the bonus 
> question) ?

man gcc:
-s  Remove all symbol table and relocation information
    from the executable.

man dlopen:
       External references in the library are resolved using  the
       libraries  in that library's dependency list and any other
       libraries previously opened with the RTLD_GLOBAL flag.  If
       the  executable was linked with the flag "-rdynamic", then
       the global symbols in the executable will also be used  to
       resolve references in a dynamically loaded library.


> - What do they mean in this case and are they mandatory to have smsd working ?

-rdynamic is mandatory
-s is not mandatory



> If this list is not the best place for smsd, thanks to tell me.

List is good place for discussion about smsd.

                                        jano

-- 
Whatever occurs from love is always beyond good and evil.
                        Friedrich Nietzsche



reply via email to

[Prev in Thread] Current Thread [Next in Thread]