#20265 closed defect (fixed)
ghostscript-10.03.1 FTBFS with GCC 14
Reported by: | Douglas R. Reno | Owned by: | Douglas R. Reno |
---|---|---|---|
Priority: | normal | Milestone: | 12.2 |
Component: | BOOK | Version: | git |
Severity: | normal | Keywords: | |
Cc: |
Description ¶
While building through the printing stack, I've encountered an issue with Ghostscript. It seems to be due to GCC 14:
gcc -DHAVE_MKSTEMP -DHAVE_FILE64 -DHAVE_FSEEKO -DHAVE_MKSTEMP64 -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_SSE2 -DHAVE_DBUS -DHAVE_BSWAP32 -DHAVE_BYTESWAP_H -DHAVE_STRERROR -DHAVE_ISNAN -DHAVE_ISINF -DHAVE_PREAD_PWRITE=1 -DGS_RECURSIVE_MUTEXATTR=PTHREAD_MUTEX_RECURSIVE -O2 -DNDEBUG -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -fno-strict-aliasing -Werror=declaration-after-statement -fno-builtin -fno-common -Werror=return-type -Wno-unused-local-typedefs -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_LIBDL=1 -DGX_COLOR_INDEX_TYPE="unsigned long long" -DUSE_UNIX98=1 -DHAVE_SNPRINTF -DBUILD_PDF=1 -I./pdf -DHAVE_RESTRICT=1 -DUSE_LIBPAPER -I/usr/include/webp -fno-strict-aliasing -DHAVE_POPEN_PROTO=1 -DSHARE_JPX=1 -I/usr/include/openjpeg-2.5 -DUSE_OPENJPEG_JP2 -DPDF_INCLUDED -I./pdf -I./obj -I./pcl/pl -I./base -Isrc/lib -I./jpegxr -Isrc -Isrc/src/lib/openjp2 -I./jbig2dec -c ./pdf/pdf_sec.c -o ./obj/pdf_sec.o
./pdf/pdf_sec.c: In function ‘apply_sasl’:
./pdf/pdf_sec.c:186:25: error: assignment to ‘char \*\*’ from incompatible pointer type ‘char \*’ [-Wincompatible-pointer-types]
186 | NewPassword = Password;
|
./pdf/pdf_sec.c:187:20: error: assignment to ‘int \*’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
187 | NewLen = Len;
|
make: * [pdf/pdf.mak:169: obj/pdf_sec.o] Error 1
This can be fixed by the following sed:
sed -e '186 s/NewPassword =/*NewPassword =/' \ -e '187 s/NewLen =/*NewLen =/' \ -i pdf/pdf_sec.c
The '\' in the char types above were added so that Trac showed them instead of hiding them.
Change History (5)
comment:1 by , 8 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 8 months ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
follow-up: 5 comment:3 by , 8 months ago
Interesting. I got warnings from that file, but no errors. I assume something in your dependencies is pulling in Cyrus SASL ? (I only build that on servers, and they do not have ghostscript).
Maybe you have installed one or more of gtk-vnc, openldap, php or qemu ? My logs for ghostscript-10.03.1 with gcc-14.1 do not mention sasl and I assume it is not frequently built with sasl already installed (fedora appear not to have sasl as a dep, Arch use a CFLAGS override for gcc14 which might not be related). Or maybe I'm mistaken and 'sasl' is not Cyrus SASL.
Not important, your sed will be good enough - just curious why you hit this.
comment:4 by , 8 months ago
I now see it is also an optional dep for Samba, I'm fairly sure you install that.
comment:5 by , 8 months ago
Replying to ken@…:
Interesting. I got warnings from that file, but no errors. I assume something in your dependencies is pulling in Cyrus SASL ?
No, it's libidn.
#ifdef HAVE_LIBIDN # include <stringprep.h> static int apply_sasl(pdf_context *ctx, char *Password, int Len, char **NewPassword, int *NewLen) { byte *buffer; uint buffer_size; Stringprep_rc err; ... ...
Fixed at 620f1e2bb707c19ec43cb7e102de4782ccbd65e7