Problem Building mcf5206elite BSP under Cygwin

Steve Strobel steve at link-comm.com
Thu Oct 30 18:20:43 UTC 2003


Thanks, Joel, for the suggestion to check that I am using bash.  I tried the following:

My copy of "sh" doesn't seem to support the "--version" option.

        Steve at Steve ~
        $ /bin/sh --version
        Illegal option --

I can run "sh", but it appears to use a terminal emulation that my console window doesn't support.  That would indicate to me that I am not normally running "sh" from the console (but I don't know what "make" calls internally, which probably matters more).

        Steve at Steve ~
        $ /bin/sh
        \[\033]0;\w\007
        \033[32m\]\u@\h \[\033[33m\w\033[0m\]
        $ exit

Bash responds to the "--version" option fine.

        Steve at Steve ~
        $ /bin/bash --version
        GNU bash, version 2.05b.0(1)-release (i686-pc-cygwin)
        Copyright (C) 2002 Free Software Foundation, Inc.

I can run bash inside of my normal shell (which may also be bash):

        Steve at Steve ~
        $ /bin/bash

        Steve at Steve ~
        $

Running inside that second shell, I tried to build again:

        cd /rtems/build-4.6.0pre5try2
        rm -r *
        export PATH=$PATH:/opt/rtems-4.6/bin
        ../rtems-4.6.0pre5/configure --target=m68k-rtems
        make RTEMS_BSP=mcf5206elite

It fails with a "build_alias" problem as before, though in a different directory (I have had it fail in various directories before with no apparent reason - it seems that whatever is wrong with "build_alias" is inconsistent):

        [snip]
        configure: configuring in lib/libcpu
        configure: running /bin/bash '../../../../../../rtems-4.6.0pre5/c/src/lib/libcpu/configure' --prefix=/opt/rtems-4.6  '--prefix=/opt/rtems-4.6' '--host=m68k-rtems' '--build=i686-pc-cygwin' '--target=m68k-rtems' '--with-target-subdir=m68k-rtems' '--exec-prefix=/opt/rtems-4.6/m68k-rtems' 'build_alias=i686-pc-cygwin' 'host_alias=m68k-rtems' 'target_alias=m68k-rtems' 'RTEMS_BSP=mcf5206elite' 'RTEMS_CPU_MODEL=mcf5206' 'RTEMS_BSP_FAMILY=mcf5206elite' 'CPU_CFLAGS=-m5200' 'CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer' --cache-file=/dev/null --srcdir=../../../../../../rtems-4.6.0pre5/c/src/lib/libcpu
        configure: error: invalid variable name: build_alias
        configure: error: /bin/bash '../../../../../../rtems-4.6.0pre5/c/src/lib/libcpu/
        configure' failed for lib/libcpu
        make[2]: *** [mcf5206elite] Error 1
        make[2]: Leaving directory `/rtems/build-4.6.0pre5try2/m68k-rtems/c'
        make[1]: *** [all-recursive] Error 1
        make[1]: Leaving directory `/rtems/build-4.6.0pre5try2/m68k-rtems/c'
        make: *** [all-recursive] Error 1

Interestingly, running "make RTEMS_BSP=mcf5206elite" a second time after such a failure doesn't fail in the same way (whether or not I am running inside a second layer of the shell).  It seems that the dependency checks that make does don't realize that it failed, and sometimes go on to the next stage.  

To summarize, I think my shell has been bash all along.  My consistent problem is that make fails with a "build_alias" error at some point.  Where that point is varies, and when I run make again after a failure, what it does next varies.  I am starting to think that there is something wrong with my cygwin installation.  I will try updating it and repeating the process.  Any other ideas of what to try would be greatly appreciated.  Thanks.

Steve

P.S.  This time, running "make RTEMS_BSP=mcf5206elite" again after getting the "build_alias" error shown above caused it to install a bunch of stuff then fail, like this:

        [snip]
        /usr/bin/install -c -m 644 ../../../../../../rtems-4.6.0pre5/c/src/../../cpukit/libnetworking/sys/syslog.h ../../../.././mcf5206elite/lib/include/sys/syslog.h
        /usr/bin/install -c -m 644 ../../../../../../rtems-4.6.0pre5/c/src/../../cpukit/libnetworking/sys/systm.h ../../../.././mcf5206elite/lib/include/sys/systm.h
        /usr/bin/install -c -m 644 ../../../../../../rtems-4.6.0pre5/c/src/../../cpukit/libnetworking/sys/ttydefaults.h ../../../.././mcf5206elite/lib/include/sys/ttydefaults.h
        [snip]
        Making preinstall in optman
        make[5]: Entering directory `/rtems/build-4.6.0pre5try2/m68k-rtems/c/mcf5206elite/optman'
        make[5]: Nothing to be done for `preinstall'.
        make[5]: Leaving directory `/rtems/build-4.6.0pre5try2/m68k-rtems/c/mcf5206elite/optman'
        Making preinstall in lib/libcpu
        make[5]: Entering directory `/rtems/build-4.6.0pre5try2/m68k-rtems/c/mcf5206elite/lib/libcpu'
        make[5]: *** No rule to make target `preinstall'.  Stop.
        make[5]: Leaving directory `/rtems/build-4.6.0pre5try2/m68k-rtems/c/mcf5206elite/lib/libcpu'
        make[4]: *** [preinstall-recursive] Error 1
        make[4]: Leaving directory `/rtems/build-4.6.0pre5try2/m68k-rtems/c/mcf5206elite'
        make[3]: *** [preinstall-stamp] Error 2
        make[3]: Leaving directory `/rtems/build-4.6.0pre5try2/m68k-rtems/c/mcf5206elite'
        make[2]: *** [all-recursive] Error 1
        make[2]: Leaving directory `/rtems/build-4.6.0pre5try2/m68k-rtems/c/mcf5206elite'
        make[1]: *** [all-recursive] Error 1
        make[1]: Leaving directory `/rtems/build-4.6.0pre5try2/m68k-rtems/c'
        make: *** [all-recursive] Error 1

Running "make RTEMS_BSP=mcf5206elite" a third time skips the installing steps (which makes sense when they have already been done) and again fails on the preinstall step.  At least that is consistent.
        
P.P.S.  Other information about my shell:

        "MAKE_MODE=unix" in my environment
        ~ seems to work (I can "cd /" then "ls ~" and see my home directory).

Thanks again for any pointers.


At 08:26 PM 10/29/2003 -0600, you wrote:
>Try /bin/sh --version and see what it prints out.  It needs to be bash and by default
>often isn't.
>
>--joel
>
>Steve Strobel wrote:
>
>>I am having trouble building the mcf5206elite BSP under Cygwin.  I had trouble building it with 4.6.0pre4 a week or so ago, then had to take a break to work on a different project.  4.6.0pre5 was released in the meantime, so when I got to come back to this project, I downloaded the new tools and RTEMS source and started over.  I installed everything with the following script:
>>
>>        #!/bin/sh
>>        cd /
>>        mkdir rtems
>>        cd rtems
>>        tar -xjf /temp/rtems-4.6.0pre5.tar.bz2                          
>>        tar -xjf /temp/examples-4.6.0pre5.tar.bz2                       
>>        tar -xjf /temp/network-demos-4.6.0pre5.tar.bz2  
>>        cd /
>>        tar -xjf /temp/rtems-4.6-autoconf-rtems-2.57-1.tar.bz2
>>        tar -xjf /temp/rtems-4.6-automake-rtems-1.7.2-1.tar.bz2
>>        tar -xjf /temp/rtems-4.6-m68k-rtems-binutils-2.13.2.1-1.tar.bz2                         
>>        tar -xjf /temp/rtems-4.6-m68k-rtems-c++-gcc3.2.3newlib1.11.0-1.tar.bz2  tar -xjf /temp/rtems-4.6-m68k-rtems-gcc-gcc3.2.3newlib1.11.0-1.tar.bz2  
>>        tar -xjf /temp/rtems-4.6-m68k-rtems-gdb-5.2-1.tar.bz2
>>        tar -xjf /temp/rtems-4.6-rtems-base-binutils-2.13.2.1-1.tar.bz2
>>        tar -xjf /temp/rtems-4.6-rtems-base-gcc-gcc3.2.3newlib1.11.0-1..tar.bz2
>>        tar -xjf /temp/rtems-4.6-rtems-base-gdb-5.2-1.tar.bz2
>>
>>Then, following the Getting Started guide, I...
>>
>>Set the path to the tools:
>>        export PATH=$PATH:/opt/rtems-4.6/bin
>>
>>Tested the tool installation (this worked fine):
>>        m68k-rtems-gcc -v -S f.c
>>        m68k-rtems-gcc -v -c f.c
>>
>>Made a build directory and tried to configure RTEMS:
>>
>>        cd /rtems
>>        mkdir build-4.6.0pre5
>>        cd build-4.6.0pre5
>>        ../rtems-4.6.0pre5/configure --target=m68k-rtems \
>>                --disable-posix --disable-networking \
>>                --disable-cxx --enable-rtemsbsp=mcf5206elite \
>>                --prefix=/opt/rtems-4.6/bin
>>
>>It appeared to finish successfully, so I ran "make all".  It
>>ran for a while, but failed as follows:
>>
>>       configure: configuring in libcsupport
>>       configure: running /bin/bash '../../../../../../rtems-4.6.0pre5/c/src/../../cpuk
>>       it/libcsupport/configure' --prefix=/opt/rtems-4.6/bin  '--prefix=/opt/rtems-4.6/
>>       bin' '--host=m68k-rtems' '--build=i686-pc-cygwin' '--target=m68k-rtems' '--disab
>>       le-posix' '--disable-networking' '--disable-cxx' '--with-target-subdir=m68k-rtem
>>       s' '--exec-prefix=/opt/rtems-4.6/bin/m68k-rtems' 'build_alias=i686-pc-cygwin' 'h
>>       ost_alias=m68k-rtems' 'target_alias=m68k-rtems' 'RTEMS_BSP=mcf5206elite' 'RTEMS_
>>       CPU_MODEL=mcf5206' 'RTEMS_BSP_FAMILY=mcf5206elite' 'CPU_CFLAGS=-m5200' 'CFLAGS_O
>>       PTIMIZE_V=-O4 -fomit-frame-pointer' '--with-project-root=../../' '--enable-rtems
>>       bsp=mcf5206elite' '--cache-file=/dev/null' '--srcdir=../../../../../rtems-4.6.0p
>>       re5/c/src/../../cpukit' --cache-file=/dev/null --srcdir=../../../../../../rtems-
>>       4.6.0pre5/c/src/../../cpukit/libcsupport
>>       configure: error: invalid variable name: build_alias
>>       configure: error: /bin/bash '../../../../../../rtems-4.6.0pre5/c/src/../../cpuki
>>       t/libcsupport/configure' failed for libcsupport
>>       configure: error: /bin/bash '../../../../../rtems-4.6.0pre5/c/src/../../cpukit/c
>>       onfigure' failed for ../../cpukit
>>       make[2]: *** [mcf5206elite] Error 1
>>       make[2]: Leaving directory `/rtems/build-4.6.0pre5/m68k-rtems/c'
>>       make[1]: *** [all-recursive] Error 1
>>       make[1]: Leaving directory `/rtems/build-4.6.0pre5/m68k-rtems/c'
>>       make: *** [all-recursive] Error 1
>>
>>At that time, the libcsupport directory (C:\cygwin\rtems\build-4.6.0pre5\m68k-rtems\c\mcf5206elite\exec\libcsupport) was empty.
>>
>>In other directories, the file config.log has a line like the following
>>        build_alias='i686-pc-cygwin'
>>and makefile has        build_alias = i686-pc-cygwin
>>
>>I tried to dig through the      '../../../../../../rtems-4.6.0pre5/c/src/../../cpukit/libcsupport/configure'
>>file and the configure.ac file that it comes from but I don't understand it well
>>enough to figure out what the problem with build-alias might be.
>>
>>I then created a different build directory and tried a less complex configure
>>command, as follows:
>>
>>        ../rtems-4.6.0pre5/configure --target=m68k-rtems
>>        make RTEMS_BSP=mcf5206elite
>>
>>It failed in exactly the same way.  I am missing a step or doing something wrong?
>>Does my cygwin setup have a problem?  Any other ideas?  Thanks for any help
>>you can give me.
>>
>>Steve
>>---
>>Steve Strobel                           WWW: http://www.link-comm.com
>>Link Communications, Inc.               Phone: (406) 245-5002 ext 102
>>MailTo:steve at link-comm.com              Fax: (406) 245-4889
>>
>> 
>
>

---
Steve Strobel                           WWW: http://www.link-comm.com
Link Communications, Inc.               Phone: (406) 245-5002 ext 102
MailTo:steve at link-comm.com              Fax: (406) 245-4889




More information about the users mailing list