My first attempt...
$ sh kos_setup_script.sh
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
Please install pkg-config.
Please install wget.
Warning: jpeg 9c is already installed, it's just not linked
You can use `brew link jpeg` to link this version.
Warning: libpng 1.6.35 is already installed, it's just not linked
You can use `brew link libpng` to link this version.
Linking /usr/local/Cellar/jpeg/9c...
Error: Could not symlink bin/cjpeg
Target /usr/local/bin/cjpeg
already exists. You may want to remove it:
rm '/usr/local/bin/cjpeg'
To force the link and overwrite all conflicting files:
brew link --overwrite jpeg
To list all files that would be deleted:
brew link --overwrite --dry-run jpeg
Warning: jpeg 9c is already installed and up-to-date
To reinstall 9c, run `brew reinstall jpeg`
Warning: libpng 1.6.35 is already installed and up-to-date
To reinstall 1.6.35, run `brew reinstall libpng`
Warning: Already linked: /usr/local/Cellar/jpeg/9c
To relink: brew unlink jpeg && brew link jpeg
Warning: Already linked: /usr/local/Cellar/libpng/1.6.35
To relink: brew unlink libpng && brew link libpng
Creating directory /opt/toolchains/dc as root, giving users access to it.
Password:
Downloading KOS and KOS ports.
Compiling KOS.
for i in utils kernel addons ; do make -C $i || exit -1; done
for i in genromfs wav2adpcm vqenc scramble dcbumpgen; do make -C $i; done
cc -O2 -Wall -c -o genromfs.o genromfs.c
error: unable to open output file 'genromfs.o': 'Permission denied'
1 error generated.
make[2]: *** [genromfs.o] Error 1
cc -O2 -Wall wav2adpcm.c -o wav2adpcm
ld: can't open output file for writing: wav2adpcm, errno=13 for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [wav2adpcm] Error 1
cc -O2 -Wall -DINLINE=inline -I/usr/local/include -c -o vqenc.o vqenc.c
cc -O2 -Wall -DINLINE=inline -I/usr/local/include -c -o get_image.o get_image.c
cc -O2 -Wall -DINLINE=inline -I/usr/local/include -c -o get_image_jpg.o get_image_jpg.c
cc -O2 -Wall -DINLINE=inline -I/usr/local/include -c -o get_image_png.o get_image_png.c
cc -O2 -Wall -DINLINE=inline -I/usr/local/include -c -o readpng.o readpng.c
error: unable to open output file 'get_image_png.o': 'Permission denied'
1 error generated.
error: unable to open output file 'readpng.o': 'Permission denied'
1 error generated.
error: unable to open output file 'vqenc.o': 'Permission denied'
1 error generated.
error: unable to open output file 'get_image.o': 'Permission denied'
1 error generated.
make[2]: *** [get_image_png.o] Error 1
make[2]: *** Waiting for unfinished jobs....
error: unable to open output file 'get_image_jpg.o': 'Permission denied'
1 error generated.
make[2]: *** [readpng.o] Error 1
make[2]: *** [vqenc.o] Error 1
make[2]: *** [get_image.o] Error 1
make[2]: *** [get_image_jpg.o] Error 1
cc -o scramble scramble.c
ld: can't open output file for writing: scramble, errno=13 for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [scramble] Error 1
cc -O2 -Wall -DINLINE=inline -I/usr/local/include -c -o dcbumpgen.o dcbumpgen.c
cc -O2 -Wall -DINLINE=inline -I/usr/local/include -c -o get_image.o get_image.c
cc -O2 -Wall -DINLINE=inline -I/usr/local/include -c -o get_image_jpg.o get_image_jpg.c
cc -O2 -Wall -DINLINE=inline -I/usr/local/include -c -o get_image_png.o get_image_png.c
cc -O2 -Wall -DINLINE=inline -I/usr/local/include -c -o readpng.o readpng.c
error: unable to open output file 'get_image_jpg.o': 'Permission denied'
1 error generated.
error: unable to open output file 'get_image.o': 'Permission denied'
1 error generated.
error: unable to open output file 'dcbumpgen.o': 'Permission denied'
1 error generated.
error: unable to open output file 'readpng.o': 'Permission denied'
1 error generated.
make[2]: *** [get_image_jpg.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [get_image.o] Error 1
make[2]: *** [readpng.o] Error 1
make[2]: *** [dcbumpgen.o] Error 1
error: unable to open output file 'get_image_png.o': 'Permission denied'
1 error generated.
make[2]: *** [get_image_png.o] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 255