open-watcom / open-watcom-v2

Open Watcom V2.0 - Source code repository, Wiki, Latest Binary build, Archived builds including all installers for download.
Other
980 stars 159 forks source link

building open watcom 2.0 in gnu/linux #196

Closed sparky4 closed 9 years ago

sparky4 commented 9 years ago

[09:56:26][~/p/watcom2] [sparky4@lappy4]$ ./build.sh ./build.sh: 51: ./build.sh: builder: Permission denied builder bootstrap build error

DANG!!

ArmstrongJ commented 9 years ago

Have you already configured and executed "setvars.sh" in the current shell? Simply running "./build.sh" will indeed fail. Some environment variables are necessary first. Additionally, make sure that the "setvars.sh" script is executed in the current shell context:

source ./setvars.sh

Again, though, you'll need to edit the file first.

sparky4 commented 9 years ago

http://4ch.mooo.com/4/setvars.sh i did~

ArmstrongJ commented 9 years ago

I can see right away that you haven't actually configured the "setvars.sh" script to use GCC at all. The variable OWTOOLS should be set to GCC.

OWTOOLS=GCC
sparky4 commented 9 years ago

OH!! lol silly me~

sparky4 commented 9 years ago

WHOA IT'S WORKING ^^ yay thank you!

sparky4 commented 9 years ago

[13:24:11][/dos/z/16] [sparky4@lappy4]$ wmake Open Watcom Make Version 2.0 beta Sep 14 2015 12:56:47 (64-bit) Copyright (c) 2002-2015 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. wcl -mc -lr -l=dos -wo -x -obmiler -out -oh -ei -zp8 -0 -fpi87 -onac -ol+ -ok -DTARGET_MSDOS=16 -DMSDOS=1 -sg -st -of+ -k32768 -zu -zdf -zff -zgf -zk0 -zq -zc -zp8 -c src/16.c src/lib/16_head.h(33): Error! E1055: Unable to open 'dos.h' src/lib/16_head.h(34): Error! E1055: Unable to open 'stdio.h' src/lib/16_head.h(35): Error! E1055: Unable to open 'stdlib.h' src/lib/16_head.h(36): Error! E1055: Unable to open 'conio.h' src/lib/16_head.h(37): Error! E1055: Unable to open 'time.h' src/lib/16_head.h(38): Error! E1055: Unable to open 'malloc.h' src/lib/16_head.h(39): Error! E1055: Unable to open 'ctype.h' src/lib/16_head.h(40): Error! E1055: Unable to open 'fcntl.h' src/lib/16_head.h(41): Error! E1055: Unable to open 'io.h' src/lib/16_head.h(42): Error! E1055: Unable to open 'sys/stat.h' src/lib/16_head.h(43): Error! E1055: Unable to open 'mem.h' src/lib/16_head.h(44): Error! E1055: Unable to open 'string.h' src/lib/16_head.h(46): Error! E1055: Unable to open 'i86.h' src/lib/16_head.h(47): Error! E1055: Unable to open 'unistd.h' src/lib/16_head.h(48): Error! E1055: Unable to open 'alloca.h' src/lib/nyan/kitten.h(27): Error! E1055: Unable to open 'string.h' src/lib/16_head.h(187): Error! E1022: Missing or misspelled data type near 'clock_t' src/lib/16_head.h(194): Error! E1009: Expecting ',' but found 'wait' src/lib/16_head.h(194): Error! E1116: An id list not allowed except for function definition src/lib/16_head.h(196): Error! E1009: Expecting ',' but found '*' src/lib/16_head.h(196): Error! E1147: Too many errors: compilation aborted Error: Compiler returned a bad status compiling 'src/16.c' Error(E42): Last command making (16.o) returned a bad status Error(E02): Make execution terminated

damn!! i cannot compile the game!

also i had to modify the vi code a bit

/home/sparky4/p/watcom2/bld/vi/c/ex.c /home/sparky4/p/watcom2/bld/vi/h/ex.h

