Help, Build Visopsys Failed

General discussion about Visopsys.
meowsoft
Posts: 11
Joined: Thu Jul 23, 2020 4:15 pm
Location: Moscow

Re: Help, Build Visopsys Failed

Post by meowsoft »

Ohh... I forgot...
and now we get this error :

gcc -Os -m32 -pipe -fno-common -fno-strict-aliasing -fno-builtin -fno-omit-frame-pointer -fno-asynchronous-unwind-tables -fno-stack-protector -ffreestanding -Wall -W -Wshadow -Wcast-align -Wsign-compare -Waggregate-return -Wmissing-format-attribute -Wredundant-decls -Werror -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -nostdinc -I. -I../include -DKERNEL -c kernelDmaDriver.c -o obj/kernelDmaDriver.o
gcc -Os -m32 -pipe -fno-common -fno-strict-aliasing -fno-builtin -fno-omit-frame-pointer -fno-asynchronous-unwind-tables -fno-stack-protector -ffreestanding -Wall -W -Wshadow -Wcast-align -Wsign-compare -Waggregate-return -Wmissing-format-attribute -Wredundant-decls -Werror -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -nostdinc -I. -I../include -DKERNEL -c kernelFloppyDriver.c -o obj/kernelFloppyDriver.o
In file included from kernelFloppyDriver.c:27:0:
kernelFloppyDriver.c: In function ‘driverDetect’:
kernelError.h:40:2: error: this statement may fall through [-Werror=implicit-fallthrough=]
kernelErrorOutput(__FILE__, __FUNCTION__, __LINE__, kind, message, ##arg)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernelFloppyDriver.c:954:5: note: in expansion of macro ‘kernelError’
kernelError(kernel_warn, "Floppy disk fd%d type %d is "
^~~~~~~~~~~
kernelFloppyDriver.c:959:4: note: here
case 4:
^~~~
cc1: all warnings being treated as errors
Makefile:194: recipe for target 'obj/kernelFloppyDriver.o' failed
make[2]: *** [obj/kernelFloppyDriver.o] Error 1
make[2]: Leaving directory '/visopsys/visopsys-0.9-src/src/kernel'
Makefile:11: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/visopsys/visopsys-0.9-src/src'
Makefile:13: recipe for target 'all' failed
make: *** [all] Error 2

#### failed to build some targets (14 seconds) ####
meowsoft
Posts: 11
Joined: Thu Jul 23, 2020 4:15 pm
Location: Moscow

Re: Help, Build Visopsys Failed

Post by meowsoft »

Ohh... I forgot...
and now we get this error :

gcc -Os -m32 -pipe -fno-common -fno-strict-aliasing -fno-builtin -fno-omit-frame-pointer -fno-asynchronous-unwind-tables -fno-stack-protector -ffreestanding -Wall -W -Wshadow -Wcast-align -Wsign-compare -Waggregate-return -Wmissing-format-attribute -Wredundant-decls -Werror -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -nostdinc -I. -I../include -DKERNEL -c kernelDmaDriver.c -o obj/kernelDmaDriver.o
gcc -Os -m32 -pipe -fno-common -fno-strict-aliasing -fno-builtin -fno-omit-frame-pointer -fno-asynchronous-unwind-tables -fno-stack-protector -ffreestanding -Wall -W -Wshadow -Wcast-align -Wsign-compare -Waggregate-return -Wmissing-format-attribute -Wredundant-decls -Werror -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -nostdinc -I. -I../include -DKERNEL -c kernelFloppyDriver.c -o obj/kernelFloppyDriver.o
In file included from kernelFloppyDriver.c:27:0:
kernelFloppyDriver.c: In function ‘driverDetect’:
kernelError.h:40:2: error: this statement may fall through [-Werror=implicit-fallthrough=]
kernelErrorOutput(__FILE__, __FUNCTION__, __LINE__, kind, message, ##arg)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernelFloppyDriver.c:954:5: note: in expansion of macro ‘kernelError’
kernelError(kernel_warn, "Floppy disk fd%d type %d is "
^~~~~~~~~~~
kernelFloppyDriver.c:959:4: note: here
case 4:
^~~~
cc1: all warnings being treated as errors
Makefile:194: recipe for target 'obj/kernelFloppyDriver.o' failed
make[2]: *** [obj/kernelFloppyDriver.o] Error 1
make[2]: Leaving directory '/visopsys/visopsys-0.9-src/src/kernel'
Makefile:11: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/visopsys/visopsys-0.9-src/src'
Makefile:13: recipe for target 'all' failed
make: *** [all] Error 2

#### failed to build some targets (14 seconds) ####
User avatar
andymc
Posts: 590
Joined: Tue Nov 16, 2010 7:20 pm

Re: Help, Build Visopsys Failed

Post by andymc »

Man, your compiler is picky. What version are you using? gcc -v
User avatar
andymc
Posts: 590
Joined: Tue Nov 16, 2010 7:20 pm

Re: Help, Build Visopsys Failed

Post by andymc »

This fallthrough is intentional. Apparently you can put a comment that will suppress the warning you're seeing (without running your version of gcc though, I can't test it). Change the bit of kernelFloppy.c around line 959 to add this "fall through" comment:

Code: Select all

				kernelError(kernel_warn, "Floppy disk fd%d type %d is "
					"unknown.  Assuming 1.44 MB.",
					disks[numberFloppies].deviceNumber,
					kernelOsLoaderInfo->fddInfo[count].type);
				// fall through

			case 4:
meowsoft
Posts: 11
Joined: Thu Jul 23, 2020 4:15 pm
Location: Moscow

Re: Help, Build Visopsys Failed

Post by meowsoft »

root@DESKTOP-GF0PHJ4:~# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
User avatar
andymc
Posts: 590
Joined: Tue Nov 16, 2010 7:20 pm

Re: Help, Build Visopsys Failed

Post by andymc »

meowsoft wrote: Wed Jul 29, 2020 3:00 pm gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
Yeah, you're running a much newer version than me. I'm using 5.4.0.

Is everything compiling now?
Post Reply