From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22798 invoked by alias); 22 Feb 2008 07:15:37 -0000 Received: (qmail 22781 invoked by uid 22791); 22 Feb 2008 07:15:34 -0000 X-Spam-Check-By: sourceware.org Received: from pop132.ocn.ne.jp (HELO pop132.ocn.ne.jp) (60.37.31.215) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 22 Feb 2008 07:14:52 +0000 Received: from ariga (p1012-ipbf3109marunouchi.tokyo.ocn.ne.jp [122.29.52.12]) by pop132.ocn.ne.jp (OCN) with SMTP id m1M7EmXO015198 for ; Fri, 22 Feb 2008 16:14:49 +0900 (JST) Message-ID: <001001c87522$98475a50$1c0110ac@ariga> From: "ariga masahiro" To: References: <001001c85189$461611c0$1c0110ac@ariga> <4782BE28.8030706@mlbassoc.com> <000601c8750f$5ffb19b0$1c0110ac@ariga> Date: Fri, 22 Feb 2008 07:15:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="ISO-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] How to re-install newly compiled gnutools X-SW-Source: 2008-02/txt/msg00155.txt.bz2 Hello everyone, I am sorry to sending two mails at one time. But I am encountered next phenomoinon, and I think it is concerned with my first inqury mail, So I mail this as a postscript. Correct or not, I procceede to configure-build using /usr/local/sh-elf/ installed by (1) way. Of course I added /usr/local/sh-elf/bin to PATH and remained gnutools directory as it is. As I said I succeeded configure-build using target and "net" and made libextras.a. But when I tried to link application program,(I append Makefile below) I was encountered next error. -- error log /opt/ecoscvs_l/ecos/packages/net/bsd_tcpip/current/src/sys/net/route.c:731: unde fined reference to `_cyg_panic' /opt/ecoscvs_l/ecos/packages/net/bsd_tcpip/current/src/sys/net/route.c:731: unde fined reference to `_cyg_net_malloc' /opt/ecoscvs_l/ecos/packages/net/bsd_tcpip/current/src/sys/net/route.c:731: unde fined reference to `_cyg_net_free' /ecos-c/cygwin/home/LINK/ecoscvs_l_net_20080221-sh-elf-gcc4.1.1/untitled1_instal l/lib/libtarget.a(net_bsd_tcpip_route.o): In function `cyg_rt_setgate': /opt/ecoscvs_l/ecos/packages/net/bsd_tcpip/current/src/sys/net/route.c:1016: und efined reference to `_cyg_net_malloc' /opt/ecoscvs_l/ecos/packages/net/bsd_tcpip/current/src/sys/net/route.c:1016: und efined reference to `_cyg_net_free' /ecos-c/cygwin/home/LINK/ecoscvs_l_net_20080221-sh-elf-gcc4.1.1/untitled1_instal l/lib/libtarget.a(net_bsd_tcpip_route.o): In function `cyg_route_init': /opt/ecoscvs_l/ecos/packages/net/bsd_tcpip/current/src/sys/net/route.c:105: unde fined reference to `_cyg_rn_init' /ecos-c/cygwin/home/LINK/ecoscvs_l_net_20080221-sh-elf-gcc4.1.1/untitled1_instal l/lib/libtarget.a(net_bsd_tcpip_uipc_domain.o): In function `pffasttimo': /opt/ecoscvs_l/ecos/packages/net/bsd_tcpip/current/src/sys/kern/uipc_domain.c:27 7: undefined reference to `_cyg_hz' /ecos-c/cygwin/home/LINK/ecoscvs_l_net_20080221-sh-elf-gcc4.1.1/untitled1_instal l/lib/libtarget.a(net_bsd_tcpip_uipc_domain.o): In function `pfslowtimo': /opt/ecoscvs_l/ecos/packages/net/bsd_tcpip/current/src/sys/kern/uipc_domain.c:26 3: undefined reference to `_cyg_hz' /ecos-c/cygwin/home/LINK/ecoscvs_l_net_20080221-sh-elf-gcc4.1.1/untitled1_instal l/lib/libtarget.a(net_bsd_tcpip_uipc_domain.o): In function `domaininit': /opt/ecoscvs_l/ecos/packages/net/bsd_tcpip/current/src/sys/kern/uipc_domain.c:16 1: undefined reference to `_zinit' /ecos-c/cygwin/home/LINK/ecoscvs_l_net_20080221-sh-elf-gcc4.1.1/untitled1_instal l/lib/libtarget.a(net_bsd_tcpip_uipc_socket.o): In function `cyg_sooptcopyout': /opt/ecoscvs_l/ecos/packages/net/bsd_tcpip/current/src/sys/kern/uipc_socket.c:12 68: undefined reference to `_cyg_copyout' -- sorry I omit intermediate part. too many "undefined reference to" occurred. -- /opt/ecoscvs_l/ecos/packages/net/common/current/src/bootp_support.c:611: undefin ed reference to `_setdomainname' /opt/ecoscvs_l/ecos/packages/net/common/current/src/bootp_support.c:611: undefin ed reference to `_cyg_dns_res_init' /ecos-c/cygwin/home/LINK/ecoscvs_l_net_20080221-sh-elf-gcc4.1.1/untitled1_instal l/lib/libtarget.a(net_bsd_tcpip_timeout.o): In function `cyg_callout_reset': /opt/ecoscvs_l/ecos/packages/net/bsd_tcpip/current/src/ecos/timeout.c:414: undef ined reference to `_cyg_current_time' /opt/ecoscvs_l/ecos/packages/net/bsd_tcpip/current/src/ecos/timeout.c:414: undef ined reference to `_cyg_alarm_initialize' /opt/ecoscvs_l/ecos/packages/net/bsd_tcpip/current/src/ecos/timeout.c:427: undef ined reference to `_diag_printf' collect2: ld returned 1 exit status make: *** [nc_test_slave] Error 1 Next is my application's Makefile ======================================= export PREFIX := /ecos-c/cygwin/home/LINK/ecoscvs_l_net_20080221-sh-elf-gcc4.1.1/untitled1_install export COMMAND_PREFIX := sh-elf- export CC := $(COMMAND_PREFIX)gcc export OBJCOPY := $(COMMAND_PREFIX)objcopy export HOST := CYGWIN export AR := $(COMMAND_PREFIX)ar XCC = sh-elf-gcc ## Build flags. CFLAGS = -g -Wall -I$(PREFIX)/include -ffunction-sections -fdata-sections LDFLAGS = -nostartfiles -L$(PREFIX)/lib -Wl,--gc-sections -Wl,--Map -Wl,nc_test_slave.map LIBS = -Ttarget.ld -nostdlib LD = $(XCC) ## Build rules. all: nc_test_slave nc_test_slave.o: nc_test_slave.c $(XCC) -c -o $*.o $(CFLAGS) $< nc_test_slave: nc_test_slave.o $(LD) $(LDFLAGS) -o $@ $@.o $(LIBS) clean: -rm -f nc_test_slave.exe nc_test_slave.o nc_test_slave.map ============================ end of Makefile Please help me. Masahiro Ariga next is my last mail. ========================= > Hello everyone, > > I have made sh-elf-gcc version 4.1.1 from gcc4.1.1. > I used two ways to make it. > After made them,I tried to run eCos configure.exe using them. > One was resulted in no problem other was resulted in error. > Although one was looked succeeded I am dubious about it's reliability. > So please enlighten me which do you think is the better one. > > I decided the directory to hold newly built files to be > /usr/local/sh-elf/bin. > > I downloaded next sources into /usr/local/sh-elf > and decompressed them. > binutils-2.16.tar.bz2 > gcc-4.1.1.tar.bz2 > newlib-1.14.0.tar.gz > > And I made building-directories in which I executed building scripts. > /tmp/build/build_binutils > /tmp/build/build_gcc > > The point is that Cygwin's original gnutools exec files' directory is > next. > /cygwin/opt/ecos/gnutools/sh-elf/bin > > I noticed when I build it is interfered with. > I must have found the way to avoid it. > Since I did not know correct way to do with it, > I concocted two ways to pass compiling through. > > (1) > I remained original gnutools exec files' directory as it is, > but only renamed next two exe files in /opt/ecos/gnutools/sh-elf/bin. > sh-elf-as.exe.prev > sh-elf-gcc.exe.prev > > After compiled, newly sh-elf-as.exe, sh-elf-gcc.exe and others were > generated in > \cygwin\usr\local\sh-elf\bin > > I tried to run eCos configure.exe and tried to build > without any changing of PATH. > It appeared to succeed.It used sh-elf-gcc. > > I appended eCos configure.exe building logs,in both cases of success and > failure. > Please refer to success one. > > (2) > I felt anxiety that changing only two files is not enough. > So I renamed gnutools directory to gnutools-old. > And I executed building scripts, > but I was encountered error like next. > > echo 'STMP_FIXINC="stmp-fixinc"' >> > /usr/local/sh-elf/lib/gcc/sh-elf/4.1-GNUSH_v0602/install-tool > s/mkheaders.conf > make[1]: *** No rule to make target > `/opt/ecos/gnutools/sh-elf/bin/sh-elf-ld', n > eeded by `stamp-collect-ld'. Stop. > make[1]: Leaving directory > `/home/tkernel/shtools/buildshgcc/build_gcc/gcc' > make: *** [install-gcc] Error 2 > > I discovered in > C:\cygwin\tmp\build\build_gcc\gcc\Makefile > next odd lines. > > ORIGINAL_LD_FOR_TARGET = /opt/ecos/gnutools/sh-elf/bin/sh-elf-ld > ORIGINAL_NM_FOR_TARGET = /opt/ecos/gnutools/sh-elf/bin/sh-elf-nm > > I thought these should not be /opt/ecos/gnutools/ > but point to newly directory /usr/local/sh-elf/. > So I changed these lines to next. > > ORIGINAL_LD_FOR_TARGET = /usr/local/sh-elf/bin/sh-elf-ld > ORIGINAL_NM_FOR_TARGET = /usr/local/sh-elf/bin/sh-elf-nm > > And I executed script to do only "make" like next. > make clean > make -w all install 2>&1 | tee makegcc.txt > > After succeeded to compile,I made empty /opt/ecos/gnutools > and copied /usr/local/sh-elf under it. > I thought this way is more reliable than first one. > When I tried to run ecos configure.exe it apparently became slow to run. > And appeared warning of something like changing configuration. > Nevertheless I selected target and net and clicked "Library" > and then encountered error. > Please refer to failure log I appended. > > Even (1) looked successful I am not sure I could use it. > Do you think it is reliable enough to use it for ecos configure.exe ? > > Or if (2) is better reliable,please teach me the cause of error. > I am much obliged to your kindness. > Thank you in advance. > > Masahiro Ariga > > -------------------------------------------------------------------------------- > -- > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss