Skip to main content

Issue building Mustang on Windows XP using MKS

6 replies [Last post]
andyjnsn2
Offline
Joined: 2006-10-02
Points: 0

I am using MKS 8.7p3, JDK-1.5.0_08 and MSVS .NET 2003.

Everything seems to be building OK until it tries to build one of the many java.c files, or any of the files
where JAVA_ARGS is set in the Makefile. I get errors like this while doing the gnumake:
c:/Progra~1/micros~2.net/Vc7/bin/cl -O1 -Zi -nologo -MD /D _STATIC_CPPLIB -FdC:/jdk-6/src/control/build/WINDOW~1/tmp/sun/sun.tools.security/ktab/obj/ -FeC:/jdk-6/src/control/build/WINDOW~1/tmp/sun/sun.tools.security/ktab/obj/ -FmC:/jdk-6/src/control/build/WINDOW~1/tmp/sun/sun.tools.security/ktab/obj/ -W3 -DWIN32 -DIAL -D_LITTLE_ENDIAN -DWIN32 -D_X86_ -Dx86 -DWIN32_LEAN_AND_MEAN -I. -IC:/jdk-6/src/control/build/WINDOW~1/tmp/sun/sun.tools.security/ktab/CClassHeaders -I../../../../src/windows/javavm/export -I../../../../src/share/javavm/export -I../../../../src/share/javavm/include -I../../../../src/windows/javavm/include -I../../../../src/share/bin -I../../../../src/windows/bin -I../../../../src/share/native/java/util/zip/zlib-1.1.3 -DJAVA_ARGS="{ \"-J-ms8m\", \"sun.security.krb5.internal.tools.Ktab\" }" -DVERSION="1.6.0-internal" -DPROGNAME='"ktab"' -c -FoC:/jdk-6/src/control/build/WINDOW~1/tmp/sun/sun.tools.security/ktab/obj/ktab.obj -DRELEASE='"1.6.0-internal"' -DFULL_VERSION="\"1.6.0-internal-ajohnson_04_oct_2006_11_43-b00\"" -DJDK_MAJOR_VERSION='"1"' -DJDK_MINOR_VERSION='"6"' ../../../../src/share/bin/java.c
java.c
../../../../src\share\bin\java.c(1027) : error C2017: illegal escape sequence
../../../../src\share\bin\java.c(1027) : error C2440: 'function' : cannot convert from 'double' to 'char *'
../../../../src\share\bin\java.c(1027) : warning C4024: 'JLI_AcceptableRelease': different types for formal and actual parameter 1
../../../../src\share\bin\java.c(1027) : error C2143: syntax error : missing ')' before 'constant'
../../../../src\share\bin\java.c(1027) : error C2198: 'JLI_AcceptableRelease' :too few arguments for call through pointer-to-function
../../../../src\share\bin\java.c(1027) : error C2017: illegal escape sequence
../../../../src\share\bin\java.c(1027) : error C2017: illegal escape sequence
../../../../src\share\bin\java.c(1051) : error C2059: syntax error : 'if'
../../../../src\share\bin\java.c(1053) : error C2059: syntax error : 'type'
../../../../src\share\bin\java.c(1054) : error C2371: 'ExecJRE' : redefinition;different basic types
../../../../src\windows\bin\java_md.h(50) : see declaration of 'ExecJRE'

