Rebuilding KOS Again

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
Corbin
DC Developer
DC Developer
Posts: 121
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Fri Dec 14, 2007 1:56 am
Location: California
Has thanked: 0
Been thanked: 0

Rebuilding KOS Again

Post by Corbin »

Hi guys, I'm in the middle of rebuilding my toolchain again. I've been using this new tutorial:

https://dcemulation.org/?title=Compiling_KOS_on_Windows

Which is working so far, so good. I'm in the middle of compiling the dc-toolchain, and these errors have cropped up:

Code: Select all

...
...
else :; fi && \
if /opt/toolchains/dc/kos/utils/dc-chain/binutils-2.27/missing makeinfo --split-size=5000000 --split-size=5000000   -I ../../../binutils-2.27/bfd/doc \
 -o bfd.info `test -f 'bfd.texinfo' || echo '../../../binutils-2.27/bfd/doc/'`bfd.texinfo; \
then \
  rc=0; \
else \
  rc=$?; \
  $restore $backupdir/* `echo "./bfd.info" | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
WARNING: 'makeinfo' is missing on your system.
         You should only need it if you modified a '.texi' file, or
         any other file indirectly affecting the aspect of the manual.
         You might want to install the Texinfo package:
         <http://www.gnu.org/software/texinfo/>
         The spurious makeinfo call might also be the consequence of
         using a buggy 'make' (AIX, DU, IRIX), in which case you might
         want to install GNU make:
         <http://www.gnu.org/software/make/>
make[4]: *** [Makefile:472: bfd.info] Error 127
make[4]: Leaving directory '/opt/toolchains/dc/kos/utils/dc-chain/build-binutils-sh-elf-2.27/bfd/doc'
Making info in po
make[4]: Entering directory '/opt/toolchains/dc/kos/utils/dc-chain/build-binutils-sh-elf-2.27/bfd/po'
( if test 'x../../../binutils-2.27/bfd/po' != 'x.'; then \
    posrcprefix='../../../binutils-2.27/bfd/'; \
  else \
    posrcprefix="../"; \
  fi; \
  rm -f SRC-POTFILES-t SRC-POTFILES \
    && (sed -e '/^#/d' \
            -e '/^[     ]*$/d' \
            -e "s@.*@   $posrcprefix& \\\\@" < ../../../binutils-2.27/bfd/po/SRC-POTFILES.in \
        | sed -e '$s/\\$//') > SRC-POTFILES-t \
    && chmod a-w SRC-POTFILES-t \
    && mv SRC-POTFILES-t SRC-POTFILES )
( rm -f BLD-POTFILES-t BLD-POTFILES \
    && (sed -e '/^#/d' \
            -e '/^[     ]*$/d' \
            -e "s@.*@   ../& \\\\@" < ../../../binutils-2.27/bfd/po/BLD-POTFILES.in \
        | sed -e '$s/\\$//') > BLD-POTFILES-t \
    && chmod a-w BLD-POTFILES-t \
    && mv BLD-POTFILES-t BLD-POTFILES )
cd .. \
  && CONFIG_FILES=po/Makefile.in:po/Make-in \
     CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating po/Makefile.in
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default-1 commands
config.status: executing bfd_stdint.h commands
config.status: executing default commands
make[4]: Nothing to be done for 'info'.
make[4]: Leaving directory '/opt/toolchains/dc/kos/utils/dc-chain/build-binutils-sh-elf-2.27/bfd/po'
make[4]: Entering directory '/opt/toolchains/dc/kos/utils/dc-chain/build-binutils-sh-elf-2.27/bfd'
make[4]: Nothing to be done for 'info-am'.
make[4]: Leaving directory '/opt/toolchains/dc/kos/utils/dc-chain/build-binutils-sh-elf-2.27/bfd'
make[3]: *** [Makefile:1711: info-recursive] Error 1
make[3]: Leaving directory '/opt/toolchains/dc/kos/utils/dc-chain/build-binutils-sh-elf-2.27/bfd'
make[2]: *** [Makefile:2733: all-bfd] Error 2
make[2]: Leaving directory '/opt/toolchains/dc/kos/utils/dc-chain/build-binutils-sh-elf-2.27'
make[1]: *** [Makefile:858: all] Error 2
make[1]: Leaving directory '/opt/toolchains/dc/kos/utils/dc-chain/build-binutils-sh-elf-2.27'
make: *** [Makefile:156: build-sh4-binutils] Error 1


Not sure what those errors mean. I'm using the Git version to compile.

EDIT: I have Texinfo installed as well, which isn't a big deal as it skips the warning about makeinfo anyway.

Thanks guys!
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Rebuilding KOS Again

Post by bogglez »

So the build is working for you after all? Did it install /opt/toolchains/dc/sh-elf only or also arm-eabi?
Did the script run through normally?
Trying to figure out when things stopped.
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
Corbin
DC Developer
DC Developer
Posts: 121
Joined: Fri Dec 14, 2007 1:56 am
Location: California
Has thanked: 0
Been thanked: 0

Re: Rebuilding KOS Again

Post by Corbin »

I am using that guide on the Wiki. It stops at the point I copy/pasted. Not sure what those errors mean..
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Rebuilding KOS Again

Post by bogglez »

OK, let me ensure some things:
1. What's your OS? Windows 10 64 bit?
2. Which MSys2 setup file did you use?
http://repo.msys2.org/distrib/i686/msys ... 161025.exe is the most current (the tutorial mentions that it used an older version back then). Perhaps you used 64 bit instead? No experience with that.
3. Are you installing to C:\? Is your filesystem NTFS? (FAT has issues)
4. Have you tried running "pacman -Syu"? You might need to close and reopen the terminal and type "pacman -Su"
5. Are you running the newest version of the setup script, or an old one?
6. Did you install over an old kos installation, i.e. /opt/toolchains/dc/kos already existed when you ran the script?
7. The tutorial suggests running C:\msys32\mingw32_shell.bat instead of the msys2 shell. Some users suggest that the msys2 shell should be used, but give me no definite responses, so you can try opening that shell instead and running "rm -rf /opt; shell kos_setup_script.sh".
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Rebuilding KOS Again

Post by Chilly Willy »

This looks like the main problem:
WARNING: 'makeinfo' is missing on your system.
You're missing a dependency. That should be part of the texinfo package. Both msys and cgywin should have that package available since so many things require it.
User avatar
Corbin
DC Developer
DC Developer
Posts: 121
Joined: Fri Dec 14, 2007 1:56 am
Location: California
Has thanked: 0
Been thanked: 0

Re: Rebuilding KOS Again

Post by Corbin »

So I started completely over, got the version of MSYS2 that Bogglez recommended, and this time ran
the installer script. Installed to c:\MSYS2, using x64 of Windows 10 (but installed 32-bit MSYS2), and
used the install script from within MinGW32.exe (mingw32_shell.cmd for some reason does not exist
in c:\msys2 with this install, so I ran msys2_cmd with the -mingw32 flag, and it worked).

Ran the script installer, got this far:

Code: Select all

$ sh kos_setup_script.sh
MingW32 detected.
:: Synchronizing package databases...
 mingw32 is up to date
 mingw64 is up to date
 msys is up to date
warning: mingw-w64-i686-binutils-2.28-1 is up to date -- skipping
warning: mingw-w64-i686-gcc-6.3.0-2 is up to date -- skipping
warning: mingw-w64-i686-pkg-config-0.29.1-3 is up to date -- skipping
warning: mingw-w64-i686-libpng-1.6.28-1 is up to date -- skipping
warning: mingw-w64-i686-libjpeg-turbo-1.5.1-1 is up to date -- skipping
warning: diffutils-3.5-1 is up to date -- skipping
warning: git-2.12.0-1 is up to date -- skipping
warning: make-4.2.1-1 is up to date -- skipping
warning: subversion-1.9.5-1 is up to date -- skipping
warning: patch-2.7.5-1 is up to date -- skipping
warning: python-3.4.5-1 is up to date -- skipping
warning: tar-1.29-1 is up to date -- skipping
warning: texinfo-6.3-1 is up to date -- skipping
warning: wget-1.19.1-1 is up to date -- skipping
 there is nothing to do
Creating directory /opt/toolchains/dc as root, giving users access to it.
Downloading KOS and KOS ports.
Building the compiler.
kos_setup_script.sh: line 126: cd: /opt/toolchains/dc/kos/utils/dc-chain: Permission denied
Permission denied? Was the chmod set up incorrectly or? I can't even access dc-chain from
Windows Explorer. Strange stuff.

EDIT: Solved the permission problem, now I just get:

Code: Select all

Creating directory /opt/toolchains/dc as root, giving users access to it.
Downloading KOS and KOS ports.
Building the compiler.
Downloading..
sh: download.sh: No such file or directory
Do I need to clone the git repo first?

EDIT 2: Fiddled with it some more, now it's running through. I will give you a synopsis when/if it completes! =)
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Rebuilding KOS Again

Post by Chilly Willy »

Yeah, Windows can be persnickety with cross-compiling. I know one guy who actually setup linux in a VM under Windows because that was easier (for him) than mingw/cygwin. :grin:
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Rebuilding KOS Again

Post by bogglez »

Chilly Willy wrote:Yeah, Windows can be persnickety with cross-compiling. I know one guy who actually setup linux in a VM under Windows because that was easier (for him) than mingw/cygwin. :grin:
Open source projects depend on contributors.
Linux and MacOS users help with getting things running. We don't see many contributions from Windows users. The support we have right now we have because I threw together a setup script for Windows in a day.
Most of us don't use Windows, so we cannot test things and rely on user reports.
Since no Windows user provides fixes, this is all you can expect.
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Rebuilding KOS Again

Post by Chilly Willy »

Quite right, so my thanks to you and Corbin for your Windows usage. It's making things better... for some folks in any case. :grin:

Having Windows support is a consideration for some people. I know a few folks that wanted to get into programming for certain older consoles like the N64 who were having trouble because they were trying to do it in Windows while most all the tools were linux. All the cross-toolchains I've worked on myself are all linux, and while I've given advice to folk trying to get them working in Windows, I don't do any cross-compiling in Windows, so that's all I could do - give advice.
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Rebuilding KOS Again

Post by bogglez »

I personally don't own a Windows machine, just to be clear. I had access to one that day so I did what had to be done.
I have no personal interest in supporting Windows, but I offer help to people who want to use it. I won't however buy Windows and install it on my machine or in a VM or anything like that, is all.

Since the "native" compiler on Windows is closed source, doesn't support cross-compiling to most architectures, including SH4, and doesn't allow extending it, GCC wins by default.
GCC expects a Unix-like system, so that's where the dependency comes from.
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
Corbin
DC Developer
DC Developer
Posts: 121
Joined: Fri Dec 14, 2007 1:56 am
Location: California
Has thanked: 0
Been thanked: 0

Re: Rebuilding KOS Again

Post by Corbin »

Hey just checking in -- the script worked! There was a problem with permissions, and I wasn't aware the script did all the work so I was doing it in two parts...haha :D

Thanks for the help guys! Onto more debugging :-)
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Rebuilding KOS Again

Post by bogglez »

Regarding the problems you had, did you need to run any extra commands that I should incorporate into the script?
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Post Reply