Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cyrus-sasl 2.1.28 triggers compilation errors with gcc 14.1.0 #844

Closed
dschepler opened this issue Jul 19, 2024 · 5 comments
Closed

cyrus-sasl 2.1.28 triggers compilation errors with gcc 14.1.0 #844

dschepler opened this issue Jul 19, 2024 · 5 comments

Comments

@dschepler
Copy link

Trying to build the latest release https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-2.1.28/cyrus-sasl-2.1.28.tar.gz on my system with gcc 14.1.0, I get a couple compilation errors:

make  all-am
make[3]: Entering directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64/lib'
depbase=`echo saslutil.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../lib -I..  -DLIBSASL_EXPORTS=1 -I../../../include -I../../../plugins -I../include -I../../../sasldb -I../../../common -DCONFIGDIR='"/usr/lib64/sasl2:/etc/sasl2"' -DPLUGINDIR='"/usr/lib64/sasl2"' -DOBSOLETE_CRAM_ATTR=1 -DOBSOLETE_DIGEST_ATTR=1  -Wall -W -g -O2 -MT saslutil.lo -MD -MP -MF $depbase.Tpo -c -o saslutil.lo ../../../lib/saslutil.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../lib -I.. -DLIBSASL_EXPORTS=1 -I../../../include -I../../../plugins -I../include -I../../../sasldb -I../../../common -DCONFIGDIR=\"/usr/lib64/sasl2:/etc/sasl2\" -DPLUGINDIR=\"/usr/lib64/sasl2\" -DOBSOLETE_CRAM_ATTR=1 -DOBSOLETE_DIGEST_ATTR=1 -Wall -W -g -O2 -MT saslutil.lo -MD -MP -MF .deps/saslutil.Tpo -c ../../../lib/saslutil.c  -fPIC -DPIC -o .libs/saslutil.o
../../../lib/saslutil.c: In function 'sasl_mkchal':
../../../lib/saslutil.c:280:3: error: implicit declaration of function 'time' [-Wimplicit-function-declaration]
  280 |   time(&now);
      |   ^~~~
../../../lib/saslutil.c:66:1: note: 'time' is defined in header '<time.h>'; this is probably fixable by adding '#include <time.h>'
   65 | #include "saslint.h"
  +++ |+#include <time.h>
   66 | #include <saslutil.h>
../../../lib/saslutil.c: In function 'getranddata':
../../../lib/saslutil.c:364:41: error: implicit declaration of function 'clock' [-Wimplicit-function-declaration]
  364 |             ret[1] ^= (unsigned short) (clock() & 0xFFFF);
      |                                         ^~~~~
../../../lib/saslutil.c:364:41: note: 'clock' is defined in header '<time.h>'; this is probably fixable by adding '#include <time.h>'
../../../lib/saslutil.c: In function 'get_fqhostname':
../../../lib/saslutil.c:563:42: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  563 |         || strlen (result->ai_canonname) > namelen -1) {
      |                                          ^
make[3]: *** [Makefile:643: saslutil.lo] Error 1
make[3]: Target 'all-am' not remade because of errors.
make[3]: Leaving directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64/lib'
make[2]: *** [Makefile:507: all] Error 2
make[2]: Leaving directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64/lib'
Making all in plugins
make[2]: Entering directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64/plugins'
depbase=`echo cram.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../plugins -I..  -DLIBSASL_EXPORTS=1 -I../../../include -I../../../lib -I../../../sasldb -I../../../common -I../include -DOBSOLETE_CRAM_ATTR=1 -DOBSOLETE_DIGEST_ATTR=1  -Wall -W -g -O2 -MT cram.lo -MD -MP -MF $depbase.Tpo -c -o cram.lo ../../../plugins/cram.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../plugins -I.. -DLIBSASL_EXPORTS=1 -I../../../include -I../../../lib -I../../../sasldb -I../../../common -I../include -DOBSOLETE_CRAM_ATTR=1 -DOBSOLETE_DIGEST_ATTR=1 -Wall -W -g -O2 -MT cram.lo -MD -MP -MF .deps/cram.Tpo -c ../../../plugins/cram.c  -fPIC -DPIC -o .libs/cram.o
../../../plugins/cram.c: In function 'gettime':
../../../plugins/cram.c:132:7: error: implicit declaration of function 'time' [-Wimplicit-function-declaration]
  132 |     t=time(NULL);
      |       ^~~~
../../../plugins/cram.c:61:1: note: 'time' is defined in header '<time.h>'; this is probably fixable by adding '#include <time.h>'
   60 | #include "plugin_common.h"
  +++ |+#include <time.h>
   61 | 
make[2]: *** [Makefile:762: cram.lo] Error 1
make[2]: Target 'all' not remade because of errors.
make[2]: Leaving directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64/plugins'
Making all in utils
make[2]: Entering directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64/utils'
make[2]: *** No rule to make target '../lib/libsasl2.la', needed by 'dbconverter-2'.
make[2]: Target 'all' not remade because of errors.
make[2]: Leaving directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64/utils'
Making all in sample
make[2]: Entering directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64/sample'
make[2]: *** No rule to make target '../lib/libsasl2.la', needed by 'client'.
make[2]: Target 'all' not remade because of errors.
make[2]: Leaving directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64/sample'
Making all in saslauthd
make[2]: Entering directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64/saslauthd'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64/saslauthd'
make[2]: Entering directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64'
make[2]: Leaving directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64'
make[1]: *** [Makefile:679: all-recursive] Error 1
make[1]: Leaving directory '/home/unfrobbed-dev/pkgs/cyrus-sasl/cyrus-sasl-2.1.28/debian/obj-amd64'
make: *** [Makefile:547: all] Error 2

(In response to an earlier comment on a different issue: I do see lines #ifdef HAVE_TIME_H // #include <time.h> // #endif in lib/saslutil.c. However, in a search through the source code and build directory, the only files that contain HAVE_TIME_H are lib/saslutil.c and mac/libdes/src/speed.c. I don't see anything in the configure script that would actually test for time.h and set HAVE_TIME_H. I also don't see any such include in plugins/cram.c.)

@quanah
Copy link
Contributor

quanah commented Jul 19, 2024

duplicate #838

@quanah quanah closed this as completed Jul 19, 2024
@flowerysong
Copy link
Contributor

flowerysong commented Jul 19, 2024

cram.c and the general check for time.h were fixed in 266f0ac; cram.c was then removed in 5436909.

@quanah
Copy link
Contributor

quanah commented Jul 19, 2024

Thanks. Generally the 2.1 tree is dead, reporting errors should be done against current master.

@dschepler
Copy link
Author

OK, so you're saying this comes under the heading of #835 then?

@quanah
Copy link
Contributor

quanah commented Jul 19, 2024

If you find problems with the master branch that don't already have issues, feel free to file them. there are no new planned releases for the 2.1 series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants