Exim 4.93.0.4 compile error

Pzz

Verified User
Joined
May 20, 2013
Messages
138
Location
The Hague area, The Netherlands
Hi when updating EXIM to 4.93.0.4 I get an error

error: 'for' loop initial declarations are only allowed in C99 mode

It's in the log down below.

Executing /usr/local/directadmin/plugins/custombuild/admin/build exim...
Found /usr/local/directadmin/custombuild/exim-4.93.0.4.tar.gz
Extracting ...
Done.
--2020-01-11 20:21:11-- https://files6.directadmin.com/services/custombuild/Makefile
Resolving files6.directadmin.com (files6.directadmin.com)... 2001:16e8:1:c:62:148:174:106, 62.148.174.106
Connecting to files6.directadmin.com (files6.directadmin.com)|2001:16e8:1:c:62:148:174:106|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 48603 (47K) [text/plain]
Saving to: 'Local/Makefile'

0K .......... .......... .......... .......... ....... 100% 12.9M=0.004s

2020-01-11 20:21:11 (12.9 MB/s) - 'Local/Makefile' saved [48603/48603]

Trying to make exim...
/bin/sh scripts/source_checks

>>> Creating links to source files...
>>> Creating lookups/Makefile for building dynamic modules
>>> New Makefile & lookups/Makefile installed
>>> Use "make makefile" if you need to force rebuilding of the makefile

make[1]: Entering directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
/bin/sh ../scripts/Configure-os.c
cc buildconfig.c
/bin/sh ../scripts/Configure-os.h
cc exim_lock.c
cc -o exim_lock
>>> exim_lock utility built

/bin/sh ../scripts/Configure-config.h "make"
make[2]: Entering directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
make[2]: `buildconfig' is up to date.
make[2]: Leaving directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
Building configuration file config.h
>>> config.h built

cc -DMACRO_PREDEF macro_predef.c
cc -DMACRO_PREDEF globals.c
macro_predef.c: In function 'options_from_list':
macro_predef.c:83:1: error: 'for' loop initial declarations are only allowed in C99 mode
for (int i = 0; i < nopt; i++) if (*(s = US opts.name) && *s != '*')
^
macro_predef.c:83:1: note: use option -std=c99 or -std=gnu99 to compile your code
make[1]: *** [macro_predef.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
make: *** [all] Error 2

Done!


Help?
 
We are also having the same error on updating exim, please fix;

Code:
Executing /usr/local/directadmin/plugins/custombuild/admin/build exim.
Found /usr/local/directadmin/custombuild/exim-4.93.0.4.tar.gz
Extracting ...
Done.
--2020-01-14 13:24:54--  https://files6.directadmin.com/services/custombuild/Makefile
Resolving files6.directadmin.com (files6.directadmin.com)... 62.148.174.106, 2001:16e8:1:c:62:148:174:106
Connecting to files6.directadmin.com (files6.directadmin.com)|62.148.174.106|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 48603 (47K) [text/plain]
Saving to: 'Local/Makefile'

     0K .......... .......... .......... .......... .......   100% 17.8M=0.003s

2020-01-14 13:24:54 (17.8 MB/s) - 'Local/Makefile' saved [48603/48603]

Trying to make exim...
/bin/sh scripts/source_checks

>>> Creating links to source files...
>>> Creating lookups/Makefile for building dynamic modules
>>> New Makefile & lookups/Makefile installed
>>> Use "make makefile" if you need to force rebuilding of the makefile
 
make[1]: Entering directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
/bin/sh ../scripts/Configure-os.c
cc buildconfig.c
/bin/sh ../scripts/Configure-os.h
cc exim_lock.c
cc -o exim_lock
>>> exim_lock utility built
 
/bin/sh ../scripts/Configure-config.h "make"
make[2]: Entering directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
make[2]: `buildconfig' is up to date.
make[2]: Leaving directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
Building configuration file config.h
>>> config.h built

cc -DMACRO_PREDEF macro_predef.c
cc -DMACRO_PREDEF readconf.c
cc -DMACRO_PREDEF globals.c
cc -DMACRO_PREDEF route.c
cc -DMACRO_PREDEF transport.c
cc -DMACRO_PREDEF drtables.c
macro_predef.c: In function 'options_from_list':
macro_predef.c:83:1: error: 'for' loop initial declarations are only allowed in C99 mode
 for (int i = 0; i < nopt; i++)  if (*(s = US opts[i].name) && *s != '*')
 ^
