Mailing List Archive

Defaults for FreeBSD
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

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Defaults for FreeBSD [ In reply to ]
On 09/04/2023 17:58, David Siebörger via Exim-users wrote:
> The default settings for CC and USE_DB for FreeBSD seem to be out-of-date.

I'd like to hear from the FreeBSD package maintainer their preferences,
even though you're talking about the upstream git.

Folding back any patches FreeBSD is carrying, whree feasible,
would be good.

Unfortunately I don't know right off how to find out who that is.
--
Cheers,
Jeremy


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Defaults for FreeBSD [ In reply to ]
Hello!

On Sun, 09 Apr 2023 at 20:29:42 (+0100), Jeremy Harris via Exim-users wrote:

> On 09/04/2023 17:58, David Sieb??rger via Exim-users wrote:
> > The default settings for CC and USE_DB for FreeBSD seem to be out-of-date.

> I'd like to hear from the FreeBSD package maintainer their preferences,
> even though you're talking about the upstream git.

> Folding back any patches FreeBSD is carrying, whree feasible,
> would be good.

> Unfortunately I don't know right off how to find out who that is.

Maybe fluffy@FreeBSD.org would like to weigh in.

--
George L. Yermulnik
[YZ-RIPE]

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Defaults for FreeBSD [ In reply to ]
Jeremy Harris via Exim-users wrote on 09.04.2023 22:29:
> On 09/04/2023 17:58, David Siebörger via Exim-users wrote:
>> The default settings for CC and USE_DB for FreeBSD seem to be
>> out-of-date.
>
> I'd like to hear from the FreeBSD package maintainer their preferences,
> even though you're talking about the upstream git.
>
> Folding back any patches FreeBSD is carrying, whree feasible,
> would be good.
>
> Unfortunately I don't know right off how to find out who that is.

# grep ^MAINTAINER= /usr/ports/mail/exim/Makefile
MAINTAINER= fluffy@FreeBSD.org


--
Best wishes Victor Ustugov
mailto:victor@corvax.kiev.ua
public GnuPG/PGP key: https://victor.corvax.kiev.ua/corvax.asc

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Defaults for FreeBSD [ In reply to ]
On Sun, Apr 9, 2023 at 9:58?PM David Siebörger via Exim-users <
exim-users@exim.org> 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@wizmail.org> 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@wizmail.org> 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]
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Defaults for FreeBSD [ In reply to ]
At 10:57 PM on Sunday 9 April 2023, Odhiambo Washington wrote:
> I hope one day exim-4.96 will make it into the ports, but I did not have to
> wait.

There's some work on updating the port to 4.96 here:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265098

Regards,


David Sieb?rger

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Defaults for FreeBSD [ In reply to ]
Hi!

> Unfortunately I don't know right off how to find out who that is.

https://www.freshports.org/mail/exim/

has the maintainer listed. This works for all FreeBSD ports,
sometimes, it's not a person, but a group. If there's no
maintainer, ports@FreeBSD.org is used.

--
pi@opsec.eu +49 171 3101372 Now what ?

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/