#49 fails make on db_sql

0.11
closed
5
2006-03-07
2006-02-18
Dennis
No

Using postgresql-8.1.3 compiled from source. During
"configure" when checking postgresql PGclear it can't find it.
The later on in the make it starts to fail with ;

db_sql.o: In function `_db_check_result':
db_sql.c:(.text+0x1f): undefined reference to `PQresultStatus'

This is on a source based distro Lunar-Linux. Attached is a
compile log.

Discussion

  • Richard van den Berg

    • status: open --> pending
     
  • Richard van den Berg

    • assigned_to: nobody --> rvdb
     
  • Richard van den Berg

    Logged In: YES
    user_id=330646

    I think you mean PQclear()? This page
    http://www.postgresql.org/docs/8.1/static/libpq-example.html
    indicates that both functions still exist. The postgres
    support in aide was written for the 7.x libpq. I'll test it
    against 8.1 when I have some time.

    Make sure configure can find your include and library files,
    for example using the --with-extra-includes and
    --with-extra-libs switches.

    Please attach your config.log file here.

     
  • Dennis

    Dennis - 2006-02-18

    compile log

     
    Attachments
  • Dennis

    Dennis - 2006-02-18

    Logged In: YES
    user_id=53417

    Oh poo. Thought I attached the aide compile log, sorry. Maybe I'll
    get it right this time.

    Anyway yes, I meant PQclear().

    I've tried specifying
    /lib, /usr/lib, /usr/lib/postgresql, /usr/include/postgresql and none
    of them in any combination seem to work.

    The attached compile log is without specifying any additional
    includes or libs, just --with-psql.

    In that compile log it says "You must postgres sql library installed."
    What sql library is it talking about? Is it something from the
    postgresql contrib source?

    Oh, part of the compile log did not catch the following;

    db_sql.o: In function `_db_check_result':
    db_sql.c:(.text+0x1f): undefined reference to `PQresultStatus'
    db_sql.c:(.text+0x2a): undefined reference to `PQresultStatus'
    db_sql.c:(.text+0x3a): undefined reference to `PQerrorMessage'
    db_sql.o: In function `db_writespec_sql':
    db_sql.c:(.text+0x10b): undefined reference to `PQexec'
    db_sql.c:(.text+0x13d): undefined reference to `PQntuples'
    db_sql.c:(.text+0x14b): undefined reference to `PQclear'
    db_sql.c:(.text+0x265): undefined reference to `PQexec'
    db_sql.c:(.text+0x295): undefined reference to `PQclear'
    db_sql.o: In function `db_readline_sql_int':
    db_sql.c:(.text+0x2f9): undefined reference to `PQgetvalue'
    db_sql.o: In function `db_readline_sql_char':
    db_sql.c:(.text+0x3c6): undefined reference to `PQgetvalue'
    db_sql.o: In function `db_get_sql':
    db_sql.c:(.text+0xce6): undefined reference to
    `gcry_md_get_algo_dlen'
    db_sql.c:(.text+0xd15): undefined reference to
    `gcry_md_get_algo_dlen'
    db_sql.c:(.text+0xd35): undefined reference to
    `gcry_md_get_algo_dlen'
    db_sql.c:(.text+0xd55): undefined reference to
    `gcry_md_get_algo_dlen'
    db_sql.o: In function `db_writeline_sql':
    db_sql.c:(.text+0xec8): undefined reference to `PQexec'
    db_sql.c:(.text+0xef5): undefined reference to `PQclear'
    db_sql.o: In function `db_close_sql':
    db_sql.c:(.text+0xf28): undefined reference to `PQexec'
    db_sql.c:(.text+0xf32): undefined reference to `PQfinish'
    be.o: In function `be_sql_readinit':
    be.c:(.text+0xe4): undefined reference to `PQexec'
    be.c:(.text+0xf3): undefined reference to `PQresultStatus'
    be.c:(.text+0x112): undefined reference to `PQresultStatus'
    be.c:(.text+0x11a): undefined reference to `PQresStatus'
    be.c:(.text+0x13d): undefined reference to `PQclear'
    be.c:(.text+0x14a): undefined reference to `PQclear'
    be.c:(.text+0x15c): undefined reference to `PQexec'
    be.c:(.text+0x16b): undefined reference to `PQresultStatus'
    be.c:(.text+0x18f): undefined reference to `PQclear'
    be.c:(.text+0x1a1): undefined reference to `PQnfields'
    be.c:(.text+0x1b7): undefined reference to `PQfname'
    be.c:(.text+0x1ff): undefined reference to `PQfnumber'
    be.c:(.text+0x245): undefined reference to `PQntuples'
    be.o: In function `be_init':
    be.c:(.text+0x5ef): undefined reference to `PQsetdbLogin'
    be.c:(.text+0x5f9): undefined reference to `PQstatus'
    be.c:(.text+0x620): undefined reference to `PQexec'
    be.c:(.text+0x62f): undefined reference to `PQresultStatus'
    be.c:(.text+0x63d): undefined reference to `PQclear'
    be.c:(.text+0x68a): undefined reference to `PQclear'
    collect2: ld returned 1 exit status
    make[2]: *** [aide] Error 1
    make[2]: Leaving directory `/usr/src/aide-0.11/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/src/aide-0.11'
    make: *** [all] Error 2

    I don't think the problem is with my pathing, etc as libpqxx has no
    problem finding the postgresql stuff. Just a thought anyway.

    Oh I may have been confused on the first post. Though I was
    dealing with aide-0.11 but it was 0.10. I am now sure I am on the
    right page. Sorry for the confusion.

     
  • Dennis

    Dennis - 2006-02-18
    • status: pending --> open
     
  • Dennis

    Dennis - 2006-02-18

    Logged In: YES
    user_id=53417

    Oh poo. Thought I attached the aide compile log, sorry. Maybe I'll
    get it right this time.

    Anyway yes, I meant PQclear().

    I've tried specifying
    /lib, /usr/lib, /usr/lib/postgresql, /usr/include/postgresql and none
    of them in any combination seem to work.

    The attached compile log is without specifying any additional
    includes or libs, just --with-psql.

    In that compile log it says "You must postgres sql library installed."
    What sql library is it talking about? Is it something from the
    postgresql contrib source?

    Oh, part of the compile log did not catch the following;

    db_sql.o: In function `_db_check_result':
    db_sql.c:(.text+0x1f): undefined reference to `PQresultStatus'
    db_sql.c:(.text+0x2a): undefined reference to `PQresultStatus'
    db_sql.c:(.text+0x3a): undefined reference to `PQerrorMessage'
    db_sql.o: In function `db_writespec_sql':
    db_sql.c:(.text+0x10b): undefined reference to `PQexec'
    db_sql.c:(.text+0x13d): undefined reference to `PQntuples'
    db_sql.c:(.text+0x14b): undefined reference to `PQclear'
    db_sql.c:(.text+0x265): undefined reference to `PQexec'
    db_sql.c:(.text+0x295): undefined reference to `PQclear'
    db_sql.o: In function `db_readline_sql_int':
    db_sql.c:(.text+0x2f9): undefined reference to `PQgetvalue'
    db_sql.o: In function `db_readline_sql_char':
    db_sql.c:(.text+0x3c6): undefined reference to `PQgetvalue'
    db_sql.o: In function `db_get_sql':
    db_sql.c:(.text+0xce6): undefined reference to
    `gcry_md_get_algo_dlen'
    db_sql.c:(.text+0xd15): undefined reference to
    `gcry_md_get_algo_dlen'
    db_sql.c:(.text+0xd35): undefined reference to
    `gcry_md_get_algo_dlen'
    db_sql.c:(.text+0xd55): undefined reference to
    `gcry_md_get_algo_dlen'
    db_sql.o: In function `db_writeline_sql':
    db_sql.c:(.text+0xec8): undefined reference to `PQexec'
    db_sql.c:(.text+0xef5): undefined reference to `PQclear'
    db_sql.o: In function `db_close_sql':
    db_sql.c:(.text+0xf28): undefined reference to `PQexec'
    db_sql.c:(.text+0xf32): undefined reference to `PQfinish'
    be.o: In function `be_sql_readinit':
    be.c:(.text+0xe4): undefined reference to `PQexec'
    be.c:(.text+0xf3): undefined reference to `PQresultStatus'
    be.c:(.text+0x112): undefined reference to `PQresultStatus'
    be.c:(.text+0x11a): undefined reference to `PQresStatus'
    be.c:(.text+0x13d): undefined reference to `PQclear'
    be.c:(.text+0x14a): undefined reference to `PQclear'
    be.c:(.text+0x15c): undefined reference to `PQexec'
    be.c:(.text+0x16b): undefined reference to `PQresultStatus'
    be.c:(.text+0x18f): undefined reference to `PQclear'
    be.c:(.text+0x1a1): undefined reference to `PQnfields'
    be.c:(.text+0x1b7): undefined reference to `PQfname'
    be.c:(.text+0x1ff): undefined reference to `PQfnumber'
    be.c:(.text+0x245): undefined reference to `PQntuples'
    be.o: In function `be_init':
    be.c:(.text+0x5ef): undefined reference to `PQsetdbLogin'
    be.c:(.text+0x5f9): undefined reference to `PQstatus'
    be.c:(.text+0x620): undefined reference to `PQexec'
    be.c:(.text+0x62f): undefined reference to `PQresultStatus'
    be.c:(.text+0x63d): undefined reference to `PQclear'
    be.c:(.text+0x68a): undefined reference to `PQclear'
    collect2: ld returned 1 exit status
    make[2]: *** [aide] Error 1
    make[2]: Leaving directory `/usr/src/aide-0.11/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/src/aide-0.11'
    make: *** [all] Error 2

    I don't think the problem is with my pathing, etc as libpqxx has no
    problem finding the postgresql stuff. Just a thought anyway.

    Oh I may have been confused on the first post. Though I was
    dealing with aide-0.11 but it was 0.10. I am now sure I am on the
    right page. Sorry for the confusion.

     
  • Dennis

    Dennis - 2006-02-18
    • status: open --> pending
     
  • Dennis

    Dennis - 2006-02-18

    compile log

     
    Attachments
  • Dennis

    Dennis - 2006-02-18
    • status: pending --> open
     
  • Richard van den Berg

    • summary: fails make on db_sq --> fails make on db_sql
    • status: open --> pending
     
  • Richard van den Berg

    Logged In: YES
    user_id=330646

    Aide needs the libpq.a library. Please note that this is a
    static library. I am not sure what you attached, but it is
    not the config.log file that is created by running
    configure. Please attach that file. There is no need to run
    a make, just the configure is enough to see what your
    problem is.

     
  • Dennis

    Dennis - 2006-02-19
    • status: pending --> open
     
  • Dennis

    Dennis - 2006-02-19

    Logged In: YES
    user_id=53417

    Ok. Here's configure only with the normal switches I use.
    Also /usr/lib/libpq.a is present.

    root@sidney /usr/src/aide-0.11 # ./configure --prefix=/usr
    --sysconfdir=/etc --localstatedir=/var --with-libgcrypt --with-psql
    --with-zlib
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking for gcc... gcc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ANSI C... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking whether make sets $(MAKE)... (cached) yes
    checking for ranlib... ranlib
    checking for bison... bison -y
    checking for flex... flex
    checking for yywrap in -lfl... yes
    checking lex output file root... lex.yy
    checking whether yytext is a pointer... yes
    checking whether to enable maintainer-specific portions of
    Makefiles... no
    checking for library containing syslog... none required
    checking for vsyslog... yes
    checking whether byte ordering is bigendian... no
    checking how to run the C preprocessor... gcc -E
    checking for egrep... grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for byte... no
    checking for ushort... yes
    checking for ulong... yes
    checking for u16... no
    checking for u32... no
    checking for u64... no
    checking for unsigned short... yes
    checking size of unsigned short... 2
    checking for unsigned int... yes
    checking size of unsigned int... 4
    checking for unsigned long... yes
    checking size of unsigned long... 4
    checking for unsigned long long... yes
    checking size of unsigned long long... 8
    checking for ANSI C header files... (cached) yes
    checking for strtoll... yes
    checking for strtoimax... yes
    checking for readdir... yes
    checking args to readdir_r... POSIX
    checking for stricmp... no
    checking for ustat... yes
    checking for mmap... yes
    checking for snprintf... yes
    checking for vsnprintf... yes
    checking for ISO C99 compliant snprintf... yes
    checking for ISO C99 compliant vsnprintf... yes
    checking for open/O_NOATIME... yes
    checking syslog.h usability... yes
    checking syslog.h presence... yes
    checking for syslog.h... yes
    checking ustat.h usability... yes
    checking ustat.h presence... yes
    checking for ustat.h... yes
    checking for inttypes.h... (cached) yes
    checking for acl-support... no
    checking for lstat64... yes
    checking for stat64... yes
    checking for readdir64... yes
    checking for readdir64_r... yes
    checking for LFS ino_t... ino_t
    checking for LFS dirent... dirent64
    checking zlib.h usability... yes
    checking zlib.h presence... yes
    checking for zlib.h... yes
    checking for gzdopen in -lz... yes
    checking for regexec... yes
    checking for regcomp... yes
    checking for mhash_get_block_size in -lmhash... yes
    checking for crypt in -lc... no
    checking for crypt in -lcrypt... yes
    checking for PostgresSQL support... checking for PQclear in -lpq...
    no
    not found
    yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating src/Makefile
    config.status: creating doc/Makefile
    config.status: creating doc/aide.conf
    config.status: creating doc/aide.1
    config.status: creating doc/aide.conf.5
    config.status: creating aide.spec
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing depfiles commands

     
  • Richard van den Berg

    • status: open --> pending
     
  • Richard van den Berg

    Logged In: YES
    user_id=330646

    If you could please upload the config.log file I can check
    why configure does not find PQclear in -lpq.

     
  • Dennis

    Dennis - 2006-02-19
    • status: pending --> open
     
  • Dennis

    Dennis - 2006-02-19

    Logged In: YES
    user_id=53417

    Ah rats. Ok. here it is.

     
  • Dennis

    Dennis - 2006-02-19

    aide.config.log

     
    Attachments
  • Richard van den Berg

    Logged In: YES
    user_id=330646

    From your config.log:

    /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libpq.a(fe-misc.o):
    In function `pqSocketCheck':
    fe-misc.c:(.text+0x895): undefined reference to `SSL_pending'

    It looks like you need to link in the static versions of the
    OpenSSL libraries. Try to run configure with:

    --with-extra-link-libs "-lssl -lcrypto"

    If they are in a non-standard directories, make sure you
    also including

    --with-extra-libs -L/path/to/ssl/libs

     
  • Richard van den Berg

    • status: open --> pending
     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks