lkundrak / dev86

C compiler, assembler and linker environment for the production of 8086 executables
http://v3.sk/~lkundrak/dev86/
GNU General Public License v2.0
157 stars 44 forks source link

Compilation on macOS mojave fails with error in "tok_io.c" #22

Open ghost opened 5 years ago

ghost commented 5 years ago

I am trying to compile dev86 for use on macOS. However, when following the README instructions, I get the following error:

/Library/Developer/CommandLineTools/usr/bin/make -C unproto CC='cc' CFLAGS=' -O2 -fno-strict-aliasing -no-cpp-precomp' LDFLAGS='' PREFIX=/usr LIBDIR='/usr/lib/bcc' BINDIR='/usr/bin' ANSI='' unproto
cc -O2 -fno-strict-aliasing -no-cpp-precomp -w      -DREOPEN -c tok_io.c -o tok_io.o
tok_io.c:231:6: error: non-void function 'do_control' should return a value
      [-Wreturn-type]
            return;
            ^
tok_io.c:262:6: error: non-void function 'do_control' should return a value
      [-Wreturn-type]
            return;
            ^
tok_io.c:267:6: error: non-void function 'do_control' should return a value
      [-Wreturn-type]
            return;
            ^
3 errors generated.
make[3]: *** [tok_io.o] Error 1
make[2]: *** [unproto] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

I cannot find this file and correct the error myself nor does recompiling seem to fix the issue. What is happening?

triztian commented 5 years ago

I'm experiencing this same issue

marcin-chwedczuk commented 2 years ago

Throw -Wno-return-type until it compiles (go to the directory with the file, edit Makefile in that directory by adding this flag to CCFLAGS variable).

Yeah, would be good to fix this, but looks like the project is no longer maintained :(

anchorz commented 2 years ago

Thanks to look into it. I assume he changed compiler to GCC16.