1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Movable Type 5.2.3" />
8 <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9 <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10 <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml" />
12 <title>Status for Andrew DeFaria: Building CDK on Windows</title>
14 <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15 <link rel="prev" href="http://defaria.com/blogs/Status/archives/000378.html" title="Built LOS178 2.1.0 TOB" />
16 <link rel="next" href="http://defaria.com/blogs/Status/archives/000380.html" title="Test build of LOS178 2.1.0" />
22 <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
24 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
26 <div id="container-inner" class="pkg">
29 <div id="banner-inner" class="pkg">
30 <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
31 <h2 id="banner-description">Searchable status reports and work log</h2>
36 <div id="pagebody-inner" class="pkg">
38 <div id="alpha-inner" class="pkg">
40 <p class="content-nav">
41 <a href="http://defaria.com/blogs/Status/archives/000378.html">« Built LOS178 2.1.0 TOB</a> |
42 <a href="http://defaria.com/blogs/Status/">Main</a>
43 | <a href="http://defaria.com/blogs/Status/archives/000380.html">Test build of LOS178 2.1.0 »</a>
47 <div class="entry" id="entry-379">
48 <h3 class="entry-header">Building CDK on Windows</h3>
49 <div class="entry-content">
50 <div class="entry-body">
52 <li>Investigated bug on Windows nmake of CDK</li>
54 <li>Fixed build_los178 to properly build LOS178 2.1</li>
57 <div id="more" class="entry-more">
58 <h3>Windows nmake bug for CDK build</h3>
60 <p>There is still something wrong. Here's what I did:</p>
63 <li>Obtained the following tarballs from the 20050628 archive:
65 <li>2000-00.los178_rsc_src.tar.gz</li>
67 <li>2001-00.los178_src.tar.gz</li>
69 <li>2013-00.los178_dev.tar.gz</li>
71 <li>2015-00.los178_rsc_dev.tar.gz</li>
73 <li>Unpacked those tarballs + ppc.cdkwin32.tar.gz into /tmp/los178</li>
75 <li>Setup my environment properly (this includes VCVARS32.bat)</li>
77 <li>cd'ed to src/cdk and performed make install > install.log 2>&1</li>
80 <p>I still have the error:</p>
82 <div class="code"><pre>
84 coff.c(87) : fatal error C1083: Cannot open include file: 'family/ppc/arch_mem.h': No such file or directory
85 NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
87 make[1]: *** [WIN32_VS_UTIL] Error 2
90 <p>It seems clear to me that the compiler cannot locate the include file family/ppc/arch_mem.h which does reside under $ENV_PREFIX/sys/include. Additionally it's clear that common/mkimage/Makefile was changed to append "-I$(ENV_PREFIX)/sys/include" to SPECIAL_CFLAGS to resolve this issue. However something on Windows (and Windows nmake) is causing this to remain a problem.</p>
92 <p>It seems that nmake eventually issues the following command to compile coff.c -> coff.o:</p>
94 <div class="code"><pre>
95 cl.exe /nologo /ML /W3 /GX /D "_WIN32_VS" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /FD /c -c coff.c -D__powerpc__ /Fo"coff.o"
98 <p>Which, of course, doesn't seem to mention $ENV_PREFIX/sys/include at all. IOW the above results in:</p>
100 <div class="code"><pre>
101 cl.exe /nologo /ML /W3 /GX /D "_WIN32_VS" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /FD /c -c coff.c -D__powerpc__ /Fo"coff.o"
103 coff.c(87) : fatal error C1083: Cannot open include file: 'family/ppc/arch_mem.h': No such file or directory
106 <p>While the following results in a successful compilation (with warnings):</p>
108 <div class="code"><pre>
109 cl.exe /nologo /ML /W3 /GX /D "_WIN32_VS" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /FD /c -c coff.c -D__powerpc__ /Fo"coff.o" /I$ENV_PREFIX/sys/include
112 <p>The Makefile and Windows nmake are not arranging for SPECIAL_CFLAGS to be passed along to the compiler.</p>
114 <h3>Fix to build_los178</h3>
116 <p>The build_los178 script was having a problem building LOS178. It would fail in different ways than when done from the command line. I suspected the problem would be in the setup_bash function as it attempts to reproduce what a ". SETUP.bash" does inside the Perl environment. Turns out I was right. Changed that subroutine to properly set HOST_OS_REVISION (previously it had an extra carriage return from `uname -r`) and to add /usr/ucb to the PATH.</p>
119 <p class="entry-footer">
120 <span class="post-footers">Posted by on June 30, 2005 10:21 AM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000379.html">Permalink</a>