macro_predef.c:83:1: note: use option -std=c99 or -std=gnu99 to compile your code
make[1]: *** [macro_predef.o] Error 1
make[1]: *** Waiting for unfinished jobs....
readconf.c: In function 'options_auths':
readconf.c:415:1: error: 'for' loop initial declarations are only allowed in C99 mode
 for (struct auth_info * ai = auths_available; ai->driver_name[0]; ai++)
 ^
readconf.c:415:1: note: use option -std=c99 or -std=gnu99 to compile your code
readconf.c: In function 'options_logging':
readconf.c:428:1: error: 'for' loop initial declarations are only allowed in C99 mode
 for (bit_table * bp = log_options; bp < log_options + log_options_count; bp++)
 ^
make[1]: *** [macro-readconf.o] Error 1
Done!
 
There are 0 tickets on this issue. Mentioning the OS would help reproducing the issue :) What OS is it?
 
There are 0 tickets on this issue. Mentioning the OS would help reproducing the issue :) What OS is it?

For me its;

Code:
Static hostname: x.x.x
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 330234f09a21425fbcd39a5f43cc9f22
           Boot ID: a20e4eae1bf446a0b0b6d160e9d73948
    Virtualization: vmware
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-957.12.1.el7.x86_64
      Architecture: x86-64
 
Both @Pzz and @level4 are using files6 mirror. You should try a different mirror, and also it might be best to first delete "exim-4.93.0.4.tar.gz" from the custombuild directory, then change to another mirror, for example change to files1.directadmin.com - then do ./build update and ./build exim
 
I removed '/usr/local/directadmin/custombuild/exim-4.93.0.4.tar.gz and tried files-de and files5, but still got the same error.

Then I read the rest of the post :oops: of @ditto and did the ./build update the ./build exim.

That worked.

Code:
Exim version 4.93.0.4 #5 built 15-Jan-2020 19:57:11

Thanks @ditto !
 
Unfortunately we have the same issue here.
rm -rf exim-4.93.0.4 rm -f exim-4.93.0.4.tar.gz
edit options.conf and set downloadserver=filesX.directadmin.comm with 'X' being 1 to 7
./build update && ./build exim

Every time results in:
Code:
Found /usr/local/directadmin/custombuild/exim-4.93.0.4.tar.gz
Extracting ...
Done.
Custom /usr/local/directadmin/custombuild/custom/exim/Makefile being used
Trying to make exim...
/bin/sh scripts/source_checks

>>> Creating links to source files...
>>> Creating lookups/Makefile for building dynamic modules
>>> New Makefile & lookups/Makefile installed
>>> Use "make makefile" if you need to force rebuilding of the makefile

make[1]: Entering directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
/bin/sh ../scripts/Configure-os.c
cc buildconfig.c
/bin/sh ../scripts/Configure-os.h
cc exim_lock.c
cc -o exim_lock
>>> exim_lock utility built

/bin/sh ../scripts/Configure-config.h "make"
make[2]: Entering directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
make[2]: `buildconfig' is up to date.
make[2]: Leaving directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
Building configuration file config.h
>>> config.h built

cc -DMACRO_PREDEF macro_predef.c
cc -DMACRO_PREDEF globals.c
cc -DMACRO_PREDEF readconf.c
macro_predef.c: In function 'options_from_list':
macro_predef.c:83:1: error: 'for' loop initial declarations are only allowed in C99 mode
 for (int i = 0; i < nopt; i++)  if (*(s = US opts[i].name) && *s != '*')
 ^
macro_predef.c:83:1: note: use option -std=c99 or -std=gnu99 to compile your code
make[1]: *** [macro_predef.o] Error 1
make[1]: *** Waiting for unfinished jobs....
readconf.c: In function 'options_auths':
readconf.c:415:1: error: 'for' loop initial declarations are only allowed in C99 mode
 for (struct auth_info * ai = auths_available; ai->driver_name[0]; ai++)
 ^
readconf.c:415:1: note: use option -std=c99 or -std=gnu99 to compile your code
readconf.c: In function 'options_logging':
readconf.c:428:1: error: 'for' loop initial declarations are only allowed in C99 mode
 for (bit_table * bp = log_options; bp < log_options + log_options_count; bp++)
 ^
make[1]: *** [macro-readconf.o] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
make: *** [all] Error 2

System runs on CentOS Linux release 7.7.1908 (Core), kernel 3.10.0-1062.9.1.el7.x86_64

Any suggestions are welcome, tia.
 
first row: "Found /usr/local/directadmin/custombuild/exim-4.93.0.4.tar.gz"
so you must delete it to let costombuild to download new archive.
 
@Zhenyapan ./build update already downloads it fresh.
But without this step and immediately doing a ./build exim after changing the download server results in the same, except the first lines being:
Code:
Downloading             exim-4.93.0.4.tar.gz...
--2020-01-16 12:15:52--  http://files8.directadmin.com/services/custombuild/exim-4.93.0.4.tar.gz
Resolving files8.directadmin.com (files8.directadmin.com)... 212.199.163.181
Connecting to files8.directadmin.com (files8.directadmin.com)|212.199.163.181|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2480960 (2.4M) [application/x-gzip]
Saving to: '/usr/local/directadmin/custombuild/exim-4.93.0.4.tar.gz'

100%[===================================================================================================================>] 2,480,960   2.37MB/s   in 1.0s

2020-01-16 12:15:53 (2.37 MB/s) - '/usr/local/directadmin/custombuild/exim-4.93.0.4.tar.gz' saved [2480960/2480960]

Found /usr/local/directadmin/custombuild/exim-4.93.0.4.tar.gz
Extracting ...
Done.
Custom /usr/local/directadmin/custombuild/custom/exim/Makefile being used
Trying to make exim...
 
That didn't help for me:

Code:
[root@server custombuild]# ./build exim
Downloading        exim-4.93.0.4.tar.gz...
--2020-01-20 07:02:12--  http://files1.directadmin.com/services/custombuild/exim-4.93.0.4.tar.gz
Resolving files1.directadmin.com... 104.128.54.74
Connecting to files1.directadmin.com|104.128.54.74|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2480960 (2.4M) [application/x-gzip]
Saving to: `/usr/local/directadmin/custombuild/exim-4.93.0.4.tar.gz'

