Results 1 to 3 of 3

Thread: Trouble setting up environment in Linux/OSX

                  
   
  1. #1

    Default Trouble setting up environment in Linux/OSX

    I'm interested in developing a game (and possibly more later) for Dreamcast. My current goal is to just get something to display on the screen. The tutorial http://files.frashii.com/~sp00nz/Doo...ackAura/tutes/ seems good for that.

    However, I cannot seem to get the KOS environment to set up. I've tried it on multiple OS X machines, and most recently, my Linux server. I keep getting the same errors. I've been using the set-up tutorial from http://www.dreamcast-scene.com/index...LinuxToolchain and have been trying to compile my own toolchain as it seems to be required to get everything to work.

    (I will describe my progress on Ubuntu Linux, as it is what I used most recently)

    First I apt-get installed all the technologies listed at the top to make sure I had them all. (My GCC version is at 4.2.3). I created a directory in ~ called dc, went into it, and ran:
    Once the checkouts were done, I went into kos/utils/dc-chain and ran the download and unpack shell scripts. I edited the Makefile, so the three lines to change became:
    sh_prefix := /home/cmiller/dc/$(sh_target)
    arm_prefix := /home/cmiller/dc/$(arm_target)
    kos_root="/home/cmiller/dc"
    (cmiller is my username)

    Then I checked my GCC version with gcc --version and found that I was using 4.2.3, so I ran make CC=gcc-3.4 to make the environment. What happened was:
    cmiller@chance:~/dc/kos/utils/dc-chain$ make CC=gcc-3.4
    cd gcc-3.4.6; patch -p1 < /home/cmiller/dc/kos/utils/dc-chain/patches/gcc-3.4.6.diff
    patching file gcc/config/sh/kos.h
    patching file gcc/config/sh/t-sh
    patching file gcc/config.gcc
    patching file libstdc++-v3/config/cpu/generic/atomicity.h
    patching file libstdc++-v3/config/cpu/sh4/atomicity.h
    patching file libstdc++-v3/config/cpu/sh4/atomic_word.h
    patching file libstdc++-v3/configure
    patching file libstdc++-v3/crossconfig.m4
    cd newlib-1.12.0; patch -p1 < /home/cmiller/dc/kos/utils/dc-chain/patches/newlib-1.12.0-kos.diff
    patching file config-ml.in
    patching file newlib/configure.host
    patching file newlib/libc/sys/sh/ftruncate.c
    patching file newlib/libc/sys/sh/sys/_types.h
    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.17 to build-binutils-sh-elf-2.17...
    mkdir -p build-binutils-sh-elf-2.17
    > /home/cmiller/dc/kos/utils/dc-chain/logs/build-binutils-sh-elf-2.17.log
    cd build-binutils-sh-elf-2.17; ../binutils-2.17/configure --target=sh-elf --prefix=/home/cmiller/dc/sh-elf >> /home/cmiller/dc/kos/utils/dc-chain/logs/build-binutils-sh-elf-2.17.log 2>&1
    make: *** [build-sh4-binutils] Error 1
    I checked logs/build-binutils-sh-elf-2.17.log and found:
    creating cache ./config.cache
    checking host system type... x86_64-unknown-linux-gnu
    checking target system type... sh-unknown-elf
    checking build system type... x86_64-unknown-linux-gnu
    checking for a BSD compatible install... /usr/bin/install -c
    checking whether ln works... yes
    checking whether ln -s works... yes
    checking for gcc... gcc-3.4
    checking whether the C compiler (gcc-3.4 ) works... no
    configure: error: installation or configuration problem: C compiler cannot create executables.
    If I try to run make again, I get prompted with:
    cd gcc-3.4.6; patch -p1 < /home/cmiller/dc/kos/utils/dc-chain/patches/gcc-3.4.6.diff
    The next patch would create the file gcc/config/sh/kos.h,
    which already exists! Assume -R? [n]
    Apply anyway? [n]
    Skipping patch.
    1 out of 1 hunk ignored -- saving rejects to file gcc/config/sh/kos.h.rej
    patching file gcc/config/sh/t-sh
    Reversed (or previously applied) patch detected! Assume -R? [n]
    Over and over again and no errors are logged.

    Sorry for the long post, but does anyone have any suggestions? Is there something blatantly obvious I have missed? I get very similar errors on both of my Macs.

    EDIT:

    I have tried this both logged in as a user and as root, and I get the same errors.
    Last edited by Quetzalcoatlus; October 24th, 2008 at 18:56.

  2. #2

    Default

    On my Mac and my Linux box, I started over and tried running make without the CC=gcc-3.4.

    On my Mac, it ran for a few minutes, but got an error. The result was:

    Horus:dc-chain chance$ make
    cd gcc-3.4.6; patch -p1 < /Volumes/Data/Projects/Clouds/dc/kos/utils/dc-chain/patches/gcc-3.4.6.diff
    patching file gcc/config/sh/kos.h
    patching file gcc/config/sh/t-sh
    patching file gcc/config.gcc
    patching file libstdc++-v3/config/cpu/generic/atomicity.h
    patching file libstdc++-v3/config/cpu/sh4/atomicity.h
    patching file libstdc++-v3/config/cpu/sh4/atomic_word.h
    patching file libstdc++-v3/configure
    patching file libstdc++-v3/crossconfig.m4
    cd newlib-1.12.0; patch -p1 < /Volumes/Data/Projects/Clouds/dc/kos/utils/dc-chain/patches/newlib-1.12.0-kos.diff
    patching file config-ml.in
    patching file newlib/configure.host
    patching file newlib/libc/sys/sh/ftruncate.c
    patching file newlib/libc/sys/sh/sys/_types.h
    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.17 to build-binutils-sh-elf-2.17...
    mkdir -p build-binutils-sh-elf-2.17
    > /Volumes/Data/Projects/Clouds/dc/kos/utils/dc-chain/logs/build-binutils-sh-elf-2.17.log
    cd build-binutils-sh-elf-2.17; ../binutils-2.17/configure --target=sh-elf --prefix=/Volumes/Data/Projects/Clouds/dc/sh-elf >> /Volumes/Data/Projects/Clouds/dc/kos/utils/dc-chain/logs/build-binutils-sh-elf-2.17.log 2>&1
    make -C build-binutils-sh-elf-2.17 all install DESTDIR= >> /Volumes/Data/Projects/Clouds/dc/kos/utils/dc-chain/logs/build-binutils-sh-elf-2.17.log 2>&1
    make: *** [build-sh4-binutils] Error 2
    The Mac's error log was 1845 lines long. It can be found at: http://dotdotcomorg.net/macerror.txt, but obviously something went seriously wrong.

    However, it ran perfectly in Linux (when logged in as root) and I managed to build the rest of the environment!

    So, conclusion: use make, not make CC=gcc-3.4 while logged in as root on Linux.
    Last edited by Quetzalcoatlus; October 24th, 2008 at 19:57.

  3. #3

    Default

    Got it to work in OS X, thanks to a tip from BlueCrab. Simply delete all .m files found within binutils.
    Last edited by Quetzalcoatlus; October 25th, 2008 at 20:43.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •