Bug 1429343 - recursion error on ppc64
Summary: recursion error on ppc64
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: imake
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1424242
TreeView+ depends on / blocked
 
Reported: 2017-03-06 07:29 UTC by Dmitrij S. Kryzhevich
Modified: 2017-03-23 02:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-23 02:15:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dmitrij S. Kryzhevich 2017-03-06 07:29:50 UTC
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

Comment 1 Mamoru TASAKA 2017-03-22 15:52:23 UTC
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

Comment 2 Yaakov Selkowitz 2017-03-22 17:31:16 UTC
Looks like imake_defines= in xmkmf would be a good place for -Uvector.

Comment 3 Dmitrij S. Kryzhevich 2017-03-23 02:15:50 UTC
(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!


Note You need to log in before you can comment on or make changes to this bug.