100%[===========================================================================================================================================>] 2,480,960   2.89M/s   in 0.8s

2020-01-20 07:02:13 (2.89 MB/s) - `/usr/local/directadmin/custombuild/exim-4.93.0.4.tar.gz' saved [2480960/2480960]

File already exists:    exim
File already exists:    exim_freebsd
File already exists:    exim_debian
Found /usr/local/directadmin/custombuild/exim-4.93.0.4.tar.gz
Extracting ...
Done.
--2020-01-20 07:02:13--  http://files1.directadmin.com/services/custombuild/Makefile
Resolving files1.directadmin.com... 104.128.54.74
Connecting to files1.directadmin.com|104.128.54.74|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 48603 (47K)
Saving to: `Local/Makefile'

100%[===========================================================================================================================================>] 48,603       293K/s   in 0.2s

2020-01-20 07:02:13 (293 KB/s) - `Local/Makefile' saved [48603/48603]

Trying to make exim...
/bin/sh scripts/source_checks

>>> Creating links to source files...
>>> Creating lookups/Makefile for building dynamic modules
>>> New Makefile & lookups/Makefile installed
>>> Use "make makefile" if you need to force rebuilding of the makefile

make[1]: Entering directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
/bin/sh ../scripts/Configure-os.c
cc buildconfig.c
/bin/sh ../scripts/Configure-config.h "make"
make[2]: Entering directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
make[2]: `buildconfig' is up to date.
make[2]: Leaving directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
Building configuration file config.h
>>> config.h built

/bin/sh ../scripts/Configure-os.h
cc -DMACRO_PREDEF macro_predef.c
macro_predef.c: In function 'options_from_list':
macro_predef.c:83: error: 'for' loop initial declarations are only allowed in C99 mode
macro_predef.c:83: note: use option -std=c99 or -std=gnu99 to compile your code
make[1]: *** [macro_predef.o] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/exim-4.93.0.4/build-Linux-x86_64'
make: *** [all] Error 2

*** The make has failed, would you like to try to make again? (y,n): n
 
I don't have a custom Makefile... it downloaded / created it. I Could try to make a custom one though
 
Ah, my bad... my brain was so focused on 'custom' that it read 'custombuild' and thought you also had a custom makefile.
Strange that there is no -std=gnu99 in the downloaded Makefile.
A custom Makefile can be placed in /usr/local/directadmin/custombuild/custom/exim/Makefile, see Support for a custom Exim Makefile. You can copy it from exim-4.93.0.4/Local/Makefile
But did you do a rm -rf exim-4.93.0.4 && rm -f exim-4.93.0.4.tar.gz followed by a ./build update before running ./build exim?
 
I've got it working. Steps taken:

Code:
cd /usr/local/directadmin/custombuild && \
mkdir -p custom/exim && \
cp exim-4.93.0.4/Local/Makefile custom/exim/ && \
echo "CFLAGS += -std=gnu99" >> custom/exim/Makefile && \
echo "USE_OPENSSL=yes" >> custom/exim/Makefile && \
rm -rf exim-4.93.0.4 exim-4.93.0.4.tar.gz && \
./build used_configs && \
./build exim
 
Back
Top