The last few weeks we had problems with 2.1.8, so today I tried to install 2.1.9 on our test system. When building it, we encountered some problems with the compilation. I saw the same problems in 2.1.8, but then there were more serious problems, so I forgot to mention them in this mail group.

This is information about the operating system:

/etc/os-release
::::::::::::::
NAME="SLES"
VERSION="12-SP5"
VERSION_ID="12.5"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP5"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp5"

I downloaded the opendnssec-2.1.9.tar.gz file and extracted its contents in a directory. I changed directory into the opendnssec-2.1.9 directory and I used "./configure" to prepare for building. Then I used the "make" command, to build the programs. This continued for some time, but then it exited with the following messages:

../../common/scheduler/worker.h:38:1: warning: C++ style comments are not allowed in ISO C90 [enabled by default]
 //~ #include <time.h>
 ^
../../common/scheduler/worker.h:38:1: warning: (this will be reported only once per input file) [enabled by default]
adapter/adapi.c: In function ‘adapi_process_rr’:
adapter/adapi.c:329:13: error: ‘for’ loop initial declarations are only allowed in C99 mode
             for (int i = 0; i < strlen(str); i++) {
             ^
adapter/adapi.c:329:13: note: use option -std=c99 or -std=gnu99 to compile your code
Makefile:801: recipe for target 'adapter/adapi.o' failed
make[2]: *** [adapter/adapi.o] Error 1
make[2]: Leaving directory '/downloads/opendnssec-2.1.9/signer/src'
Makefile:483: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/downloads/opendnssec-2.1.9/signer'
Makefile:534: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

From these errors I concluded that I had to add the "-std=c99" option to the compiler, so I used:

export CFLAGS="-std=c99"
./configure
make clean
make

But then another errors was printed:

./wire/notify.h:64:21: error: field ‘timeout’ has incomplete type
     struct timespec timeout;
                     ^
Makefile:801: recipe for target 'daemon/signertasks.o' failed
make[2]: *** [daemon/signertasks.o] Error 1
make[2]: Leaving directory '/downloads/opendnssec-2.1.9/signer/src'
Makefile:483: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/downloads/opendnssec-2.1.9/signer'
Makefile:534: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1


I finally found a work-around with

unset CFLAGS
./configure
make clean
make

Then, when the above error caused an exit of the make, I entered the signer/src directory and I copied/pasted the latest gcc command shown, adding the -std=c99 option. Then I returned to the main directory and used "make" again, which continued to compile other source files. This I had to do for about three source files. I have the impression that I now have a working set of programs, although I am a little bit worried having linked object files with different compiler options.

So, two questions:

1) Is there a way to use configure such that the compilation does not end with errors?
2) Is a mix of object files with and without the -std=c99 option dangerous?


_______________________________________________
Opendnssec-user mailing list
[email protected]
https://lists.opendnssec.org/mailman/listinfo/opendnssec-user

Reply via email to