gnokii-users
[Top][All Lists]
Advanced

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

Re: smsd build problem


From: Bastien Nocera
Subject: Re: smsd build problem
Date: Thu, 24 Jan 2008 16:10:23 +0000

On Thu, 2008-01-24 at 10:56 +0100, Matthew wrote:
> Hi,
> >> The same error:
> >>     dlopen error: (null)!
> >>     Cannot load database module pq in directory /usr/local/lib/gnokii!
> >>
> >> There is no /usr/local/lib/gnokii dir! The smsd modules (file and pq)
> >> are placed in /usr/local/lib/smsd.
> >>     
> >
> > Bastien, could you look at it?
> >   
> 
> I (think I) have repaired the first problem (smsd looking for the module 
> in the wrong dir).
> 
> Here is the patch:
> 
> Index: smsd/Makefile.am
> ===================================================================
> RCS file: /sources/gnokii/gnokii/smsd/Makefile.am,v
> retrieving revision 1.6
> diff -r1.6 Makefile.am
> 34c34
> <       -DMODULES_DIR=\"${pkglibdir}\"  \
> ---
>  >       -DMODULES_DIR=\"${plugindir}\"  \
> 
> Check it please, and if it is OK, then commit it to the cvs.

Good catch.

> But the other bug is still there:
>     smsd: symbol lookup error: /usr/local/lib/smsd/libpq.so: undefined 
> symbol: PQsetdbLogin

The problem is that somebody "fixed" the pg_config usage in
configure.in, but didn't re-add the missing "-l" to link against libpq.
I've fixed that and also added -no-undefined to avoid this sort of
problems appearing in the future (ie. it should fail on build now).

> Regarding the first error, I think it should be wise to apply the 
> following patch also:
> Index: smsd/smsd.c
> ===================================================================
> RCS file: /sources/gnokii/gnokii/smsd/smsd.c,v
> retrieving revision 1.59
> diff -r1.59 smsd.c
> 101c101
> <     g_print ("dlopen error: %s!\n", dlerror());
> ---
>  >     g_print ("dlopen error: %s!\n", g_module_error());

Good catch as well :)

I also change the filenames of the loadable modules, as they could clash
with the system-wide libraries (libpq.so as the loadable module,
libpq.so system-wide...).

If you get something like:
*** Warning: Linking the shared library libsmsd_pq.la against the
loadable module
*** libpq.so is not portable!

Please file a bug with your distribution. The Postgres devels seem to be
confusing loadable modules and shared libraries...

Thanks Matthew for catching those bugs.





reply via email to

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