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

Compiling 101 for Dummies

Expand Messages
  • Rick Zeman
    I m trying to compile 2.2.10. After fighting through the db.h problem and finding the requisite version for my old system (I m testing on my home box before
    Message 1 of 15 , Jul 21 7:47 PM
    • 0 Attachment
      I'm trying to compile 2.2.10. After fighting through the db.h problem
      and finding the requisite version for my old system (I'm testing on my
      home box before trying at work.) I ran into this. Compiling with base
      + TLS errors out and this non-programmer can't figure out why exactly.
      The compile says it can't find db.in dict_db.c, but I'd previously
      changed the makedefs to where db.h is on the Mandrake 9.2 system which
      is /usr/include/db1/db.h which allowed the compile to start.
      I can't figure out what I'm doing wrong here. :-(

      # make makefiles CCARGS="-DUSE_TLS" AUXLIBS="-lssl -lcrypto"
      make -f Makefile.in MAKELEVEL= Makefiles
      (echo "# Do not edit -- this file documents how Postfix was built for
      your machine."; /bin/sh makedefs) >makedefs.tmp
      set +e; if cmp makedefs.tmp conf/makedefs.out; then rm makedefs.tmp; \
      else mv makedefs.tmp conf/makedefs.out; fi >/dev/null 2>/dev/null
      set -e; for i in src/util src/global src/dns src/tls src/master
      src/postfix src/smtpstone src/sendmail src/error src/pickup
      src/cleanup src/smtpd src/local src/lmtp src/trivial-rewrite src/qmgr
      src/oqmgr src/smtp src/bounce src/pipe src/showq src/postalias
      src/postcat src/postconf src/postdrop src/postkick src/postlock
      src/postlog src/postmap src/postqueue src/postsuper src/qmqpd
      src/spawn src/flush src/verify src/virtual src/proxymap src/anvil
      src/scache src/discard src/tlsmgr; do \
      (set -e; echo "[$i]"; cd $i; rm -f Makefile; \
      make -f Makefile.in Makefile MAKELEVEL=) || exit 1; \
      done;
      [src/util]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/global]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/dns]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/tls]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/master]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/postfix]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/smtpstone]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/sendmail]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/error]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/pickup]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/cleanup]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/smtpd]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/local]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/lmtp]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/trivial-rewrite]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/qmgr]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/oqmgr]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/smtp]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/bounce]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/pipe]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/showq]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/postalias]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/postcat]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/postconf]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/postdrop]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/postkick]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/postlock]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/postlog]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/postmap]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/postqueue]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/postsuper]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/qmqpd]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/spawn]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/flush]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/verify]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/virtual]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/proxymap]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/anvil]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/scache]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/discard]
      (cat ../../conf/makedefs.out Makefile.in) >Makefile
      [src/tlsmgr]
      (set -e; echo "# DO NOT EDIT"; /bin/sh ../../makedefs && cat
      Makefile.in) >Makefile
      rm -f Makefile; (cat conf/makedefs.out Makefile.in) >Makefile
      [root@tux postfix-2.2.10]# make
      set -e; for i in src/util src/global src/dns src/tls src/master
      src/postfix src/smtpstone src/sendmail src/error src/pickup
      src/cleanup src/smtpd src/local src/lmtp src/trivial-rewrite src/qmgr
      src/oqmgr src/smtp src/bounce src/pipe src/showq src/postalias
      src/postcat src/postconf src/postdrop src/postkick src/postlock
      src/postlog src/postmap src/postqueue src/postsuper src/qmqpd
      src/spawn src/flush src/verify src/virtual src/proxymap src/anvil
      src/scache src/discard src/tlsmgr; do \
      (set -e; echo "[$i]"; cd $i; make 'CC=gcc -Wmissing-prototypes
      -Wformat -DUSE_TLS' update MAKELEVEL=) || exit 1; \
      done
      [src/util]
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c alldig.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c argv.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c argv_split.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c attr_print0.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c attr_print64.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c attr_scan0.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c attr_scan64.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c base64_code.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c basename.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c binhash.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c chroot_uid.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c clean_env.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c
      close_on_exec.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c concatenate.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c ctable.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c dict.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c dict_alloc.c
      gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -DLINUX2 -c dict_db.c
      dict_db.c:63:16: db.h: No such file or directory
      dict_db.c:117: error: syntax error before "DB"
      dict_db.c:117: warning: no semicolon at end of struct or union
      dict_db.c:123: error: syntax error before '}' token
      dict_db.c:123: warning: data definition has no type or storage class
      dict_db.c: In function `dict_db_lookup':
      dict_db.c:176: error: `dict_db' undeclared (first use in this function)
      dict_db.c:176: error: (Each undeclared identifier is reported only once
      dict_db.c:176: error: for each function it appears in.)
      dict_db.c:176: error: syntax error before ')' token
      dict_db.c:177: error: `DB' undeclared (first use in this function)
      dict_db.c:177: error: `db' undeclared (first use in this function)
      dict_db.c:178: error: `DBT' undeclared (first use in this function)
      dict_db.c:178: error: syntax error before "db_key"
      dict_db.c:190: error: `db_key' undeclared (first use in this function)
      dict_db.c:191: error: `db_value' undeclared (first use in this function)
      dict_db.c: In function `dict_db_update':
      dict_db.c:244: error: `dict_db' undeclared (first use in this function)
      dict_db.c:244: error: syntax error before ')' token
      dict_db.c:245: error: `DB' undeclared (first use in this function)
      dict_db.c:245: error: `db' undeclared (first use in this function)
      dict_db.c:246: error: `DBT' undeclared (first use in this function)
      dict_db.c:246: error: syntax error before "db_key"
      dict_db.c:256: error: `db_key' undeclared (first use in this function)
      dict_db.c:257: error: `db_value' undeclared (first use in this function)
      dict_db.c:295: error: `R_NOOVERWRITE' undeclared (first use in this function)
      dict_db.c: In function `dict_db_delete':
      dict_db.c:321: error: `dict_db' undeclared (first use in this function)
      dict_db.c:321: error: syntax error before ')' token
      dict_db.c:322: error: `DB' undeclared (first use in this function)
      dict_db.c:322: error: `db' undeclared (first use in this function)
      dict_db.c:323: error: `DBT' undeclared (first use in this function)
      dict_db.c:323: error: syntax error before "db_key"
      dict_db.c:333: error: `db_key' undeclared (first use in this function)
      dict_db.c: In function `dict_db_sequence':
      dict_db.c:387: error: `dict_db' undeclared (first use in this function)
      dict_db.c:387: error: syntax error before ')' token
      dict_db.c:388: error: `DB' undeclared (first use in this function)
      dict_db.c:388: error: `db' undeclared (first use in this function)
      dict_db.c:389: error: `DBT' undeclared (first use in this function)
      dict_db.c:389: error: syntax error before "db_key"
      dict_db.c:459: error: `R_FIRST' undeclared (first use in this function)
      dict_db.c:462: error: `R_NEXT' undeclared (first use in this function)
      dict_db.c:475: error: `db_key' undeclared (first use in this function)
      dict_db.c:475: error: `db_value' undeclared (first use in this function)
      dict_db.c: In function `dict_db_close':
      dict_db.c:501: error: `dict_db' undeclared (first use in this function)
      dict_db.c:501: error: syntax error before ')' token
      dict_db.c: In function `dict_db_open':
      dict_db.c:523: error: `dict_db' undeclared (first use in this function)
      dict_db.c:525: error: `DB' undeclared (first use in this function)
      dict_db.c:525: error: `db' undeclared (first use in this function)
      dict_db.c:645: error: syntax error before ')' token
      dict_db.c: In function `dict_hash_open':
      dict_db.c:688: error: `HASHINFO' undeclared (first use in this function)
      dict_db.c:688: error: syntax error before "tweak"
      dict_db.c:690: error: `tweak' undeclared (first use in this function)
      dict_db.c:706: error: `DB_HASH' undeclared (first use in this function)
      dict_db.c: In function `dict_btree_open':
      dict_db.c:715: error: `BTREEINFO' undeclared (first use in this function)
      dict_db.c:715: error: syntax error before "tweak"
      dict_db.c:717: error: `tweak' undeclared (first use in this function)
      dict_db.c:732: error: `DB_BTREE' undeclared (first use in this function)
      make: *** [dict_db.o] Error 1
      make: *** [update] Error 1
    • Victor Duchovni
      ... make makedefs ... is not cumulative, each run blows away any settings from previous runs. You need to combine the options for all the features ... # make
      Message 2 of 15 , Jul 21 8:12 PM
      • 0 Attachment
        On Fri, Jul 21, 2006 at 10:47:00PM -0400, Rick Zeman wrote:

        > The compile says it can't find db.in dict_db.c, but I'd previously
        > changed the makedefs to where db.h is on the Mandrake 9.2 system which
        > is /usr/include/db1/db.h which allowed the compile to start.

        "make makedefs ..." is not cumulative, each run blows away any settings
        from previous runs. You need to combine the options for all the features
        you want:

        > I can't figure out what I'm doing wrong here. :-(
        >
        > # make makefiles CCARGS="-DUSE_TLS" AUXLIBS="-lssl -lcrypto"

        # make makefiles CCARGS="-DUSE_TLS ... db related CCARGS ..." \
        AUXLIBS="-lssl -lcrypto ... db related AUXLIBS ..."

        Just to drive home the point, my build looks like:

        make makefiles \
        CCARGS='-DHAS_LDAP -I/ms/dist/fsf/PROJ/openldap/2.3/common/include -DHAS_PCRE -I/ms/dist/fsf/PROJ/pcre/6.x/common/include -DHAS_CDB -I/ms/dist/fsf/PROJ/tinycdb/0.75/include -DUSE_TLS -I/ms/dist/sec/PROJ/openssl/0.9.7/include -DDEF_CONFIG_DIR=\"/etc/postfix\" -DDEF_MAILQ_PATH=\"/ms/dist/itsmg/PROJ/postfix/experimental/exec/sbin/mailq\" -DDEF_NEWALIAS_PATH=\"/ms/dist/itsmg/PROJ/postfix/experimental/exec/sbin/newaliases\" -DDEF_DAEMON_DIR=\"/ms/dist/itsmg/PROJ/postfix/experimental/exec/libexec\" -DDEF_COMMAND_DIR=\"/ms/dist/itsmg/PROJ/postfix/experimental/exec/sbin\" -DDEF_SENDMAIL_PATH=\"/ms/dist/itsmg/PROJ/postfix/experimental/exec/sbin/sendmail\" -DDEF_MANPAGE_DIR=\"/ms/dist/itsmg/PROJ/postfix/experimental/common/man\" -DDEF_README_DIR=\"/ms/dist/itsmg/PROJ/postfix/experimental/common/readme\" -DDEF_SAMPLE_DIR=\"/ms/dist/itsmg/PROJ/postfix/experimental/common/sample\" -DDEF_HTML_DIR=\"/ms/dist/itsmg/PROJ/postfix/experimental/common/html\"' \
        AUXLIBS='-Wl,-R,/ms/dist/fsf/PROJ/openldap/2.3/.exec/ia32.linux.2.4.glibc.2.3/lib -Wl,-R,/ms/dist/fsf/PROJ/pcre/6.x/.exec/ia32.linux.2.4.glibc.2.3/lib -L/ms/dist/fsf/PROJ/openldap/2.3/.exec/ia32.linux.2.4.glibc.2.3/lib -lldap -llber -L/ms/dist/fsf/PROJ/pcre/6.x/.exec/ia32.linux.2.4.glibc.2.3/lib -lpcre -L/ms/dist/fsf/PROJ/tinycdb/0.75/.exec/ia32.linux.2.4.glibc.2.3/lib -lcdb -Wl,-R,/ms/dist/sec/PROJ/openssl/0.9.7/.exec/ia32.linux.2.4.glibc.2.3/lib -L/ms/dist/sec/PROJ/openssl/0.9.7/.exec/ia32.linux.2.4.glibc.2.3/lib -lssl -lcrypto'

        --
        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.
      • Rick Zeman
        ... I don t quite follow you, Victor. I only ran it once so overwriting wasn t an issue. I , as the test, was just going for a stripped postfix plus TLS per
        Message 3 of 15 , Jul 21 8:27 PM
        • 0 Attachment
          On 7/21/06, Victor Duchovni <Victor.Duchovni@...> wrote:
          > On Fri, Jul 21, 2006 at 10:47:00PM -0400, Rick Zeman wrote:
          >
          > > The compile says it can't find db.in dict_db.c, but I'd previously
          > > changed the makedefs to where db.h is on the Mandrake 9.2 system which
          > > is /usr/include/db1/db.h which allowed the compile to start.
          >
          > "make makedefs ..." is not cumulative, each run blows away any settings
          > from previous runs. You need to combine the options for all the features
          > you want:
          >
          > > I can't figure out what I'm doing wrong here. :-(
          > >
          > > # make makefiles CCARGS="-DUSE_TLS" AUXLIBS="-lssl -lcrypto"
          >
          > # make makefiles CCARGS="-DUSE_TLS ... db related CCARGS ..." \
          > AUXLIBS="-lssl -lcrypto ... db related AUXLIBS ..."

          I don't quite follow you, Victor. I only ran it once so overwriting
          wasn't an issue. I , as the test, was just going for a stripped
          postfix plus TLS per http://www.postfix.org/TLS_README.html .
        • Wietse Venema
          ... You modified a Postfix file, you have a problem, and you don t show what change you made, yet you expect people here to telepathically guess what mistake
          Message 4 of 15 , Jul 21 8:36 PM
          • 0 Attachment
            Rick Zeman:
            > I'm trying to compile 2.2.10. After fighting through the db.h problem
            > and finding the requisite version for my old system (I'm testing on my
            > home box before trying at work.) I ran into this. Compiling with base
            > + TLS errors out and this non-programmer can't figure out why exactly.
            > The compile says it can't find db.in dict_db.c, but I'd previously
            > changed the makedefs to where db.h is on the Mandrake 9.2 system which
            > is /usr/include/db1/db.h which allowed the compile to start.
            > I can't figure out what I'm doing wrong here. :-(

            You modified a Postfix file, you have a problem, and you don't show
            what change you made, yet you expect people here to telepathically
            guess what mistake you made.
          • Victor Duchovni
            ... You did not provide the settings needed for Postfix to find your db.h file. Perhaps you need to install the db-devel RPM or similar. A db1/db.h is rather
            Message 5 of 15 , Jul 21 8:37 PM
            • 0 Attachment
              On Fri, Jul 21, 2006 at 11:27:14PM -0400, Rick Zeman wrote:

              > On 7/21/06, Victor Duchovni <Victor.Duchovni@...> wrote:
              > >On Fri, Jul 21, 2006 at 10:47:00PM -0400, Rick Zeman wrote:
              > >
              > >> The compile says it can't find db.in dict_db.c, but I'd previously
              > >> changed the makedefs to where db.h is on the Mandrake 9.2 system which
              > >> is /usr/include/db1/db.h which allowed the compile to start.
              > >
              > >"make makedefs ..." is not cumulative, each run blows away any settings
              > >from previous runs. You need to combine the options for all the features
              > >you want:
              > >
              > >> I can't figure out what I'm doing wrong here. :-(
              > >>
              > >> # make makefiles CCARGS="-DUSE_TLS" AUXLIBS="-lssl -lcrypto"
              > >
              > > # make makefiles CCARGS="-DUSE_TLS ... db related CCARGS ..." \
              > > AUXLIBS="-lssl -lcrypto ... db related AUXLIBS ..."
              >
              > I don't quite follow you, Victor. I only ran it once so overwriting
              > wasn't an issue. I , as the test, was just going for a stripped
              > postfix plus TLS per http://www.postfix.org/TLS_README.html .

              You did not provide the settings needed for Postfix to find your
              db.h file. Perhaps you need to install the db-devel RPM or similar. A
              "db1/db.h" is rather ancient and will probably not work well if it is
              Berkeley 1.86 and your system is linux and not NetBSD or similar...

              --
              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.
            • Rick Zeman
              ... Sorry, but I thought that but I d previously changed the makedefs to where db.h is on the Mandrake 9.2 system which is /usr/include/db1/db.h which allowed
              Message 6 of 15 , Jul 21 8:42 PM
              • 0 Attachment
                On 7/21/06, Wietse Venema <wietse@...> wrote:
                > Rick Zeman:
                > > I'm trying to compile 2.2.10. After fighting through the db.h problem
                > > and finding the requisite version for my old system (I'm testing on my
                > > home box before trying at work.) I ran into this. Compiling with base
                > > + TLS errors out and this non-programmer can't figure out why exactly.
                > > The compile says it can't find db.in dict_db.c, but I'd previously
                > > changed the makedefs to where db.h is on the Mandrake 9.2 system which
                > > is /usr/include/db1/db.h which allowed the compile to start.
                > > I can't figure out what I'm doing wrong here. :-(
                >
                > You modified a Postfix file, you have a problem, and you don't show
                > what change you made, yet you expect people here to telepathically
                > guess what mistake you made.

                Sorry, but I thought that "but I'd previously changed the makedefs to
                where db.h is on the Mandrake 9.2 system which is
                /usr/include/db1/db.h which allowed the compile to start" was
                sufficient since that's non-standard. That file said db.h was at
                /usr/include/db/; on mine it's at /usr/include/db1/ so I changed the
                two paths in that file:

                [root@tux postfix-2.2.10]# grep db.h *
                HISTORY: look for <db/db.h>.
                makedefs: if [ -f /usr/include/db1/db.h ]
                makedefs: elif [ -f /usr/include/db1/db.h ]
                makedefs: # by including <db.h> and by linking with -ldb
                makedefs: echo "No <db.h> include file found." 1>&2
              • Wietse Venema
                ... Unfortunately, it s not sufficient, because sometimes people make mistakes, and many problems wre the result of a discrepancy between what the user
                Message 7 of 15 , Jul 21 8:46 PM
                • 0 Attachment
                  Rick Zeman:
                  > On 7/21/06, Wietse Venema <wietse@...> wrote:
                  > > Rick Zeman:
                  > > > I'm trying to compile 2.2.10. After fighting through the db.h problem
                  > > > and finding the requisite version for my old system (I'm testing on my
                  > > > home box before trying at work.) I ran into this. Compiling with base
                  > > > + TLS errors out and this non-programmer can't figure out why exactly.
                  > > > The compile says it can't find db.in dict_db.c, but I'd previously
                  > > > changed the makedefs to where db.h is on the Mandrake 9.2 system which
                  > > > is /usr/include/db1/db.h which allowed the compile to start.
                  > > > I can't figure out what I'm doing wrong here. :-(
                  > >
                  > > You modified a Postfix file, you have a problem, and you don't show
                  > > what change you made, yet you expect people here to telepathically
                  > > guess what mistake you made.
                  >
                  > Sorry, but I thought that "but I'd previously changed the makedefs to
                  > where db.h is on the Mandrake 9.2 system which is
                  > /usr/include/db1/db.h which allowed the compile to start" was
                  > sufficient since that's non-standard. That file said db.h was at

                  Unfortunately, it's not sufficient, because sometimes people make
                  mistakes, and many problems wre the result of a discrepancy between
                  what the user BELIEVES was done and what was ACATUALLY done.

                  I have learned to my own peril to not believe people'e eye witness
                  reports but to ask for hard evidence.

                  > /usr/include/db/; on mine it's at /usr/include/db1/ so I changed the
                  > two paths in that file:
                  >
                  > [root@tux postfix-2.2.10]# grep db.h *
                  > HISTORY: look for <db/db.h>.
                  > makedefs: if [ -f /usr/include/db1/db.h ]
                  > makedefs: elif [ -f /usr/include/db1/db.h ]
                  > makedefs: # by including <db.h> and by linking with -ldb
                  > makedefs: echo "No <db.h> include file found." 1>&2

                  A proper problem report provides DIFF between the original file
                  and the modified one.

                  Wietse

                  Wietse
                • /dev/rob0
                  ... make(1) (or gcc?) still said it failed to find db.h. ... You also need Berkeley DB as per DB_README.html . You do not have the CCARGS and AUXLIBS
                  Message 8 of 15 , Jul 21 8:49 PM
                  • 0 Attachment
                    On Friday 21 July 2006 22:27, Rick Zeman wrote:
                    > > On Fri, Jul 21, 2006 at 10:47:00PM -0400, Rick Zeman wrote:
                    > > > The compile says it can't find db.in dict_db.c, but I'd
                    > > > previously changed the makedefs to where db.h is on the Mandrake
                    > > > 9.2 system which is /usr/include/db1/db.h which allowed the
                    > > > compile to start.

                    make(1) (or gcc?) still said it failed to find db.h.

                    > On 7/21/06, Victor Duchovni <Victor.Duchovni@...> wrote:
                    > > "make makedefs ..." is not cumulative, each run blows away any
                    > > settings from previous runs. You need to combine the options for
                    > > all the features
                    > >
                    > > you want:
                    > > > I can't figure out what I'm doing wrong here. :-(
                    > > >
                    > > > # make makefiles CCARGS="-DUSE_TLS" AUXLIBS="-lssl -lcrypto"
                    > >
                    > > # make makefiles CCARGS="-DUSE_TLS ... db related CCARGS ..." \
                    > > AUXLIBS="-lssl -lcrypto ... db related AUXLIBS ..."
                    >
                    > I don't quite follow you, Victor. I only ran it once so overwriting
                    > wasn't an issue. I , as the test, was just going for a stripped
                    > postfix plus TLS per http://www.postfix.org/TLS_README.html .

                    You also need Berkeley DB as per "DB_README.html". You do not have the
                    CCARGS and AUXLIBS arguments you need to help make(1) find the Berkeley
                    DB library.

                    Bottom line is that compiling things is not so easy on the "easy"
                    GNU/Linux distributions. :) Also, Mandrake 9.2 is getting a bit
                    outdated. I have a sneaking suspicion that once your DB problem is
                    fixed, another one will pop up.

                    On my systems (Slackware Linux, just about every release from 8.0
                    onward) I don't add anything to "make makefiles" for DB support. Here's
                    what I do at one of them, much simpler than Viktor's example :) :

                    make makefiles CCARGS="-DUSE_SASL_AUTH \
                    -DDEF_SASL_SERVER_TYPE=\"dovecot\" -DHAS_PGSQL -DUSE_TLS" \
                    AUXLIBS="-lpq -lssl -lcrypto" && time make -j3

                    With libraries in non-default paths, more is needed in your "make
                    makefiles" command. I suggest you use the "right" way and not make
                    changes in the source files. :)
                    --
                    Offlist mail to this address is discarded unless
                    "/dev/rob0" or "not-spam" is in Subject: header
                  • Rick Zeman
                    ... I know. But before there was a db.h at all (or before I edited makedefs) the compile errored out right away: make make -f Makefile.in MAKELEVEL= Makefiles
                    Message 9 of 15 , Jul 21 9:24 PM
                    • 0 Attachment
                      On 7/21/06, /dev/rob0 <rob0@...> wrote:
                      > On Friday 21 July 2006 22:27, Rick Zeman wrote:
                      > > > On Fri, Jul 21, 2006 at 10:47:00PM -0400, Rick Zeman wrote:
                      > > > > The compile says it can't find db.in dict_db.c, but I'd
                      > > > > previously changed the makedefs to where db.h is on the Mandrake
                      > > > > 9.2 system which is /usr/include/db1/db.h which allowed the
                      > > > > compile to start.
                      >
                      > make(1) (or gcc?) still said it failed to find db.h.

                      I know. But before there was a db.h at all (or before I edited
                      makedefs) the compile errored out right away:

                      make
                      make -f Makefile.in MAKELEVEL= Makefiles
                      (echo "# Do not edit -- this file documents how Postfix was built for
                      your machine."; /bin/sh makedefs) >makedefs.tmp
                      No <db.h> include file found.
                      Install the appropriate db*-devel package first.
                      See the RELEASE_NOTES file for more information.
                      make: *** [Makefiles] Error 1
                      make: *** [Makefiles] Error 2

                      SO, the make/gcc could find it well enough to get later in the compile
                      before erroring out, which makes me think that Victor's right about
                      the library being too old (dunno; I have no way to prove or disprove
                      that thesis, but it's logical).

                      > > On 7/21/06, Victor Duchovni <Victor.Duchovni@...> wrote:
                      > > > "make makedefs ..." is not cumulative, each run blows away any
                      > > > settings from previous runs. You need to combine the options for
                      > > > all the features
                      > > >
                      > > > you want:
                      > > > > I can't figure out what I'm doing wrong here. :-(
                      > > > >
                      > > > > # make makefiles CCARGS="-DUSE_TLS" AUXLIBS="-lssl -lcrypto"
                      > > >
                      > > > # make makefiles CCARGS="-DUSE_TLS ... db related CCARGS ..." \
                      > > > AUXLIBS="-lssl -lcrypto ... db related AUXLIBS ..."
                      > >
                      > > I don't quite follow you, Victor. I only ran it once so overwriting
                      > > wasn't an issue. I , as the test, was just going for a stripped
                      > > postfix plus TLS per http://www.postfix.org/TLS_README.html .
                      >
                      > You also need Berkeley DB as per "DB_README.html". You do not have the
                      > CCARGS and AUXLIBS arguments you need to help make(1) find the Berkeley
                      > DB library.

                      I have the Berkeley DB because netatalk uses it to store Mac-specific
                      info. BUT, the light bulb flashed between what you said, what Victor
                      said, and what the TLS_README said, in that I took that command line
                      literally instead of adding each argument to the others.

                      >
                      > Bottom line is that compiling things is not so easy on the "easy"
                      > GNU/Linux distributions. :) Also, Mandrake 9.2 is getting a bit
                      > outdated. I have a sneaking suspicion that once your DB problem is
                      > fixed, another one will pop up.

                      Yeah, I know. It's been on my agenda to redo it for at least a year
                      since it got EOL'd. Not a priority, obviously. It's running Postfix
                      2.1.1 and Mailman, and doing so perfectly. Postfix just compiled fine
                      on a modern SuSE system (followed by a quick make tidy), so operator
                      error's at least out of the equation now. No biggie that I can't
                      compile it on Mandrake: it's the SuSE system that ultimately needs to
                      be upgraded.

                      > With libraries in non-default paths, more is needed in your "make
                      > makefiles" command. I suggest you use the "right" way and not make
                      > changes in the source files. :)

                      Ahem. :-) From the DB_README: "On Linux, you need to edit the
                      makedefs script in order to specify a non-default DB library. The
                      reason is that the location of the default db.h include file changes
                      randomly between vendors and between versions, so that Postfix has to
                      choose the file for you."
                      So I thought that WAS the right way!
                    • Rick Zeman
                      ... Is there a way to see what options an existing Postfix installation was built with? I suppose if one had the original source tree they could, and if one
                      Message 10 of 15 , Jul 22 7:04 PM
                      • 0 Attachment
                        On 7/21/06, Rick Zeman <rzeman@...> wrote:
                        > I'm trying to compile 2.2.10.

                        Is there a way to see what options an existing Postfix installation
                        was built with? I suppose if one had the original source tree they
                        could, and if one had the .src RPM they could, but if not? I read man
                        postconf hoping there was a switgch I'd never heard of, but alas....
                        TIA
                      • Luca Berra
                        ... the change you did is wrong /usr/include/db1/db.h is the include file for the old db1 compatibility library, i.e. not what you want. try installing the
                        Message 11 of 15 , Jul 23 5:58 AM
                        • 0 Attachment
                          On Fri, Jul 21, 2006 at 10:47:00PM -0400, Rick Zeman wrote:
                          >I'm trying to compile 2.2.10. After fighting through the db.h problem
                          >and finding the requisite version for my old system (I'm testing on my
                          >home box before trying at work.) I ran into this. Compiling with base
                          >+ TLS errors out and this non-programmer can't figure out why exactly.
                          >The compile says it can't find db.in dict_db.c, but I'd previously
                          >changed the makedefs to where db.h is on the Mandrake 9.2 system which
                          >is /usr/include/db1/db.h which allowed the compile to start.
                          >I can't figure out what I'm doing wrong here. :-(

                          the change you did is wrong

                          /usr/include/db1/db.h is the include file for the old db1 compatibility
                          library, i.e. not what you want.

                          try installing the libdb4.1-devel package instead.

                          btw upgrading to a still supported mandriva release, which also contains
                          postfix 2.2 might be another way to ease your pains.

                          L.

                          --
                          Luca Berra -- bluca@...
                          Communication Media & Services S.r.l.
                          /"\
                          \ / ASCII RIBBON CAMPAIGN
                          X AGAINST HTML MAIL
                          / \
                        • Devdas Bhagat
                          ... /etc/postfix/makedefs.out Devdas Bhagat
                          Message 12 of 15 , Jul 23 6:54 AM
                          • 0 Attachment
                            On 22/07/06 22:04 -0400, Rick Zeman wrote:
                            > On 7/21/06, Rick Zeman <rzeman@...> wrote:
                            > >I'm trying to compile 2.2.10.
                            >
                            > Is there a way to see what options an existing Postfix installation
                            > was built with? I suppose if one had the original source tree they
                            > could, and if one had the .src RPM they could, but if not? I read man
                            > postconf hoping there was a switgch I'd never heard of, but alas....

                            /etc/postfix/makedefs.out

                            Devdas Bhagat
                          • Rick Zeman
                            ... And we have victory: # telnet localhost 25 220 tux.pointyears.net ESMTP: Postfix 2.2.11* (* I couldn t remember the command to show the version and my
                            Message 13 of 15 , Jul 24 8:49 PM
                            • 0 Attachment
                              On 7/21/06, Rick Zeman <rzeman@...> wrote:
                              > I'm trying to compile 2.2.10.

                              And we have victory:

                              # telnet localhost 25
                              220 tux.pointyears.net ESMTP: Postfix 2.2.11*

                              (* I couldn't remember the command to show the version and my book's
                              at work....)

                              Built with TLS on the old Mandrake system. Once I got the libraries
                              straight, it was all a piece of cake. I just did a make upgrade and
                              the 2.1.1 (from RPM) got updated perfectly. May be a small step for
                              you guys, but it's huge for me. Tomorrow, I get to do the certs, but
                              I've already done all that with Postfix so I'm in the clear.

                              Thank you, gentlemen.
                            • Rick Zeman
                              What additional info should I provide to troubleshoot a compile error? With a minimal option of make makefiles CCARGS= -DUSE_TLS AUXLIBS= -lssl -l partway
                              Message 14 of 15 , Jul 31 8:04 PM
                              • 0 Attachment
                                What additional info should I provide to troubleshoot a compile error?

                                With a minimal option of "make makefiles CCARGS="-DUSE_TLS"
                                AUXLIBS="-lssl -l" partway through the compile it dies with:

                                gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -I../../include
                                -DLINUX2 -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 -lssl -l -ldb -lnsl -lresolv
                                /usr/lib/gcc-lib/i586-suse-linux/3.3.4/../../../../i586-suse-linux/bin/ld:
                                cannot find -l-ldb
                                collect2: ld returned 1 exit status
                                make: *** [master] Error 1
                                make: *** [update] Error 1

                                Obviously, it's gcc 3.3.4, on SuSE 9.3

                                Thanks.
                              • Rick Zeman
                                Err, ignore this. :-) Stupid typo.
                                Message 15 of 15 , Jul 31 8:07 PM
                                • 0 Attachment
                                  Err, ignore this. :-) Stupid typo.

                                  On 7/31/06, Rick Zeman <rzeman@...> wrote:
                                  > What additional info should I provide to troubleshoot a compile error?
                                  >
                                  > With a minimal option of "make makefiles CCARGS="-DUSE_TLS"
                                  > AUXLIBS="-lssl -l" partway through the compile it dies with:
                                  >
                                  > gcc -Wmissing-prototypes -Wformat -DUSE_TLS -g -O -I. -I../../include
                                  > -DLINUX2 -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 -lssl -l -ldb -lnsl -lresolv
                                  > /usr/lib/gcc-lib/i586-suse-linux/3.3.4/../../../../i586-suse-linux/bin/ld:
                                  > cannot find -l-ldb
                                  > collect2: ld returned 1 exit status
                                  > make: *** [master] Error 1
                                  > make: *** [update] Error 1
                                  >
                                  > Obviously, it's gcc 3.3.4, on SuSE 9.3
                                  >
                                  > Thanks.
                                  >
                                Your message has been successfully submitted and would be delivered to recipients shortly.