PCChttp://pcc.ludd.ltu.se/jira
This file is an XML representation of an issueen-uk3.13.133323-10-2008Enterprise[PCC-389] pcc fails to compile ksh93 (ast-ksh.2012-02-29)http://pcc.ludd.ltu.se/jira/browse/PCC-389
pcc fails to compile ksh93 (ast-ksh.2012-02-29)
<br/>
<br/>
Steps to reproduce:
<br/>
1. Fetch ksh93 sources
<br/>
wget --http-user=&quot;I accept <a href="http://www.opensource.org/licenses/eclipse">www.opensource.org/licenses/eclipse</a>&quot; --http-passwd=&quot;.&quot; '<a href="http://www2.research.att.com/~gsf/download/tgz/ast-ksh.2012-02-29.tgz">http://www2.research.att.com/~gsf/download/tgz/ast-ksh.2012-02-29.tgz</a>'
<br/>
wget --http-user=&quot;I accept <a href="http://www.opensource.org/licenses/eclipse">www.opensource.org/licenses/eclipse</a>&quot; --http-passwd=&quot;.&quot; '<a href="http://www2.research.att.com/~gsf/download/tgz/INIT.2012-02-29.tgz">http://www2.research.att.com/~gsf/download/tgz/INIT.2012-02-29.tgz</a>'
<br/>
2. Unpack
<br/>
3. Compile code with:
<br/>
$ (CC='/usr/bin/pcc -D__NO_INLINE__=1' ./bin/package make) 2&gt;&amp;1 | tee -a buildlog.log
<br/>
(-D__NO_INLINE__=1' is set to avoid trouble with gcc-specific math inlines on Linux)
<br/>
<br/>
Result:
<br/>
Several failures, with errors like these ones:
<br/>
/home/test001/work/ast_ksh_20120229/build_pcc/src/cmd/ksh93/sh/arith.c:150: error: out of macro space!
<br/>
/home/test001/work/ast_ksh_20120229/build_pcc/src/cmd/ksh93/edit/completion.c:128: error: Too much defining
<br/>
<br/>
I attached &quot;buildlog.log&quot; ... search for &quot;exit code&quot; to find locations where the errors occured.
<br/>
<br/>
Suse Linux 12.1/AMD64PCC-389pcc fails to compile ksh93 (ast-ksh.2012-02-29)BugCriticalResolvedFixedAnders MagnussonRoland MainzWed, 4 Apr 2012 20:59:28 +0200 (CEST)Sun, 29 Jul 2012 19:46:59 +0200 (CEST)C preprocessor2Which pcc version are you using? I'm asking because the math-specific stuff that I assume failed for you (the use of : for designated initializers) were added to pcc long time ago.The pcc version is:
<br/>
$ pcc --version
<br/>
pcc 1.0.0.RELEASE 20110221 for x86_64-suse-linux-gnu
<br/>
<br/>
Based on the date I assume this is... old (if &quot;yes&quot; the blame is likely on SuSE's side... ;-/ ) ?&gt; math-specific stuff that I assume failed for you
<br/>
<br/>
Erm... AFAIK the math-specific stuff isn't failing for me... I worked around that trouble with -D__NO_INLINE__=1 ... the problem are the errors which look like compiler-internal issues, e.g. &quot;sh/arith.c:150: error: out of macro space! &quot;, &quot;edit/completion.c:128: error: Too much defining&quot; etc.
<br/>
<br/>
Can you just try to follow the &quot;Steps to reproduce&quot; on your side on Linux and see where/if the AST/ksh93 build is failing for you ?Yes, I tried it and cpp did run out of macro space for me also. I assume that it triggers some memory leak code path in cpp.
<br/>
I'll see if I have time to look at it now in the easter weekend.Is there a way to use an alternative &quot;cpp&quot; (BTW: Which &quot;cpp&quot; is used ? Does &quot;pcc&quot; supply one ?) ?pcc uses its own cpp, which is basically the cpp that has been around ~forever.
<br/>
I have a pretty good idea about what is failing, but unfortunately I got a really bad cold and has been into bed most of easter weekend, hence no pcc hacking :-/
<br/>
You could try to use gcc with the -E flag and give the output to a .i file, and then compile the .i file with pcc. It might work.Any news on the issue ?cpp bails on
<br/>
<br/>
#define i1(w) i2(w)
<br/>
#define i2(x) i1(x)
<br/>
i1(c)
<br/>
<br/>
which it shouldn't. Need to find out why.Is there an easy workaround? Does using the HEAD of pcc-dev fix this?
<br/>
Unfortunately no, I just haven't had time to work with it. Fixed now. I compiled ksh93 based on the instructions given and it at least did start.How can I checkout&amp;&amp;build pcc to verify the fix ?