Building CDK under Windows

  • Build Windows version of the CDK
  • Submitted CR 659: cdk tool mkimage fails to build under Windows

Building Windows CDK

In order to build the CDK under Windows one must use an ancient version of Cygwin - B20 (it is assumed that that is already installed). Additionally one must perform certain actions in a certain order:

  1. Obtain the latest versions of the following tar images from the archive area:
    • 2000-00.los178_rsc_src.tar.gz
    • 2001-00.los178_src.tar.gz
    • 2013-00.los178_dev.tar.gz
    • 2015-00.los178_rsc_dev.tar.gz
    • (From cvs bin-image) ppc.cdkwin32.tar.gz
  2. Create an area to do the build and extract the above into that area
  3. Exit this bash shell
  4. Start a cmd shell
  5. Execute the VCVARS32.BAT file. This is normally found in C:\Program Files\Microsoft Visual Studio\VS98\Bin. Note that this implies that Visual Studio is also installed. Also, often people will copy this bat file to C:\ for easier execution. This bat file sets certain environment variables including PATH such that nmake can be found. Under Windows we lean on VS's nmake. Also, this must be done from a cmd shell before starting Cygwin so that the changes to the environment can be picked up. Why don't we just make a script or enhance SETUP.bash to take into account for this?
  6. Start Cygwin using the appropriate cygnus.bat file. This was given to me by Moscow. Doesn't seem to do that much fancy stuff:
    @ECHO OFF
    SET TARGET_PATH=C:\LynuxWorks\2.0.0
    SET MAKE_MODE=UNIX
    SET TERM=cygwin
    SET HOME=/
    
    set PATH=%TARGET_PATH%\bin;%TARGET_PATH%\usr\bin:%PATH%
    
    echo "TARGET_PATH is %TARGET_PATH%
    
    if not exist %TARGET_PATH%\bin\sh.exe goto error_no_sh
    
    ver > %TARGET_PATH%\_tmp
    goto the_end
    
    :error_no_sh
    echo "Installation Error -- no %TARGET_PATH%\bin\sh.exe found"
    
    :the_end
    del %TARGET_PATH%\_tmp
    bash
    
  7. cd to the directory that you created to perform the build
  8. Source SETUP.bash
  9. cd to src/cdk
  10. make install > install.log 2>&1
  11. Check install.log for errors

CR 659: cdk tool mkimage fails to build under Windows

Build of cdk tool mkimage files under Windows. This is a make install in src/cdk of LOS178. The specific error is:

Compiling coff.o
coff.c
coff.c(91) : fatal error C1083: Cannot open include file: 'family/ppc/arch_mem.h': No such file or directory
NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
Stop.
make[1]: *** [WIN32_VS_UTIL] Error 2 

Problem seems to be that the fix for src/cdk/common/mkimage/Makefile in CR #539 of adding -I$(ENV_PREFIX)/sys/include does not work under Windows with nmake.