This appears to be Bug 383447 but in prefix. I have one prefix where I do not observe the failure and one where I do. Odd? The failure presents as: ./sobin/gsc ./sobin/gsx make[2]: Entering directory '/local/gentoo-redlizard/var/tmp/portage/app-text/ghostscript-gpl-9.10/work/ghostscript-9.10' rm -f ./sobin/libgs.so.9 ln -s libgs.so.9.10 ./sobin/libgs.so.9 rm -f ./sobin/libgs.so ln -s libgs.so.9.10 ./sobin/libgs.so x86_64-pc-linux-gnu-gcc -DHAVE_MKSTEMP -DHAVE_FILE64 -DHAVE_FSEEKO -DHAVE_MKSTEMP64 -DHAVE_FONTCONFIG -DHAVE_SETLOCALE -DHAVE_SSE2 -DHAVE_DBUS -DHAVE_BSWAP32 -DHAVE_BYTESWAP_H -DHAVE_STRERROR -fPIC -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -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 -DGX_COLOR_INDEX_TYPE="unsigned long int" -march=native -O2 -pipe -DUSE_LIBPAPER -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/local/gentoo-redlizard/usr/lib/ghostscript/9.10\" -I./soobj -I./base -I./devices -DWHICH_CMS="lcms2" -o ./sobin/gsc ./psi/dxmainc.c \ -Wl,-O1 -Wl,--as-needed -L/local/gentoo-redlizard/usr/lib -L./sobin -lgs x86_64-pc-linux-gnu-gcc -DHAVE_MKSTEMP -DHAVE_FILE64 -DHAVE_FSEEKO -DHAVE_MKSTEMP64 -DHAVE_FONTCONFIG -DHAVE_SETLOCALE -DHAVE_SSE2 -DHAVE_DBUS -DHAVE_BSWAP32 -DHAVE_BYTESWAP_H -DHAVE_STRERROR -fPIC -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -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 -DGX_COLOR_INDEX_TYPE="unsigned long int" -march=native -O2 -pipe -DUSE_LIBPAPER -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/local/gentoo-redlizard/usr/lib/ghostscript/9.10\" -I./soobj -I./base -I./devices -DWHICH_CMS="lcms2" -pthread -I/local/gentoo-redlizard/usr/include/gtk-2.0 -I/local/gentoo-redlizard/usr/lib/gtk-2.0/include -I/local/gentoo-redlizard/usr/include/pango-1.0 -I/local/gentoo-redlizard/usr/include/atk-1.0 -I/local/gentoo-redlizard/usr/include/cairo -I/local/gentoo-redlizard/usr/include/pixman-1 -I/local/gentoo-redlizard/usr/include/gdk-pixbuf-2.0 -I/local/gentoo-redlizard/usr/include/libpng16 -I/local/gentoo-redlizard/usr/include/pango-1.0 -I/local/gentoo-redlizard/usr/include/harfbuzz -I/local/gentoo-redlizard/usr/include/pango-1.0 -I/local/gentoo-redlizard/usr/include/glib-2.0 -I/local/gentoo-redlizard/usr/lib/glib-2.0/include -I/local/gentoo-redlizard/usr/include/freetype2 -o ./sobin/gsx ./psi/dxmain.c \ -Wl,-O1 -Wl,--as-needed -L/local/gentoo-redlizard/usr/lib -L./sobin -lgs -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype In file included from /local/gentoo-redlizard/usr/include/gtk-2.0/gtk/gtk.h:234:0, from ./psi/dxmain.c:35: /local/gentoo-redlizard/usr/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes] ./psi/dxmain.c: In function ‘main’: ./psi/dxmain.c:1163:5: warning: implicit declaration of function ‘gs_sprintf’ [-Wimplicit-function-declaration] /local/gentoo-redlizard/var/tmp/portage/app-text/ghostscript-gpl-9.10/temp/ccluo4XT.o: In function `main': dxmain.c:(.text.startup+0x4a): undefined reference to `gs_sprintf' collect2: error: ld returned 1 exit status base/unix-dll.mak:105: recipe for target 'sobin/gsx' failed make[2]: *** [sobin/gsx] Error 1 make[2]: Leaving directory '/local/gentoo-redlizard/var/tmp/portage/app-text/ghostscript-gpl-9.10/work/ghostscript-9.10' base/unix-dll.mak:140: recipe for target 'so-subtarget' failed make[1]: *** [so-subtarget] Error 2 make[1]: Leaving directory '/local/gentoo-redlizard/var/tmp/portage/app-text/ghostscript-gpl-9.10/work/ghostscript-9.10' base/unix-dll.mak:127: recipe for target 'so' failed make: *** [so] Error 2 The fix proposed in Bug 383447 fixes things here, even in the prefix where there is no failure. The fix is apparently in ghostscript-gpl-9.10-r3. This is all somewhat curious since Bug 383447 was originally noted for ghostscript-gpl-9.05 and ghostscript-gpl-9.10 is the first version for which I've seen the failure. This is perhaps a corner case in prefix since many will not be building ghostscript with USE="X gtk". I have no problem building the subject ghostscript(s) with USE="-X gtk" or USE="X -gtk".
Still an issue?
My normal use is with USE="-X -gtk" and ghostscrit-gpl-9.53.3-r2 does build this way. However building app-text/ghostscript-gpl-9.53.3-r2 with USE="X gtk" fails because dev-lang/rust-1.48.0 fails to build error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.48.0/work/rustc-1.48.0-src/build/bootstrap/debug/deps/libproc_macro_error_attr-efb8effa561c9e33.so) --> /storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.48.0/work/rustc-1.48.0-src/vendor/proc-macro-error/src/lib.rs:284:9 | 284 | pub use proc_macro_error_attr::proc_macro_error; | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error error: could not compile `proc-macro-error`. Perhaps looking for glibc on the host instead of in Prefix.