[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error compiling SMSD in module pq
From: |
Jan Derfinak |
Subject: |
Re: Error compiling SMSD in module pq |
Date: |
Mon, 9 Feb 2004 10:36:56 +0100 (CET) |
On Mon, 9 Feb 2004, Joseph C. Tulin wrote:
> thanks, okey i add LDLIBS= -L /usr/local/pgsql/lib, but it has the same error.
> the error is this.
>
> address@hidden smsd]# make
> gcc -g -O2 -I../include -DMODULES_DIR=\"/usr/local/gnokii5.10//lib/smsd\"
> -D_REENTRANT -I/usr/include/glib-1.2 -I/usr/lib/glib/include
> -I/usr/X11R6/include -c -o smsd.o smsd.c
> gcc -g -O2 -I../include -DMODULES_DIR=\"/usr/local/gnokii5.10//lib/smsd\"
> -D_REENTRANT -I/usr/include/glib-1.2 -I/usr/lib/glib/include
> -I/usr/X11R6/include -c -o lowlevel.o lowlevel.c
> /bin/sh ../libtool --mode=link gcc smsd.o lowlevel.o -lpthread -L/usr/lib
> -lglib -rdynamic ../common/libgnokii.la -ldl -L/usr/local/pgsql/lib -o smsd
> mkdir .libs
> gcc smsd.o lowlevel.o -rdynamic -o .libs/smsd -lpthread -L/usr/lib
> /usr/lib/libglib.so ../common/.libs/libgnokii.so -ldl -L/usr/local/pgsql/lib
> -Wl,--rpath -Wl,/usr/local/gnokii5.10//lib
> creating smsd
>
> address@hidden smsd]# make libpq.la
> /bin/sh ../libtool --mode=link gcc -o libpq.la pq.lo \
> -L/usr/lib -lglib -lpq \
> -export-dynamic -avoid-version -rpath /usr/local/gnokii5.10//lib/smsd
> rm -fr .libs/libpq.la .libs/libpq.* .libs/libpq.*
> gcc -shared pq.lo -L/usr/lib /usr/lib/libglib.so -lpq -Wl,-soname
> -Wl,libpq.so -o .libs/libpq.so
> /usr/bin/ld: cannot find -lpq
> collect2: ld returned 1 exit status
> make: *** [libpq.la] Error 1
Hi.
You added -L/usr/local/pgsql/lib for smsd. This is not necessary because
smsd is independent from DB layer. You must add -L option for
postgres DB module. In Makefile must be something like this:
### DB Modules
# Change this according to your system
# FIXME: detect it in configure
# PostgreSQL support
pq.lo: smsd.h pq.c
$(LIBTOOL) --mode=compile $(CC) -o pq.lo $(CFLAGS) $(CPPFLAGS) \
-I../include -I/usr/include/pgsql -c pq.c
libpq.la: pq.lo
$(LIBTOOL) --mode=link $(CC) -o libpq.la pq.lo \
$(shell $(GLIBLDLIBS)) -lpq \
-export-dynamic -avoid-version -rpath ${libdir}/smsd
You must change last definition to:
libpq.la: pq.lo
$(LIBTOOL) --mode=link $(CC) -o libpq.la pq.lo \
$(shell $(GLIBLDLIBS)) -L/usr/local/pgsql/lib -lpq \
-export-dynamic -avoid-version -rpath ${libdir}/smsd
jan
--