Page 2 of 5 FirstFirst 1234 ... LastLast
Results 16 to 30 of 65

Thread: MIPS Tivo cross compiler on cygwin

  1. #16
    Join Date
    Jun 2001
    Posts
    3,108
    Originally posted by InterMurph
    Next problem:

    On line 36, you get gcc-3.3.2.tar.gz.

    On line 124, you are trying to extract gcc-3.3.2.targ.bz2 via bzip2: 'tar xjf gcc-$GCC_VER.tar.bz2'

    I replaced it with 'tar xfz gcc-$GCC_VER.tar.gz' and it seems to work. Starting again...
    you will also want to change the if statement earlier in the file to ensure that it checks for the existance of the .gz file, not the bz2 file.

    anyone else having a problem with the declare line in the script? i am getting the following error:
    build_tivo_x_compiler_cygwin.sh: 65: Syntax error: "(" unexpected
    the offending lines are
    Code:
    declare -a files
    files=(binutils-$BINUTILS_VER/ltconfig binutils-$BINUTILS_VER/ltmain.sh \
    	binutils-$BINUTILS_VER/ltmain.sh.dso binutils-$BINUTILS_VER/ltcf-c.sh \
    	binutils-$BINUTILS_VER/ltcf-cxx.sh binutils-$BINUTILS_VER/ltcf-gcj.sh)
    Step one: search button!
    Silly Wabbit, guides are for kids

  2. #17
    Join Date
    Dec 2003
    Posts
    9
    The script has to be run under bash not sh, change the first line to

    #!/bin/bash

    or just invoke the script as

    bash build_tivo_x_compiler.sh

    that should solve the declare problems.

    My compile still doesn't succeed though, failed building gcc, I haven't tried to work through this yet...

    /cygdrive/c/Temp/tivocompile3/build-gcc/gcc/xgcc -B/cygdrive/c/Temp/tivocompile3/build-gcc/gcc/ -B/cygdrive/c/progra~1/T
    ivoGcc/mips-TiVo-linux/bin/ -B/cygdrive/c/progra~1/TivoGcc/mips-TiVo-linux/lib/ -isystem /cygdrive/c/progra~1/TivoGcc/mi
    ps-TiVo-linux/include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
    -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gc
    c-3.3.2/gcc -I../../gcc-3.3.2/gcc/. -I../../gcc-3.3.2/gcc/config -I../../gcc-3.3.2/gcc/../include -fexceptions -c ../../
    gcc-3.3.2/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
    In file included from ../../gcc-3.3.2/gcc/unwind-dw2.c:26:
    ../../gcc-3.3.2/gcc/unwind-pe.h: In function `size_of_encoded_value':
    ../../gcc-3.3.2/gcc/unwind-pe.h:76: warning: implicit declaration of function `abort'
    In file included from gthr-default.h:1,
    from ../../gcc-3.3.2/gcc/gthr.h:98,
    from ../../gcc-3.3.2/gcc/unwind-dw2.c:28:
    ../../gcc-3.3.2/gcc/gthr-posix.h:37:21: pthread.h: No such file or directory
    ../../gcc-3.3.2/gcc/gthr-posix.h:38:20: unistd.h: No such file or directory
    In file included from gthr-default.h:1,
    from ../../gcc-3.3.2/gcc/gthr.h:98,
    from ../../gcc-3.3.2/gcc/unwind-dw2.c:28:
    ../../gcc-3.3.2/gcc/gthr-posix.h: At top level:
    ../../gcc-3.3.2/gcc/gthr-posix.h:40: error: parse error before "__gthread_key_t"
    ../../gcc-3.3.2/gcc/gthr-posix.h:40: warning: type defaults to `int' in declaration of `__gthread_key_t'
    ../../gcc-3.3.2/gcc/gthr-posix.h:40: warning: data definition has no type or storage class
    ../../gcc-3.3.2/gcc/gthr-posix.h:41: error: parse error before "__gthread_once_t"


    ... lots of gory warning/error details ommitted...

    make[2]: *** [libgcc/./unwind-dw2.o] Error 1
    make[2]: Leaving directory `/cygdrive/c/Temp/tivocompile3/build-gcc/gcc'
    make[1]: *** [libgcc.a] Error 2
    make[1]: Leaving directory `/cygdrive/c/Temp/tivocompile3/build-gcc/gcc'
    make: *** [all-gcc] Error 2
    **** gcc build failed
    -Jeff

  3. #18
    Join Date
    Jul 2003
    Posts
    35
    Originally posted by jeffdoering
    My compile still doesn't succeed though, failed building gcc, I haven't tried to work through this yet...
    Do you get any output if you run:

    ls -la /cygdrive/c/progra~1/TivoGcc/mips-TiVo-linux/include/pthread.h
    ls -la /cygdrive/c/progra~1/TivoGcc/mips-TiVo-linux/include/unistd.h

    They were supposed to be extracted and copied from usr.local.mips-tivo.tar.bz2.

  4. #19
    Join Date
    Jun 2001
    Posts
    3,108
    attached is the modified script with the suggestions and such done. It built fine (havent tested it) except for the fact that it bombed on building insight with the following errors:

    Code:
    running /bin/sh ../../../insight-6.0/tcl/cygwin/configure  --build=i686-pc-cygwi
    n --host=i686-pc-cygwin --target=mips-TiVo-linux --with-stabs '--prefix=/cygdriv
    e/c/progra~1/TivoGcc' --cache-file=../.././config.cache --srcdir=../../../insigh
    t-6.0/tcl/cygwin
    loading cache ../.././config.cache
    checking host system type... i686-pc-cygwin
    checking target system type... mips-TiVo-linux-gnu
    checking build system type... i686-pc-cygwin
    checking for a BSD compatible install... (cached) /usr/bin/install -c
    [snip]
    checking for a BSD compatible install... /usr/bin/install -c
    updating cache ../.././config.cache
    creating ./config.status
    creating Makefile
    creating tclConfig.sh
    make[1]: Entering directory `/home/Jon/build-insight/tcl'
    make[2]: Entering directory `/home/Jon/build-insight/tcl/win'
    gcc -c -g -O2 -Wall -Wconversion  -I"../../../insight-6.0/tcl/win/../generic" -I
    "../../../insight-6.0/tcl/win" -mwin32   -DHAVE_NO_SEH=1 -DEXCEPTION_DISPOSITION
    =int   -DBUILD_tcl "../../../insight-6.0/tcl/win/../generic/tclCmdAH.c" -o tclCm
    dAH.o
    In file included from ../../../insight-6.0/tcl/win/tclWinPort.h:72,
                     from ../../../insight-6.0/tcl/generic/tclPort.h:22,
                     from ../../../insight-6.0/tcl/generic/tclCmdAH.c:18:
    /usr/include/w32api/winsock2.h:95:2: warning: #warning "fd_set and associated ma
    cros have been defined in sys/types.      This may cause runtime problems with W
    32 sockets"
    ../../../insight-6.0/tcl/generic/tclCmdAH.c: In function `Tcl_FileObjCmd':
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:806: error: syntax error before nume
    ric constant
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:901: error: duplicate case value
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:878: error: previously used here
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `0' not in
     enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `1' not in
     enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `2' not in
     enumerated type `options'
    [snip]
    value `13' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `14' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `15' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `16' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `17' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `18' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `19' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `20' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `21' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `22' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `23' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `24' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `25' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `26' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `27' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `28' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `29' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `30' not i
    n enumerated type `options'
    ../../../insight-6.0/tcl/generic/tclCmdAH.c:1374: warning: case value `31' not i
    n enumerated type `options'
    make[2]: *** [tclCmdAH.o] Error 1
    make[2]: Leaving directory `/home/Jon/build-insight/tcl/win'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/home/Jon/build-insight/tcl'
    make: *** [all-tcl] Error 2
    **** insight build failed
    i noticed that insight 5.2-5.3 had build info for cygwin (http://sources.redhat.com/insight/cygwin.html), had trouble finding info on 6.0 specifically
    Step one: search button!
    Silly Wabbit, guides are for kids

  5. #20
    Join Date
    Jul 2003
    Posts
    35
    The insight problem happened because FILE_EXISTS was already defined in some include file. To fix it, manually insert

    #undef FILE_EXISTS

    before

    int
    Tcl_FileObjCmd(dummy, interp, objc, objv)
    ClientData dummy; /* Not used. */
    Tcl_Interp *interp; /* Current interpreter. */
    int objc; /* Number of arguments. */
    Tcl_Obj *CONST objv[]; /* Argument objects. */

    in file tcl/generic/tclCmdAH.c

  6. #21
    Join Date
    Dec 2003
    Location
    Gloucester, MA
    Posts
    30
    I am down to the same last problem as mrblack51; the insight problem.

    I can only add the #undef to the C file after the insight package has been downloaded and extracted. So that means that I have to run the script once, let it fail, modify the C file, then run it again.

    Is there a way to fix this problem via a command line option to make, or something like that?

    I'm so close!

  7. #22
    Join Date
    Jun 2001
    Posts
    3,108
    Originally posted by InterMurph
    I am down to the same last problem as mrblack51; the insight problem.

    I can only add the #undef to the C file after the insight package has been downloaded and extracted. So that means that I have to run the script once, let it fail, modify the C file, then run it again.

    Is there a way to fix this problem via a command line option to make, or something like that?

    I'm so close!
    you can automate it by using the patch command with the proper arguments or whatever, but im not firmiliar enough to figure it out right now.

    in the short term, you can let it fail, patch the command, comment out the tar line for the insight archive in the script and re-run. its terribly inefficient, but im feeling lazy

    now, how about getting ncurses working?
    Step one: search button!
    Silly Wabbit, guides are for kids

  8. #23
    Join Date
    Dec 2003
    Location
    Gloucester, MA
    Posts
    30
    OK, I finally got the '**** completed install with no errors ****' message.

    I started with the second script that tmesis posted, then made some bug-fixing modifications. Here is the diff between tmesis' second script and the one that worked for me:
    Code:
    15c15
    < export PREFIX=/cygdrive/c/progra~1/TivoGcc
    ---
    > export PREFIX=/usr/tcc
    34c34
    < if [ ! -f gcc-$GCC_VER.tar.bz2 ]; then
    ---
    > if [ ! -f gcc-$GCC_VER.tar.gz ]; then
    51c51
    <   wget "http://prdownloads.sourceforge.net/tivoutils/usr.local.mips-tivo.tar.bz2?use_mirror=unc"
    ---
    >   wget "http://unc.dl.sourceforge.net/sourceforge/tivoutils/usr.local.mips-tivo.tar.bz2"
    91c91
    < rm -r $PREFIX/include
    ---
    > rm -rf $PREFIX/include
    93c93
    < rm -r $PREFIX/lib
    ---
    > rm -rf $PREFIX/lib
    95,97c95,97
    < rm -r usr
    < rm -r ${PREFIX}/${TARGET}/include
    < rm -r ${PREFIX}/${TARGET}/lib
    ---
    > rm -rf usr
    > rm -rf ${PREFIX}/${TARGET}/include
    > rm -rf ${PREFIX}/${TARGET}/lib
    124c124,125
    < tar xjf gcc-$GCC_VER.tar.bz2
    ---
    > tar xfz gcc-$GCC_VER.tar.gz
    > 
    168c169
    < $TARGET-gcc -v
    ---
    > $PREFIX/bin/$TARGET-gcc -v
    175,176c176,177
    < $TARGET-gcc -o hello1 hello.c || { echo "*** gcc verification failed"; exit; }
    < $TARGET-strip hello1
    ---
    > $PREFIX/bin/$TARGET-gcc -o hello1 hello.c || { echo "*** gcc verification failed"; exit; }
    > $PREFIX/bin/$TARGET-strip hello1
    178c179
    < $TARGET-strings hello1 | grep lib
    ---
    > $PREFIX/bin/$TARGET-strings hello1 | grep lib
    186c187
    < $TARGET-g++ -o hello2 hello.cpp -static-libgcc -L. || \
    ---
    > $PREFIX/bin/$TARGET-g++ -o hello2 hello.cpp -static-libgcc -L. || \
    188c189
    < $TARGET-strip hello2
    ---
    > $PREFIX/bin/$TARGET-strip hello2
    190c191
    < $TARGET-strings hello2 | grep lib
    ---
    > $PREFIX/bin/$TARGET-strings hello2 | grep lib
    223,224c224,225
    < $TARGET-strip gdbreplay
    < $TARGET-strip gdbserver
    ---
    > $PREFIX/bin/$TARGET-strip gdbreplay
    > $PREFIX/bin/$TARGET-strip gdbserver
    228c229
    < tar xjf insight-$INSIGHT_VER.tar.bz2
    ---
    > #tar xjf insight-$INSIGHT_VER.tar.bz2
    Here's what I changed:
    • Changed my output directory to /usr/tcc
    • Check for/download gcc-$GCC_VER.tar.gz instead of gcc-$GCC_VER.tar.bz2
    • Specify the correct URL for usr.local.mips-tivo.tar.bz2
    • Change rm options from '-r' to '-rf', since some extracted files were marked read-only, and I was being prompted to remove them
    • Execute 'tar xfz gcc-$GCC_VER.tar.gz' (z = via gzip) instead of 'xjf gcc-$GCC_VER.tar.bz2' (j = via bzip2)
    • Replaced numerous '$TARGET-gcc' with '$PREFIX/bin/$TARGET-gcc'


    The only other problem I had is the insight problem discussed above. I ran this script once, then added the #undef to the C file, then commented out the ''tar xjf insight-$INSIGHT_VER.tar.bz2' command, then ran it again. It re-did many things, but it was worth the wait

    I have attached my version of the script.

    Thanks.

  9. #24
    Join Date
    Aug 2003
    Posts
    2,149
    Here's the last few lines of my try at installing using intermurph's file above. Ideas?

    Also, the entire output is attached.

    make[1]: Entering directory `/usr/tcc/build-binutils/etc'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/usr/tcc/build-binutils/etc'
    Configuring in gas
    **** binutils compile failed

    [EDIT]
    I missed a little output from the bash window...
    configure: error: invalid feature name: shared
    make: *** [configure-gas] Error 1

    ...And there's nothing in the /usr/tcc/build-binutils/gas directory

    NutKase
    Last edited by NutKase; 12-24-2003 at 05:36 PM.
    "God, and DealDataBase, help those that help themselves." --Shamelessly stolen from psxboy
    ------------------------------------------------
    2 each, SA S2 287hr 7.2.1a's with Lifetime.
    Hacks: 1 Manually Monte'd -140, Bash,Telnet,FTP,TivoWebPlus,
    Superpatch-67all Unscrambled/HMO,MFS_FTP Ver. N,TyTools, tivoserver
    Fully hacked SA S1

  10. #25
    Join Date
    Dec 2003
    Posts
    9
    Hmm... I don't know the solution, I took a look at my logfile and it looks like:

    make[1]: Entering directory `/cygdrive/c/Temp/tivocompile3/build-binutils/etc'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/cygdrive/c/Temp/tivocompile3/build-binutils/etc'
    Configuring in gas
    configure: loading cache .././config.cache
    checking build system type... (cached) i686-pc-cygwin
    checking host system type... (cached) i686-pc-cygwin
    checking target system type... (cached) mips-TiVo-linux-gnu
    checking for i686-pc-cygwin-gcc... (cached) gcc

    ...
    in that section. Why did your final error that you added from the bash window not show up in the log? Did you only redirect stdout to a file? I use the following to redirect both stdout and stderr to a single log for the build:

    (in a bash window)

    build_tivo_x_compiler.sh 1>build.log 2>&1
    Anyway, it looks like config.log, config.status, and config.cache files from binutils/ and binutils/etc/ might be interesting (you said that binutils/gas/ was empty correct?).

  11. #26
    Join Date
    Dec 2003
    Posts
    9

    Anyone compiling the kernel under cygwin?

    I did get my cross-compiler working based on the hints in this thread.

    Has anyone gotten this set up so they can compile the kernel? I started to look at it, but all sorts of variables need to be defined to get anywhere... I saw some mention on alt.org of setting ROOT (referenced in ismdefs) to point to the path to cmd\root\include\make\commondefs from the 2.0 Tivo command sources to get started, but I didn't make it past looking at the files.

    Does anyone have kernel compilation working under cygwin, any hints?

  12. #27
    Join Date
    Aug 2003
    Posts
    2,149
    Started over from scratch. Now I don't even get as far as the 'gas' error.

    I get this error:

    checking whether to enable maintainer-specific portions of Makefiles... no
    updating cache ./config.cache
    creating ./config.status
    creating Makefile
    Configuring in libiberty
    configure: error: invalid feature name: shared
    make: *** [configure-libiberty] Error 1
    **** binutils compile failed

    and I installed everything from cygwin. Ideas?

    NutKase
    Last edited by NutKase; 12-26-2003 at 05:39 PM.
    "God, and DealDataBase, help those that help themselves." --Shamelessly stolen from psxboy
    ------------------------------------------------
    2 each, SA S2 287hr 7.2.1a's with Lifetime.
    Hacks: 1 Manually Monte'd -140, Bash,Telnet,FTP,TivoWebPlus,
    Superpatch-67all Unscrambled/HMO,MFS_FTP Ver. N,TyTools, tivoserver
    Fully hacked SA S1

  13. #28
    Join Date
    Sep 2003
    Posts
    52
    Quote Originally Posted by NutKase
    and I installed everything from cygwin. Ideas?
    Install a real OS ??

    Tux Man

  14. #29
    Join Date
    Dec 2003
    Posts
    9
    It looks like the "--enable-shared" option passed to configure is generating errors (look for config.status files that include the command line used to invoke configure).

    The configure scripts have a section like:
    -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
    { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    eval "enable_${ac_feature}=no" ;;

    -enable-* | --enable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
    { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
    *=*) ;;
    *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;
    it looks like "shared" is failing the check that is just suppose to confirm that it includes legal shell variable characters (which it obviously does), to me that suggests that something is going wrong with sed or test. You may want to play around with executing:

    if test -n "`echo shared | sed 's/[-a-zA-Z0-9_]//g'`"; then echo failure found; fi
    this should succeed. Add a "." after shared and it should fail:

    if test -n "`echo shared. | sed 's/[-a-zA-Z0-9_]//g'`"; then echo failure found; fi
    I'm afraid I really don't know why this isn't working in your environment, but I'd check your configure scripts, etc and see if things seem similar to what I'm describing...

  15. #30
    Join Date
    Aug 2003
    Posts
    2,149
    Quote Originally Posted by Tux Man
    Install a real OS ??

    Tux Man
    Yeah, I've been running a home lan on linux from RH 5.3 to MDK 9.0 so I don't want to hear it. I don't have it up now and can't find my 9.0 disks.

    Anyway, I'm tired of rebooting into it and since most of my other 'tools' aren't linux right now I'd rather get Cygwin running. It's my choice and if you don't want to help - don't.

    NutKase
    "God, and DealDataBase, help those that help themselves." --Shamelessly stolen from psxboy
    ------------------------------------------------
    2 each, SA S2 287hr 7.2.1a's with Lifetime.
    Hacks: 1 Manually Monte'd -140, Bash,Telnet,FTP,TivoWebPlus,
    Superpatch-67all Unscrambled/HMO,MFS_FTP Ver. N,TyTools, tivoserver
    Fully hacked SA S1

Posting Permissions

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