gnokii-users
[Top][All Lists]
Advanced

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

Error compiling SMSD in module pq


From: Joseph C. Tulin
Subject: Error compiling SMSD in module pq
Date: Fri, 6 Feb 2004 17:41:54 +0800

hi,
 
    i really don't how to address this error. when i compile smsd pq module i 
got an error. i am using gnokii-0.5.10.
 
--> error details
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 -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 -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
address@hidden smsd]#

-->Makefile details
 
#
# Makefile for the smsd.
#
# Copyright (C) 1999 Hugh Blemings & Pavel Janík ml. & Jan Derfinak
#               2000 Karel Zak
# $Id: Makefile,v 1.27 2004/01/23 00:15:15 uid66849 Exp $
#
 
GLIBCFLAGS = glib-config --cflags
GLIBLDLIBS = glib-config --libs
 
# Comment out above lines and uncomment below lines if you want compile smsd
# with glib2 instead of glib1.
#
#GLIBCFLAGS = pkg-config --cflags glib-2.0
#GLIBLDLIBS = pkg-config --libs glib-2.0
 
TOPDIR=..
include $(TOPDIR)/Makefile.global
 
SMSD_MAN=man/smsd.8
 
CFLAGS += -DMODULES_DIR=\"${libdir}/smsd\" $(PTHREAD_CFLAGS) \
          $(shell $(GLIBCFLAGS))
 
LDLIBS += $(PTHREAD_LIBS) \
          $(shell $(GLIBLDLIBS))
 
LDLIBS += -rdynamic $(TOPDIR)/common/libgnokii.la -ldl
# Some systems, eg. FreeBSD don't have libdl. Use this:
# LDLIBS += -s -rdynamic -L$(TOPDIR)/common -lgnokii
 
ifdef XPM_LIBS
        LDLIBS +=$(XPM_LIBS)
endif
 
ifdef ICONV_LIBS
        LDLIBS += $(ICONV_LIBS)
endif
 
OBJS =  smsd.o \
        lowlevel.o
all: smsd
 

smsd: $(OBJS) $(TOPDIR)/common/libgnokii.la
        $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
 

### 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/local/pgsql/include -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
 
# MySQL support
mysql.lo: smsd.h mysql.c
        $(LIBTOOL) --mode=compile $(CC) -o mysql.lo $(CFLAGS) $(CPPFLAGS) \
        -I../include $(shell mysql_config --cflags) -c mysql.c
 
libmysql.la: mysql.lo
        $(LIBTOOL) --mode=link $(CC) -o libmysql.la mysql.lo \
        $(shell $(GLIBLDLIBS)) $(shell mysql_config --libs) \
        -export-dynamic -avoid-version -rpath ${libdir}/smsd
 
# File support
file.lo: smsd.h file.c
        $(LIBTOOL) --mode=compile $(CC) -o file.lo $(CFLAGS) $(CPPFLAGS) \
        -I../include -c file.c
 
libfile.la: file.lo
        $(LIBTOOL) --mode=link $(CC) -o libfile.la file.lo \
        $(shell $(GLIBLDLIBS)) \
        -export-dynamic -avoid-version -rpath ${libdir}/smsd
### End of DB Modules
 
$(TOPDIR)/common/libgnokii.la:
        $(MAKE) -C $(TOPDIR)/common libgnokii.la
 
clean:
        $(LIBTOOL) --mode=clean $(RM) smsd libpq.la libmysql.la libfile.la 
$(OBJS)
        $(RM) *~ depend *.so core*
 
install: all
        $(INSTALL) -d $(DESTDIR)$(sbindir)
        $(LIBTOOL) --mode=install $(INSTALL) -m 755 smsd $(DESTDIR)$(sbindir)
        $(INSTALL) -d $(DESTDIR)${libdir}/smsd
        for f in lib*.la ; do \
        $(LIBTOOL) --mode=install $(INSTALL) $$f $(DESTDIR)${libdir}/smsd ; \
        done
        $(LIBTOOL) --mode=finish ${libdir}/smsd
        $(INSTALL) -d $(DESTDIR)$(man8dir)
        $(INSTALL_DATA) $(SMSD_MAN) $(DESTDIR)$(man8dir)
 
depend dep:
        $(CC) $(CFLAGS) -MM *.c >depend
 
ifeq (depend,$(wildcard depend))
include depend
endif
 

.PHONY: all install clean dep depend
.
-->end of Makefile
 
 
thanks.
jotol





reply via email to

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