#89 Error compiling bogofilter 0.93.1 with db version 4.3.21

closed-works-for-me
nobody
None
5
2004-12-04
2004-11-30
Arnold
No

Sparc 10 solaris 9 with gcc version 3.2.3 db version
4.3.21.
Generates an error when performing the dblinking test.

Same error occurs on a Sparc 10 solaris 8 with gcc
version 2.95.3

The config.log for the solaris 9 environment attached.

Discussion

  • Arnold

    Arnold - 2004-11-30

    Autoconf file details pertaining to the reported issue with compilation/configuration.

     
  • David Relson

    David Relson - 2004-11-30

    Logged In: YES
    user_id=30510

    Arnold,
    Evidently configure can't find your copy of db-4.3.21.
    Where is it located? Have you tried "./configure
    --with-libdb-prefix=[DIR]"?
    David

     
  • Arnold

    Arnold - 2004-12-01

    Logged In: YES
    user_id=1169235

    Hi David, On both systems the configure process detects the
    location of libdb.so one is in /usr/local/lib and on the
    other it is non-root's user home dir. I did try specifying
    the path with the option --with-libdb-prefix=$HOME. I am
    retrying with $HOME/lib for the libdb prefix as well as
    /usr/local/lib. On the non root user system I also
    specified the paths in the CFLAGS and LDFLAGS.
    Will update if I get any additional information.

    Arnold

     
  • Matthias Andree

    Matthias Andree - 2004-12-02

    Logged In: YES
    user_id=2788

    The config.log reveals that the db.h file wasn't found.
    For a default installation of Berkeley DB, it will have
    installed to
    /usr/local/BerkeleyDB.4.3, with subdirs bin, include, lib
    and perhaps
    docs, --with-libdb-prefix=/usr/local/BerkeleyDB.4.3 should
    then work.

    If you've given a different --prefix to BerkeleyDB, just use
    the same
    directory in --with-libdb-prefix in bogofilter.

    If that doesn't help, try, for instance:

    ./configure CPPFLAGS=-I$HOME/include

     
  • Matthias Andree

    Matthias Andree - 2004-12-02
    • status: open --> pending-works-for-me
     
  • Arnold

    Arnold - 2004-12-02

    Logged In: YES
    user_id=1169235

    Hi, Tried it on the non root system with Solaris 8 and gcc
    2.95.3. It configured, but threw the following error during
    compile:
    gcc -DBOGOFILTER -O3 -Wall -W -Wstrict-prototypes
    -Wmissing-prototypes -Wshadow -Wbad-function-cast
    -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return
    -Wmissing-declarations -Wnested-externs -fno-common
    -Wchar-subscripts -Wcomment -Wimplicit -Wreturn-type
    -Wformat -s -o bogofilter bogofilter.o main.o
    libbogofilter.a libgnugetopt.a -ldb -L/home/users/X/lib
    -lgsl -lgslcblas -lm -lm
    Undefined first referenced
    symbol in file
    fdatasync /home/users/X/lib/libdb.so
    ld: fatal: Symbol referencing errors. No output written to
    bogofilter
    collect2: ld returned 1 exit status
    It uses Sun's ld.

    Thanks
    Arnold

     
  • Arnold

    Arnold - 2004-12-02
    • status: pending-works-for-me --> open-works-for-me
     
  • Matthias Andree

    Matthias Andree - 2004-12-02

    Logged In: YES
    user_id=2788

    Your build is compromised. 0.93.1 does not use fdatasync().
    Try "make clean all".

     
  • Matthias Andree

    Matthias Andree - 2004-12-02
    • status: open-works-for-me --> pending-works-for-me
     
  • Arnold

    Arnold - 2004-12-02

    Logged In: YES
    user_id=1169235

    Hi,

    Thanks for the prompt response.

    The function is called in src/db_lock.c: if
    (fdatasync(lockfd))

    Arnold

     
  • Arnold

    Arnold - 2004-12-02
    • status: pending-works-for-me --> open-works-for-me
     
  • Matthias Andree

    Matthias Andree - 2004-12-02

    Logged In: YES
    user_id=2788

    No, it isn't, it's all wrapped by #if 0, which is as good as
    though everything up to the matching #endif wasn't there.
    I'm not aware of GCC 2.95.3 bugs in this area (preprocessing).

    If your src/db_lock.c doesn't have that #if 0, try
    extracting to a fresh directory again.

    src/db_lock.c, ll. 354ff:

    #if 0
    /* disabled for now, O_{D,,F}SYNC should handle this for us */
    #ifdef HAVE_FDATASYNC
    if (fdatasync(lockfd))
    return -1;
    #else
    if (fsync(lockfd))
    return -1;
    #endif
    #endif

     
  • Matthias Andree

    Matthias Andree - 2004-12-02
    • status: open-works-for-me --> pending-works-for-me
     
  • Arnold

    Arnold - 2004-12-03

    Logged In: YES
    user_id=1169235

    You're right. Did a simple grep and did not check beyond that.

    Here is the update using the --with-libdb-path I was able to
    configure and compile 0.93.1 on the Solaris 9/gcc 3.2.3 system.

    On the solaris 8 system with gcc 2.95.3, somehow I was able
    to get it to configure and compile. But it would generate
    segmentation faults.

    Thanks for all you suggestions, and assistance.

    Arnold

     
  • Arnold

    Arnold - 2004-12-03
    • status: pending-works-for-me --> open-works-for-me
     
  • David Relson

    David Relson - 2004-12-04
    • status: open-works-for-me --> closed-works-for-me
     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks