x86_64-apple-darwin16-clang -DHAVE_CONFIG_H -I. -I/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-20170524-source/texk/web2c -I./w2c -I/Users/fabian/Gentoo-10.12/usr/lib -I/Users/fabian/Gentoo-10.12/usr/include/libpng16 -DPOPPLER_VERSION=\"0.55.0\" -I/Users/fabian/Gentoo-10.12/usr/include/poppler -I/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-20170524-source/texk/web2c/libmd5 -DpdfTeX -I/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-20170524-source/texk/web2c/luatexdir -I/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-20170524-source/texk/web2c/luatexdir/unilib -I/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-20170524-source/texk/web2c/luatexdir/luafontloader/fontforge/inc -DLUA_FF_LIB=1 -I/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-20170524-source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge -DSYNCTEX_ENGINE_H='<synctex-luatex.h>' -I/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-20170524-source/texk/web2c/synctexdir -I/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-core-2017_build/libs/lua52/include -DLUA_COMPAT_MODULE -DLUAI_HASHLIMIT=6 -DLUA_USE_POSIX -DLUA_USE_DLOPEN -Wimplicit -Wreturn-type -Wdeclaration-after-statement -Wno-unknown-pragmas -march=native -O2 -pipe -c -o libluatex_a-texlang.o `test -f 'texlang.c' || echo '/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-20170524-source/texk/web2c/'`texlang.c /Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-20170524-source/texk/web2c/luatexdir/image/pdftoepdf.w:74:34: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] snprintf(ck,PDF_CHECKSUM_SIZE,"%"PRIu64"_%"PRIu64,(uint64_t)size,(uint64... ^ /Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-20170524-source/texk/web2c/luatexdir/image/pdftoepdf.w:74:44: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] snprintf(ck,PDF_CHECKSUM_SIZE,"%"PRIu64"_%"PRIu64,(uint64_t)size,(uint64... ^ 2 errors generated. make[5]: *** [Makefile:12944: libluatex_a-pdftoepdf.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[5]: Leaving directory '/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-core-2017_build/texk/web2c' make[4]: *** [Makefile:13394: all-recursive] Error 1 make[4]: Leaving directory '/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-core-2017_build/texk/web2c' make[3]: *** [Makefile:3820: all] Error 2 make[3]: Leaving directory '/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-core-2017_build/texk/web2c' make[2]: *** [Makefile:906: recurse] Error 1 make[2]: Leaving directory '/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-core-2017_build/texk' make[1]: *** [Makefile:486: all-recursive] Error 1 make[1]: Leaving directory '/Users/fabian/Gentoo-10.12/var/tmp/portage/app-text/texlive-core-2017-r1/work/texlive-core-2017_build/texk' make: *** [Makefile:575: all-recursive] Error 1 * ERROR: app-text/texlive-core-2017-r1::gentoo_prefix failed (compile phase): * emake failed I have no idea if it really is that simple as just adding a space. I need to try.
It appears the problem is in a generated file, where the generator on purpose generates very dense code. So fixing it was a bit harder, but I found this to work at the end of src_prepare before elibtoolize: # fix C++11 (according to clang) in condense generated file sed -i -e 's/\<PRIu64\>/\nPRIu64\n/g' \ texk/web2c/luatexdir/image/pdftoepdf.w || die The code generator keeps newlines, so this way the C-compiler sees whitespace between the literal and identifier. @maintainers: what do you think about this fix?
(In reply to Fabian Groffen from comment #1) > It appears the problem is in a generated file, where the generator on > purpose generates very dense code. So fixing it was a bit harder, but I > found this to work at the end of src_prepare before elibtoolize: > > > # fix C++11 (according to clang) in condense generated file > sed -i -e 's/\<PRIu64\>/\nPRIu64\n/g' \ > texk/web2c/luatexdir/image/pdftoepdf.w || die > > > The code generator keeps newlines, so this way the C-compiler sees > whitespace between the literal and identifier. > > @maintainers: what do you think about this fix? I would prefer a patch to include in the tarball Isn't it possible to fix the generator ? I think we should include this quick and dirty patch but it should be reported upstream, because the line in the .w is correct but the postprocessed file is not.
Yes, I believe the generator should be fixed, but I have no knowledge of the build system, so the only quick thing I could do was workaround it ;) I'll add a patch with the effect of the sed-statement. About reporting upstream, do you have a suggestion where? tex-live@tug.org?
(In reply to Fabian Groffen from comment #3) > Yes, I believe the generator should be fixed, but I have no knowledge of the > build system, so the only quick thing I could do was workaround it ;) It probably won't be easy as this generator is used in a lot of places and changing it might have a lot of consequences > I'll add a patch with the effect of the sed-statement. thanks > About reporting upstream, do you have a suggestion where? tex-live@tug.org? yes that's probably the best place I think
Created attachment 477318 [details, diff] c++11 patch
commit be00e932c28e0273052f6c26d586c9e48aee8b8f (HEAD -> master, origin/master, origin/HEAD) Author: Alexis Ballier <aballier@gentoo.org> Date: Tue Jun 20 15:15:07 2017 +0200 app-text/texlive-core: Add patch by Fabian Groffen to fix build with clang, bug #621726 thanks!