../../../../src\share\bin\java.c(1055) : error C2371: 'JLI_FreeManifest' : redefinition; different basic types
c:\jdk-6\src\j2se\src\share\bin\manifest_info.h(134) : see declaration of 'JLI_FreeManifest'
../../../../src\share\bin\java.c(1056) : error C2371: 'JLI_MemFree' : redefinition; different basic types
c:\jdk-6\src\j2se\src\share\bin\jli_util.h(16) : see declaration of 'JLI_MemFree'
../../../../src\share\bin\java.c(1057) : error C2059: syntax error : 'return'
../../../../src\share\bin\java.c(1058) : error C2059: syntax error : '}'
../../../../src\share\bin\java.c(1110) : error C2017: illegal escape sequence
../../../../src\share\bin\java.c(1110) : error C2017: illegal escape sequence
../../../../src\share\bin\java.c(1110) : error C2017: illegal escape sequence
../../../../src\share\bin\java.c(1389) : error C2017: illegal escape sequence
../../../../src\share\bin\java.c(1389) : error C2065: 'J' : undeclared identifier
../../../../src\share\bin\java.c(1389) : error C2017: illegal escape sequence
../../../../src\share\bin\java.c(1389) : error C2065: 'ms8m' : undeclared identifier
../../../../src\share\bin\java.c(1389) : error C2099: initializer is not a constant
../../../../src\share\bin\java.c(1389) : error C2017: illegal escape sequence
../../../../src\share\bin\java.c(1389) : error C2065: 'sun' : undeclared identifier
../../../../src\share\bin\java.c(1389) : error C2224: left of '.security' must have struct/union type
../../../../src\share\bin\java.c(1389) : error C2017: illegal escape sequence
gnumake[5]: *** [C:/jdk-6/src/control/build/WINDOW~1/tmp/sun/sun.tools.security/ktab/obj/ktab.obj] Error 2
gnumake[5]: Leaving directory `C:/jdk-6/src/j2se/make/sun/security/ktab'

If I capture the command line invoking "cl" and paste it into a command window whose current directory is the same as the one reported in the "Leaving directory" message, the command completes successfully. Is this a known problem and, if so, is there a known solution?

-AndyJ

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kellyohair
Offline
Joined: 2004-09-03
Points: 0

I have never seen this kind of failure before.
Where did you get the gnumake program?

This looks like either a shell quote problem in MKS (but seems unlikely) or a problem with gnumake passing the compile line to the compiler.

On Windows I have seen unexplained failures when the root of the source tree is a pathname that exceeds 50 characters, but that seems ok here.

The java.c compile may be the first one to get all the version -D options, that contain escaped quotes like in the -DFULL_VERSION setting.

-kto

andyjnsn2
Offline
Joined: 2006-10-02
Points: 0

I am using make-3.81, downloaded from http://ftp.gnu.org/pub/gnu/make/
and built under MKS. You are correct that it
appears that it isn't properly handling the
quoted string arguments (strings surrounded
with '"..."' get "numeric constant too large"
messages, indicating that the outer level
quotes aren't being stripped).

I saw a recent posting indicating that builds
under cygwin using 3.81 had problems. I will
try using 3.78+ and see if that has any impact.

BTW, the build will also fail in strange ways
if I try to build under MKS-9.0.

-AndyJ

kellyohair
Offline
Joined: 2004-09-03
Points: 0

I don't think this is an issue with MKS. The 3.81 version of GNU make could very well be the problem. Although I don't see how the issue of not accepting C: style paths with 3.81 on Cygwin makes any sense here. With MKS I think you have to accept the C: paths, how else would you specify a full path? Maybe they made the default no C: paths in 3.81, which completely breaks it with MKS?

Trying GNU make 3.78+ is a good idea.

-kto

andyjnsn2
Offline
Joined: 2006-10-02
Points: 0

The problem was indeed make-3.81. I went back to make-3.79.1 and the build worked just fine. I first tried make-3.80, but it wouldn't build (I found out later that the 3.80 Makefile doesn't include hash.o in the list of object files for the win32 build).

I had some problems building with MKS-9.0, but those might also have been related to the make-3.81 issue. I will have to try it again.

-AndyJ

kellyohair
Offline
Joined: 2004-09-03
Points: 0

Well... you know it's bad when you do a search for a problem and find your own posting. :^(

jdk7 will be changing to use gmake 3.81 by default, and I ran smack into this problem. Currently I'm changing all -D defines for strings to look like -Dname='"value"'
single quotes around double quotes, this should work, make does not restrict the use of $ variable expansion inside single quotes like the shells. The jdk7 (and jdk6) makefiles had special case logic for Windows, it was using -Dname="\"value\"" instead of single quotes. So my change will make it all consistent on all platforms, hopefully.

-kto

kellyohair
Offline
Joined: 2004-09-03
Points: 0

An update. This issue is somehow related to the shell used. The README.W32 document in the GNU Make 3.81 refers to a BATCH_MODE_ONLY_SHELL option that deals with this, but it's the combination of GNU make 3.81 and the MKS shell, ether bash.exe or sh.exe.
A small Makefile can be used to demonstrate the problem by echoing out "\"$(X)\"" and '"$(X)"' where X=a b c. With CYGWIN and most Unix systems they are the same, but with GNU make 3.81 and MKS shells, the first ones comes out as \a b c \\.

Bottom line... use single quotes around double quotes and don't escape the double quotes. :^(

-kto