News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Building 16-bit executable

Started by 16bitPM, November 12, 2020, 10:44:13 PM

Previous topic - Next topic

16bitPM

I'm trying to cross-build the MS-DOS executable with OpenWatcom-v2 on linux.

I'm getting the following error:

"H/symbols.h(437): Error! E1098: Maximum struct or union size is 64K"

See full output below:

Open Watcom Make Version 2.0 beta Nov  9 2020 00:25:13 (32-bit)
Copyright (c) 2002-2020 The Open Watcom Contributors. All Rights Reserved.
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
H/msgdef.h(386): Warning! W138: No newline at end of file
H/memalloc.h(42): Warning! W140: Definition of macro 'alloca' not identical to previous definition
H/memalloc.h(42): Note! N2002: 'alloca' defined in: /opt/watcom//h/stdlib.h(545)
H/symbols.h(437): Error! E1098: Maximum struct or union size is 64K
H/instruct.h(1237): Warning! W300: Nested comment found in comment started on line 1237
H/macrolib.h(8): Warning! W138: No newline at end of file
H/Colors.h(41): Warning! W138: No newline at end of file
assemble.c(605): Warning! W131: No prototype found for function '__builtin_alloca'
assemble.c(1030): Error! E1031: Name 'iat_used' not found in struct/union asym
assemble.c(1195): Warning! W131: No prototype found for function 'Addx86defs'
assemble.c(1196): Warning! W131: No prototype found for function 'Initx86AutoMacros64'
assemble.c(1206): Warning! W131: No prototype found for function 'AddSimdTypes'
assemble.c(1210): Error! E1011: Symbol 'decoflags' has not been declared
assemble.c(1211): Error! E1011: Symbol 'broadflags' has not been declared
assemble.c(1212): Error! E1011: Symbol 'evexflag' has not been declared
assemble.c(1616): Error! E1031: Name 'frame_auto' not found in struct/union module_info
assemble.c(1616): Error! E1031: Name 'frame_auto' not found in struct/union module_info
assemble.c(1620): Error! E1031: Name 'win64_flags' not found in struct/union module_info
assemble.c(1620): Error! E1031: Name 'win64_flags' not found in struct/union module_info
assemble.c(1625): Error! E1031: Name 'frame_auto' not found in struct/union module_info
assemble.c(1625): Error! E1031: Name 'frame_auto' not found in struct/union module_info
assemble.c(1629): Error! E1031: Name 'win64_flags' not found in struct/union module_info
assemble.c(1629): Error! E1031: Name 'win64_flags' not found in struct/union module_info
assemble.c(605): Warning! W308: The function '__builtin_alloca' without prototyped parameters called
assemble.c(605): Note! N2002: '__builtin_alloca' defined in: assemble.c(605)
H/cpumodel.h(14): Warning! W202: Symbol 'sym_DataSize' has been defined, but not referenced
H/cpumodel.h(13): Warning! W202: Symbol 'sym_CodeSize' has been defined, but not referenced
Error(E42): Last command making (OWDOS16R/assemble.obj) returned a bad status
Error(E02): Make execution terminated



I had to adapt the makefile prior to compilation. The differences are:
(It basically comes down to changing backslashes to slashes and change some directories)

diederikh@Californium:~/SRC/UASM$ diff OWDOS16_.mak OWDOS16.mak
0a1
>
5c6
< name = uasm
---
> name = HJWasm
8c9
< WATCOM = /opt/watcom
---
> WATCOM = \Watcom
20c21
< inc_dirs  = -IH -I$(WATCOM)/H
---
> inc_dirs  = -IH -I$(WATCOM)\H
29c30
< LINK = $(WATCOM)/binl/wlink
---
> LINK = $(WATCOM)\binnt\wlink.exe
52c53
< CC=$(WATCOM)/binl/wcc -q -0 -w3 -zc -ml -bc -bt=dos $(inc_dirs) $(extra_c_flags) -fo$@ -DFASTMEM=0 -DFASTPASS=0 -DCOFF_SUPPORT=0 -DELF_SUPPORT=0 -DAMD64_SUPPORT=0 -DSSSE3SUPP=0 -DSSE4SUPP=0 -DOWFC_SUPPORT=0 -DDLLIMPORT=0 -DAVXSUPP=0 -DPE_SUPPORT=0 -DVMXSUPP=0 -DSVMSUPP=0 -DCVOSUPP=0 -DCOMDATSUPP=0 -DSTACKBASESUPP=0 -zt=12000
---
> CC=$(WATCOM)\binnt\wcc -q -0 -w3 -zc -ml -bc -bt=dos $(inc_dirs) $(extra_c_flags) -fo$@ -DFASTMEM=0 -DFASTPASS=0 -DCOFF_SUPPORT=0 -DELF_SUPPORT=0 -DAMD64_SUPPORT=0 -DSSSE3SUPP=0 -DSSE4SUPP=0 -DOWFC_SUPPORT=0 -DDLLIMPORT=0 -DAVXSUPP=0 -DPE_SUPPORT=0 -DVMXSUPP=0 -DSVMSUPP=0 -DCVOSUPP=0 -DCOMDATSUPP=0 -DSTACKBASESUPP=0 -zt=12000
70c71
<       @set LIB=$(WATCOM)/lib286;$(WATCOM)/lib286/DOS
---
>       @set LIB=$(WATCOM)\Lib286;$(WATCOM)\Lib286\DOS
87,89c88,90
<       @if exist $(OUTD)/*.obj        erase $(OUTD)/*.obj
<       @if exist $(OUTD)/$(name)r.exe erase $(OUTD)/$(name)r.exe
<       @if exist $(OUTD)/$(name)r.map erase $(OUTD)/$(name)r.map
---
>       @if exist $(OUTD)\*.obj        erase $(OUTD)\*.obj
>       @if exist $(OUTD)\$(name)r.exe erase $(OUTD)\$(name)r.exe
>       @if exist $(OUTD)\$(name)r.map erase $(OUTD)\$(name)r.map


Or is the DOS 16-bit target (former JWASMR) some leftover legacy stuff that needs removing?

~D~