sparky4 commented 9 years ago

and my environment is set right!

!/bin/bash

echo Open Watcom Build Environment

ROOT=/home/sparky4/p/osfree

watcom=/dos/fdos/watcom

watcom=/home/sparky4/p/watcom2/rel

watcom=/dos/fdos/watcom2 WATCOM=$watcom OS=LINUX ENV=LINUX SHELL=Bourne REXX=/usr/bin/rexx

TOOLS=$ROOT/bin/tools INCLUDE=$watcom/h:$watcom/lh:$watcom/h/os2

:$watcom/h/dos

WIPFC=$watcom/wipfc LIB=$watcom/lib286:$watcom/lib286/dos:$watcom/lib386:$watcom/lib386/dos:$ROOT/lib PATH=$watcom/binl:$TOOLS:$ROOT:$PATH WD_PATH=$watcom/binl

LANG=$watcom

export OS REXX WATCOM ROOT TOOLS INCLUDE LIB PATH WD_PATH LANG WIPFC

ArmstrongJ commented 9 years ago

The compiler can't seem to find the dos headers. When your ran your environment setup script, did you run it in the current shell context?

source owsetenv.sh

When you type export, do you actually see the INCLUDE environment variable set properly?

sparky4 commented 9 years ago

yes

[14:12:23][/dos/z/16] [sparky4@lappy4]$ env | grep 'INCLUDE' OWDEFINCLUDE=/dos/fdos/watcom2/h:/dos/fdos/watcom2/lh:/dos/fdos/watcom2/h/os2 INCLUDE=/dos/fdos/watcom2/h:/dos/fdos/watcom2/lh:/dos/fdos/watcom2/h/os2

ArmstrongJ commented 9 years ago

Well for some reason, Open Watcom can't find dos.h. Did you check that /dos/fdos/watcom2/h/dos.h is actually a file? Is there a chance that the makefile is somehow redefining the INCLUDE environment variable?

I don't regularly use the 16-bit compiler, so I'm not sure if there's a problem. Trying it on my system with a "Hello World" program, I'm having no issue with the compiler locating the header files.

sparky4 commented 9 years ago

[14:26:20][/dos/z/16] [sparky4@lappy4]$ ls -la /dos/fdos/watcom2/h/dos.h -rwxrwxrwx 1 root root 9130 Sep 14 12:28 /dos/fdos/watcom2/h/dos.h

it exists

https://github.com/sparky4/16/

the project i am working on

ArmstrongJ commented 9 years ago

What happens if you explicitly add the flag:

-i=/dos/fdos/watcom2/h/

Again, I can't replicate your problem, so I'm not sure why you're seeing the issue. There may be a bug in wmake. Does the command to build work without using the makefile?

jmalak commented 9 years ago

Build system expect you have setup your preferred compiler environment for host operating system before you start OW setup script. In your case Watcom compiler should be setup for Linux. If you use Open Watcom then you should setup OWTOOLS=WATCOM or if you use GCC then OWTOOLS=GCC and path to source/build tree in setup script.

sparky4 commented 9 years ago

i used gcc and i did set up path to the watcom source tree

hmm

sparky4 commented 9 years ago

http://4ch.mooo.com/4/setvars.sh http://4ch.mooo.com/4/wat.sh

here!

jmalak commented 9 years ago

Sorry, I am a little confused now. You report problem with compilation of src/16.c But it is not related to build system, it is compilation of application outside OW building system. It requires standard setup for OW usage. Now I see where problem is, you use -x option for wcl but doesn't use -I... setup for header files search path. Option -x tell compiler to ignore all environment variable (including INCLUDE variable). You should remove -x option or specify search path by -I options.

Anyway you can not use OW build environment for building your application. For this purpose you should used regular OW setup.

jmalak commented 9 years ago

May be interesting for you this page https://wiki.archlinux.org/index.php/Open_Watcom which describes cross-compilation from Linux for different targets.

sparky4 commented 9 years ago

ah i will remove the -x option ^^; thanks~