Loading ...
Sorry, an error occurred while loading the content.

libutil.a(dict_db.o) compilation problem

Expand Messages
  • Davide Poccecai
    Hi all, I m trying to recompile postfix 2.2.9 on Solaris 9 to add the mysql lookup table feature. I compiled it about 2 months ago with -DHAS_DB support and it
    Message 1 of 3 , May 31, 2006
    • 0 Attachment
      Hi all,
      I'm trying to recompile postfix 2.2.9 on Solaris 9 to add the mysql
      lookup table feature.
      I compiled it about 2 months ago with -DHAS_DB support and it worked
      fine, after I installed the Berkeley DB libraries and header files with
      pkg-get (they are in /opt/csw/bdb44 under lib and include subdirs).
      However, this time I cannot compile the source because at some point it
      gives me this error:

      .....
      gcc -Wmissing-prototypes -Wformat -DHAS_DB -I/opt/csw/bdb44/include
      -DHAS_MYSQL -I/usr/local/mysql/include -DHAS_PCRE -I/opt/csw/include
      -DDEF_SENDMAIL_PATH=\"/usr/lib/sendmail\"
      -DDEF_NEWALIAS_PATH=\"/usr/sbin/newaliases\"
      -Dstrcasecmp=fix_strcasecmp
      -Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -c
      master_wakeup.c
      gcc -Wmissing-prototypes -Wformat -DHAS_DB -I/opt/csw/bdb44/include
      -DHAS_MYSQL -I/usr/local/mysql/include -DHAS_PCRE -I/opt/csw/include
      -DDEF_SENDMAIL_PATH=\"/usr/lib/sendmail\"
      -DDEF_NEWALIAS_PATH=\"/usr/sbin/newaliases\"
      -Dstrcasecmp=fix_strcasecmp
      -Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -c
      master_flow.c
      gcc -Wmissing-prototypes -Wformat -DHAS_DB -I/opt/csw/bdb44/include
      -DHAS_MYSQL -I/usr/local/mysql/include -DHAS_PCRE -I/opt/csw/include
      -DDEF_SENDMAIL_PATH=\"/usr/lib/sendmail\"
      -DDEF_NEWALIAS_PATH=\"/usr/sbin/newaliases\"
      -Dstrcasecmp=fix_strcasecmp
      -Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -o
      master master.o master_conf.o master_ent.o master_sig.o master_avail.o
      master_spawn.o master_service.o master_status.o master_listen.o
      master_vars.o master_wakeup.o master_flow.o ../../lib/libglobal.a
      ../../lib/libutil.a -lresolv -lsocket -lnsl
      Undefined first referenced
      symbol in file
      db_create ../../lib/libutil.a(dict_db.o)
      db_version ../../lib/libutil.a(dict_db.o)
      ld: fatal: Symbol referencing errors. No output written to master
      collect2: ld returned 1 exit status
      *** Error code 1
      make: Fatal error: Command failed for target `master'
      Current working directory
      /export/usr12/local/src/postfix-2.2.9/src/master
      *** Error code 1
      make: Fatal error: Command failed for target `update'



      This is the command I used to create the makefiles:

      make makefiles 'CCARGS=-DHAS_DB -I/opt/csw/bdb44/include -DHAS_MYSQL
      -I/usr/local/mysql/include -DHAS_PCRE -I/opt/csw/include
      -DDEF_SENDMAIL_PATH=\"/usr/lib/sendmail\"
      -DDEF_NEWALIAS_PATH=\"/usr/sbin/newaliases\"'
      'AUXLIB=-L/opt/csw/bdb44/lib -ldb -L/usr/local/mysql/lib -lmysqlclient
      -lz -lm -L/opt/csw/lib -lpcre'

      The only difference in the system that could affect the compilation is
      that a couple of weeks ago I removed the original sendmail package
      provided by Sun, so maybe the -DDEF_SENDMAIL_PATH=\"/usr/lib/sendmail\"
      -DDEF_NEWALIAS_PATH=\"/usr/sbin/newaliases\" are not needed anymore
      (but I tried to recompile also without them).

      Any suggestion?

      Thanks,
      Davide
    • Wietse Venema
      ... The SYSTEM db.h include file is for a different version than the code in the SYSTEM object library. Wietse
      Message 2 of 3 , Jun 1, 2006
      • 0 Attachment
        Davide Poccecai:
        > Undefined first referenced
        > symbol in file
        > db_create ../../lib/libutil.a(dict_db.o)
        > db_version ../../lib/libutil.a(dict_db.o)

        The SYSTEM db.h include file is for a different version than the
        code in the SYSTEM object library.

        Wietse
      • Victor Duchovni
        ... No, the OP simply used AUXLIB instead of AUXLIBS , so -ldb was not passed to the linker. -- Viktor. P.S. Morgan Stanley is looking for a New York City
        Message 3 of 3 , Jun 1, 2006
        • 0 Attachment
          On Thu, Jun 01, 2006 at 05:57:35PM -0400, Wietse Venema wrote:

          > Davide Poccecai:
          > > Undefined first referenced
          > > symbol in file
          > > db_create ../../lib/libutil.a(dict_db.o)
          > > db_version ../../lib/libutil.a(dict_db.o)
          >
          > The SYSTEM db.h include file is for a different version than the
          > code in the SYSTEM object library.

          No, the OP simply used "AUXLIB" instead of "AUXLIBS", so "-ldb" was
          not passed to the linker.

          --
          Viktor.

          P.S. Morgan Stanley is looking for a New York City based, Senior Unix
          system/email administrator to architect and sustain the Unix email
          environment. If you are interested, please drop me a note.

          Disclaimer: off-list followups get on-list replies or get ignored.
          Please do not ignore the "Reply-To" header.

          To unsubscribe from the postfix-users list, visit
          http://www.postfix.org/lists.html or click the link below:
          <mailto:majordomo@...?body=unsubscribe%20postfix-users>

          If my response solves your problem, the best way to thank me is to not
          send an "it worked, thanks" follow-up. If you must respond, please put
          "It worked, thanks" in the "Subject" so I can delete these quickly.
        Your message has been successfully submitted and would be delivered to recipients shortly.