Setup Error

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
Vectrix Quest
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 22
Joined: Thu Nov 14, 2013 1:10 pm
Has liked: 0
Been liked: 0

Setup Error

Post by Vectrix Quest » Fri Jan 31, 2014 8:54 pm

I had to remove the development environment and now am having problems trying to get it resetup.
$ make
patch -d gcc-4.8.2 -p1 < /home/User/kallistios/utils/dc-chain/patches/gcc-4.8.2-kos.diff
patching file gcc/configure
patching file libgcc/config/sh/crt1.S
patching file libgcc/config/sh/fake-kos.S
patching file libgcc/config/sh/gthr-kos.h
patching file libgcc/config/sh/t-sh
patching file libgcc/configure
patching file libstdc++-v3/configure
patch -d newlib-2.0.0 -p1 < /home/User/kallistios/utils/dc-chain/patches/newlib-2.0.0-kos.diff
patching file newlib/configure.host
patching file newlib/libc/include/assert.h
patching file newlib/libc/include/machine/_default_types.h
patching file newlib/libc/include/sys/types.h
patching file newlib/libc/stdlib/assert.c
patching file newlib/libc/sys/sh/ftruncate.c
patching file newlib/libc/sys/sh/sys/lock.h
patching file newlib/libc/sys/sh/syscalls.c
patching file newlib/libc/sys/sh/trap.S
patching file newlib/libc/sys/sh/truncate.c
+++ Building binutils-2.23.2 to build-binutils-sh-elf-2.23.2...
sed -e 's/ @colophon/ @@colophon/' -e 's/doc@cygnus.com/doc@@cygnus.com/' binutils-2.23.2/bfd/doc/bfd.texinfo > binutils-2.23.2/bfd/doc/bfd.texinfo2
mv binutils-2.23.2/bfd/doc/bfd.texinfo2 binutils-2.23.2/bfd/doc/bfd.texinfo
mkdir -p build-binutils-sh-elf-2.23.2
> /home/User/kallistios/utils/dc-chain/logs/build-binutils-sh-elf-2.23.2.log
cd build-binutils-sh-elf-2.23.2; ../binutils-2.23.2/configure --target=sh-elf --prefix=/opt/toolchains/dc/sh-elf --disable-werror CXX=g++ 2>&1 | tee -a /home/User/kallistios/utils/dc-chain/logs/build-binutils-sh-elf-2.23.2.log && [ $PIPESTATUS -eq 0 ]
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... sh-unknown-elf
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking to see if cat works as expected... yes
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: in `/home/User/kallistios/utils/dc-chain/build-binutils-sh-elf-2.23.2':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Makefile:150: recipe for target 'build-sh4-binutils' failed
make: *** [build-sh4-binutils] Error 1
Any assistance would be greatly appreciated.

Sincerely,

Vectrix Quest
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5404
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has liked: 1 time
Been liked: 16 times
Contact:

Re: Setup Error

Post by BlueCrab » Fri Jan 31, 2014 8:56 pm

Did you install the development tools in your Cygwin installation? It looks like it is failing to even find your local (Cygwin-targetted) compiler, or some tool that is required for it.
User avatar
showka
DCEmu Freak
DCEmu Freak
Posts: 95
Joined: Fri Nov 23, 2001 12:01 pm
Location: Border Town
Has liked: 0
Been liked: 0
Contact:

Re: Setup Error

Post by showka » Sat Feb 01, 2014 1:39 am

The most important step in building the toolchain is to make sure you get all of the dependencies right. In Windows with Cygwin, the easiest way to do that is to open a Windows command prompt, cd into the directory with the Cygwin installer exe, and run the following:

Code: Select all

setup-x86.exe --quiet-mode --packages gcc-core,gcc-g++,make,bison,flex,libelf0-devel,ELFIO,texinfo,git,wget,sed,lyx,patchutils,libiconv
By the way, I've created this tutorial / script that aims to make installing the KOS toolchain as simple as possible. I used it to build a fresh KOS toolchain in a blank Windows XP VM just the other day, so I highly recommend you follow it.
User avatar
showka
DCEmu Freak
DCEmu Freak
Posts: 95
Joined: Fri Nov 23, 2001 12:01 pm
Location: Border Town
Has liked: 0
Been liked: 0
Contact:

Re: Setup Error

Post by showka » Sun Feb 02, 2014 7:29 pm

By the way, I tried to build a toolchain today on my new Surface tablet using the 64-bit version of Cygwin and ran into troubles while on one of the last steps of compiling the SH-4 version of GCC. I uninstalled Cygwin completely (by which I mean I just deleted the C:\Cygwin64 directory) and tried it all again using the 32 bit version of Cygwin and the build script passed.
Post Reply