From: "ariga masahiro" <ariga@link-lab.co.jp>
To: <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] How to re-install newly compiled gnutools
Date: Fri, 22 Feb 2008 07:15:00 -0000 [thread overview]
Message-ID: <001001c87522$98475a50$1c0110ac@ariga> (raw)
In-Reply-To: <000601c8750f$5ffb19b0$1c0110ac@ariga>
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
next prev parent reply other threads:[~2008-02-22 7:15 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-07 23:59 [ECOS] Wrongfully compiled code ariga masahiro
2008-01-08 0:05 ` Gary Thomas
2008-01-08 1:05 ` ariga masahiro
2008-01-17 19:21 ` [ECOS] " Dave Lawrence
2008-01-17 23:50 ` ariga masahiro
2008-01-18 12:16 ` Dave Lawrence
2008-01-18 14:40 ` Gregg Levine
2008-01-18 15:44 ` Dave Lawrence
2008-01-18 15:49 ` Gregg Levine
2008-01-18 16:09 ` Dave Lawrence
2008-01-21 0:34 ` ariga masahiro
2008-02-04 1:49 ` ariga masahiro
2008-02-04 11:38 ` Dave Lawrence
2008-02-12 1:06 ` ariga masahiro
2008-02-12 10:55 ` Dave Lawrence
2008-02-22 4:57 ` [ECOS] How to re-install newly compiled gnutools ariga masahiro
2008-02-22 7:15 ` ariga masahiro [this message]
2008-05-16 8:13 ` [ECOS] When or on what condition does "deschedule" happen? ariga masahiro
2008-05-16 15:26 ` Andrew Lunn
2008-05-19 5:32 ` ariga masahiro
2008-05-19 13:18 ` Andrew Lunn
2008-05-19 13:31 ` Gary Thomas
2008-05-20 1:26 ` ariga masahiro
2008-05-20 12:18 ` Andrew Lunn
2008-05-23 7:38 ` ariga masahiro
2008-05-23 9:35 ` Nick Garnett
[not found] ` <000601c8c165$406e0970$1c0110ac@ariga>
2008-05-29 18:23 ` [ECOS] Re: In trouble of timer operations Andrew Lunn
2008-05-30 2:50 ` ariga masahiro
2008-05-30 3:09 ` Paul D. DeRocco
2008-05-30 4:11 ` ariga masahiro
2008-05-30 4:43 ` Paul D. DeRocco
2008-05-30 7:26 ` ariga masahiro
2008-05-30 7:47 ` Paul D. DeRocco
2008-05-30 8:03 ` ariga masahiro
2008-05-30 8:07 ` Andrew Lunn
2008-06-04 5:25 ` ariga masahiro
2008-06-04 10:06 ` Paul D. DeRocco
2008-06-05 6:14 ` ariga masahiro
2008-06-05 17:39 ` Paul D. DeRocco
2008-05-30 6:35 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001001c87522$98475a50$1c0110ac@ariga' \
--to=ariga@link-lab.co.jp \
--cc=ecos-discuss@ecos.sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).