michaelrsweet / pappl

PAPPL - Printer Application Framework
https://www.msweet.org/pappl
Apache License 2.0
310 stars 50 forks source link

1.3.3 FTBFS #292

Closed jengelh closed 1 year ago

jengelh commented 1 year ago

Describe the bug Fails to build from source.

To Reproduce Steps to reproduce the behavior:

Build with gnutls, without openssl.

[    3s] + CONFIG_SHELL=/usr/bin/bash
[    3s] + export CONFIG_SHELL
[    3s] + CFLAGS='-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto'
[    3s] + export CFLAGS
[    3s] + CXXFLAGS='-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto'
[    3s] + export CXXFLAGS
[    3s] + FFLAGS='-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto '
[    3s] + export FFLAGS
[    3s] + FCFLAGS='-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto '
[    3s] + export FCFLAGS
[    3s] + LDFLAGS=-flto=auto
[    3s] + export LDFLAGS
[    3s] + ./configure --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-static --includedir=/usr/include/pappl
...
[    5s] + make -j16
...
[    5s] gcc -fPIC -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -I..  -I/usr/include/p11-kit-1 -D_REENTRANT  -D_THREAD_SAFE -D_REENTRANT -D_REENTRANT  -I/usr/include/p11-kit-1   -I/usr/include/libpng16  -I/usr/include/libusb-1.0  -D_FORTIFY_SOURCE=2 -D__USE_MISC -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Os -Wall -Wunused -c -o system-webif.o system-webif.c
[    5s] <command-line>: warning: "_FORTIFY_SOURCE" redefined
[    5s] <command-line>: note: this is the location of the previous definition
[    5s] system-webif.c: In function 'tls_make_certificate':
[    5s] system-webif.c:2904:10: error: '_PAPPL_CREDTYPE_RSA_2048' undeclared (first use in this function); did you mean '_PAPPL_CREDTYPE_RSA_2048_SHA256'?
[    5s]  2904 |     case _PAPPL_CREDTYPE_RSA_2048 :
[    5s]       |          ^~~~~~~~~~~~~~~~~~~~~~~~
[    5s]       |          _PAPPL_CREDTYPE_RSA_2048_SHA256

Source grep shows:

$ grep -r CREDTYPE_RSA_2048
pappl/system-webif.c:  _PAPPL_CREDTYPE_RSA_2048_SHA256, // RSA with 2048-bit keys and SHA-256 hash
pappl/system-webif.c:    case _PAPPL_CREDTYPE_RSA_2048_SHA256 :
pappl/system-webif.c:    credtype = _PAPPL_CREDTYPE_RSA_2048_SHA256;
pappl/system-webif.c:    case _PAPPL_CREDTYPE_RSA_2048 :
pappl/system-webif.c:    credtype = _PAPPL_CREDTYPE_RSA_2048_SHA256;
pappl/system-webif.c:    case _PAPPL_CREDTYPE_RSA_2048 :

Conclusion: untested codepath.

System Information:

michaelrsweet commented 1 year ago

Sigh... You try to test every configuration...

[master 5b8875c] Fix builds with GNU TLS (Issue #292)

[v1.3.x 230be85] Fix builds with GNU TLS (Issue #292)

I'll be rolling a 1.3.4 release shortly...