Description of problem: During imake run on ppc64 platform I get recursion error: xmkmf imake -DUseInstalled -I/usr/share/X11/config In file included from /usr/share/X11/config/Imake.tmpl:2194:0, from Imakefile.c:34: /tmp/IIf.MUVTV5:301:0: error: detected recursion whilst expanding macro "vector" multiple.h multiple.c vector.h vector.c \ /tmp/IIf.MUVTV5:301:0: error: detected recursion whilst expanding macro "vector" /tmp/IIf.MUVTV5:309:0: error: detected recursion whilst expanding macro "vector" multiple.o vector.o wbrotate.o langsel_unix.o maps.o $(GUIOBJ) Version-Release number of selected component (if applicable): 1.0.7-7.fc26 How reproducible: Foto rasmol sources, run it as above. Additional info: Works fine on x86_64/arm. Reference build: https://koji.fedoraproject.org/koji/taskinfo?taskID=18212511
This is related to: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/PANPXK43S24TMUGLZ667NPAGNTZKMC6L/ So the keyword "vector" or so is somewhat special with GCC on ppc64{,le}. Usually you have to use "gcc -std=gnu11" or so or explicitly use "#undef vector" when this issue occurs on ppc64. Unfortunately, for this case, xmkmf -> imake calls "cpp" internally with some option, so you have to modify either compiler flags being passed to cpp, or change _some_ code (perhaps template file used by imake) to explicitly undef vector... but imake internal looks a bit complicated. For now the following seems to work: @@ -102,7 +102,8 @@ pushd src # GTK version ./rasmol_build_options.sh --pixeldepth=32 --use_gtk -xmkmf +#xmkmf +imake -DUseInstalled -Uvector -I%{_datadir}/X11/config # mistake in sources packaging unlink rasmol.man @@ -115,7 +116,8 @@ make distclean # Xlib version ./rasmol_build_options.sh --pixeldepth=32 --use_xformslib -xmkmf +#xmkmf +imake -DUseInstalled -Uvector -I%{_datadir}/X11/config make %{?_smp_mflags} CCOPTIONS="%{optflags}" EXTRA_LIBRARIES="%__global_ldflags" popd ``` https://koji.fedoraproject.org/koji/taskinfo?taskID=18524225
Looks like imake_defines= in xmkmf would be a good place for -Uvector.
(In reply to Mamoru TASAKA from comment #1) > For now the following seems to work: Thanks. Didn't guess to look into xmkmf. (In reply to Yaakov Selkowitz from comment #2) > Looks like imake_defines= in xmkmf would be a good place for -Uvector. No way to place it there. Only '-D' args parse and they placed as is, with '-D'. Option named "-DUvector" is not what I need here. Anyway, this script do nothing but generate command posted in #1. I believe I could run it manually as suggested. Thanks for help!