Join us on Discord!
You can help CodeWalrus stay online by donating here.

Error installing KnightOS SDK

Started by Ephraim Becker, April 12, 2016, 12:37:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ephraim Becker

I'm testing out the new Linux Subsystem beta on Windows 10 Build 14316 with installing the KnightOS SDK. I installed all the required packages and then when I try installing the KnightOS SDK, I get the following error:

root@localhost:~# curl -s http://www.knightos.org/install-sdk | bash
6.7.7
Downloading genkfs...
Compiling genkfs...
Installing genkfs...
[ 50%] Built target genkfs
[100%] Built target man
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/genkfs
-- Installing: /usr/local/man/man1/genkfs.1
Downloading mktiupgrade...
Compiling mktiupgrade...
Installing mktiupgrade...
[  0%] Built target man
[100%] Built target mktiupgrade
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/mktiupgrade
-- Installing: /usr/local/man/man1/mktiupgrade.1
Downloading kpack...
Compiling kpack...
Installing kpack...
[ 66%] Built target kpack
[100%] Built target man
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/kpack
-- Installing: /usr/local/man/man1/kpack.1
-- Installing: /usr/local/man/man5/kpack.5
Downloading kimg...
Compiling kimg...
Installing kimg...
[ 50%] Built target kimg
[100%] Built target man
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/kimg
-- Installing: /usr/local/man/man1/kimg.1
Downloading sass...
Compiling sass...
Installing sass...
mkdir -p /usr/bin/
mkdir -p /usr/mono/
install -c -m 775 sass/bin/Debug/sass.exe /usr/mono/sass.exe
printf "#!/bin/sh\nmono /usr/mono/sass.exe \$*" > /usr/bin/sass
chmod +x /usr/bin/sass
Downloading scas...
Compiling scas...
[ 1%] Generating tables/z80.c /tmp/SDK.VEbSXw/scas/tables/z80.tab /tmp/SDK.VEbSXw/scas/tables/z80.c Scanning dependencies of target libscas [ 2%] Building C object CMakeFiles/libscas.dir/common/errors.c.o [ 3%] Building C object CMakeFiles/libscas.dir/common/expression.c.o [ 5%] Building C object CMakeFiles/libscas.dir/common/functions.c.o [ 6%] Building C object CMakeFiles/libscas.dir/common/hashtable.c.o [ 7%] Building C object CMakeFiles/libscas.dir/common/list.c.o /tmp/SDK.VEbSXw/scas/common/list.c: In function 'list_foreach': /tmp/SDK.VEbSXw/scas/common/list.c:33:2: error: 'for' loop initial declarations are only allowed in C99 mode for (int i = 0; i < list->length; i++) { ^ /tmp/SDK.VEbSXw/scas/common/list.c:33:2: note: use option -std=c99 or -std=gnu99 to compile your code /tmp/SDK.VEbSXw/scas/common/list.c: In function 'list_seq_find': /tmp/SDK.VEbSXw/scas/common/list.c:67:2: error: 'for' loop initial declarations are only allowed in C99 mode for (int i = 0; i < list->length; i++) { ^ make[2]: assembler bin CMakeCache.txt CMakeFiles cmake_install.cmake CMakeLists.txt common doc generate-tables.sh include LICENSE linker Makefile README.md runtime.c scas scas.1.txt scdump scdump.1.txt scwrap scwrap.1.txt tables [CMakeFiles/libscas.dir/common/list.c.o] Error 1 make[1]: assembler bin CMakeCache.txt CMakeFiles cmake_install.cmake CMakeLists.txt common doc generate-tables.sh include LICENSE linker Makefile README.md runtime.c scas scas.1.txt scdump scdump.1.txt scwrap scwrap.1.txt tables [CMakeFiles/libscas.dir/all] Error 2 make: assembler bin CMakeCache.txt CMakeFiles cmake_install.cmake CMakeLists.txt common doc generate-tables.sh include LICENSE linker Makefile README.md runtime.c scas scas.1.txt scdump scdump.1.txt scwrap scwrap.1.txt tables [all] Error 2
root@localhost:~#


Can someone please help me fix this error?
  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

ben_g

Quote from: Ephraim Becker on April 12, 2016, 12:37:00 AM
...the new Linux Subsystem beta...
This is probably the cause. The Windows 10 Linux subsystem is a very early test version, and it still has some problems and not all features are supported yet. The KOS install script probalbly relies on one of those currently unimplemented or glitched features.

Ivoah

#2
It looks like scas is the issue. I'm trying to get the SDK working on my bash on windows install too, and I had to manually compile scas. You'll have to git clone https://github.com/KnightOS/scas.git and change line 3 of CMakeLists.txt to set(CMAKE_C_FLAGS "-g -std=c99"). Then you can 'mkdir build', 'cd build', 'cmake ..', 'make', and 'make install'. After that, download the install-sdk file, and remove the line that says 'scas' from the force_all() function. You can then just run 'bash install-sdk' to finish installing the other stuff.

EDIT: I just made a PR to the scas repo, it all works now :)
EDIT 2: When building the sdk part, it fails on pip installs, just keep running 'bash install-sdk sdk' until it works ;)
  • Calculators owned: TI-86 (now broken), TI SR-56, TI-Nspire CX CAS, TI-84+ SE, TI-84+ SE, TI-85, TI-73 Explorer VS, ViewScreen, TI-84+ CSE, TI-83+ SE

Powered by EzPortal