Re: [exim] Defaults for FreeBSD

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Odhiambo Washington
Ημερομηνία:  
Προς: David Siebörger, Jeremy Harris
Υ/ο: exim-users
Αντικείμενο: Re: [exim] Defaults for FreeBSD
On Sun, Apr 9, 2023 at 9:58 PM David Siebörger via Exim-users <
exim-users@???> wrote:

> Hi,
>
> The default settings for CC and USE_DB for FreeBSD seem to be out-of-date.
>
> 1. Since FreeBSD 10.0-RELEASE on most platforms, FreeBSD has not included
> gcc in the base OS --
> https://www.freebsd.org/releases/10.0R/relnotes/#userland
> I'd suggest setting CC=cc in OS/Makefile-FreeBSD to use the clang compiler
> instead.
>
> 2. Makefile-FreeBSD enables the use of FreeBSD's built-in Berkeley DB,
> which is no longer useful because it's Berkeley DB v1. That causes the
> error below. I'd suggest removing USE_DB from OS/Makefile-FreeBSD. Since
> FreeBSD also includes ndbm.h, Exim will use that instead.
>
> Thanks,
>
> David Siebörger
>
>
>
> $ git clone -q git://git.exim.org/exim.git
> $ cd exim/src
> $ mkdir Local
> $ cp src/EDITME Local/Makefile
> $ echo CC=cc >> Local/Makefile
> $ echo EXIM_USER=mailnull >> Local/Makefile
> $ make
> /bin/sh scripts/source_checks
> >>> Creating lookups/Makefile for building dynamic modules
> >>> New Makefile & lookups/Makefile installed
> >>> Use "make makefile" if you need to force rebuilding of the makefile
>
> /bin/sh ../scripts/Configure-config.h "make"
> `buildconfig' is up to date.
> Building configuration file config.h
> >>> config.h built
>
> /bin/sh ../scripts/Configure-os.h
> cc -DMACRO_PREDEF macro_predef.c
> In file included from macro_predef.c:13:
> In file included from ./exim.h:536:
> ./hintsdb.h:466:4: error: Berkeley DB version 1 is no longer supported
> #  error Berkeley DB version 1 is no longer supported
>    ^
> ./hintsdb.h:756:15: error: unknown type name 'EXIM_DB'
> static inline EXIM_DB *
>               ^
> ./hintsdb.h:760:8: warning: implicit declaration of function
> 'exim_dbopen__' is invalid in C99 [-Wimplicit-function-declaration]
> return exim_dbopen__(name, dirname, flags, mode);
>        ^
> ./hintsdb.h:760:8: warning: incompatible integer to pointer conversion
> returning 'int' from a function with result type 'int *' [-Wint-conversion]
> return exim_dbopen__(name, dirname, flags, mode);
>        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ./hintsdb.h:764:14: error: unknown type name 'EXIM_DB'
> exim_dbclose(EXIM_DB * dbp)
>              ^
> ./hintsdb.h:765:3: warning: implicit declaration of function
> 'exim_dbclose__' is invalid in C99 [-Wimplicit-function-declaration]
> { exim_dbclose__(dbp); }
>   ^
> In file included from macro_predef.c:13:
> In file included from ./exim.h:543:
> ./dbfunctions.h:20:37: error: unknown type name 'EXIM_CURSOR'
> uschar  *dbfn_scan(open_db *, BOOL, EXIM_CURSOR **);
>                                     ^
> 3 warnings and 4 errors generated.
> *** Error code 1

>
> Stop.
> make[1]: stopped in /home/drs/src/exim/src/build-FreeBSD-amd64
> *** Error code 1
>
> Stop.
> make: stopped in /home/drs/src/exim/src
>
>

I have been runninng exim-4.96 since RC0 on FreeBSD (I think from
12-RELEASE, thanks to @Jeremy Harris <jgh@???> and others) and what
I have is:

/etc/make.conf:
CC=clang
CXX=clang++
CPP=clang-cpp

The Makefile in use in exim-4.96/Local/Makefile is:
https://pastebin.ubuntu.com/p/5zDnWMYwPx/
I hope one day exim-4.96 will make it into the ports, but I did not have to
wait.

At some point, @Jeremy Harris <jgh@???> advised me that I could use
the below if I want to move from BDB:

For TDB:

USE_TDB = y
DBMLIB = -ltdb

For gdbm:

USE_GDBM = yes
DBMLIB = -lgdbm

I have successfully used tdb on my Linux servers, but I have not done so on
FreeBSD - because I never bothered to.
I am running exim-4.96 on a few FreeBSD 13-RELEASE servers and also a few
Linux (Ubuntu & Debian) for quite some time now.


HTH.


--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
[How to ask smart questions:
http://www.catb.org/~esr/faqs/smart-questions.html]