ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: are TS crosstool toolchains really non-relocatab

To:
Subject: Re: [ts-7000] Re: are TS crosstool toolchains really non-relocatable?
From: "Robert P. J. Day" <>
Date: Wed, 28 Jul 2010 03:21:06 -0400 (EDT)
On Tue, 27 Jul 2010, Yan Seiner wrote:

>  
>
>
> On Tue, July 27, 2010 4:20 pm, Robert P. J. Day wrote:
> >
> > i'm not convinced, for the simple reason that i could
> > cross-compile a trivial "hi, world" program with the toolchain
> > installed elsewhere as long as i had the search path set properly.
> > if what you say is true, wouldn't that have been impossible?
>
> I think you'll run into weird breakage as the compiler pulls in the
> wrong header files and such.
>
> Install it in root, then create symlinks to where you want.

  i'm still not convinced that this is an actual problem, let me
explain what inspired it.  (and i will test what you suggest shortly,
but i'll also explain why i don't think it's going to work.)

  i wanted to cross-compile the luci GUI admin interface (the one
that's the standard for openwrt) to see if i could just drop it on a
TS-7260 system (writing additional modules, of course).  i checked out
the luci svn repo, and i can trivially compile it natively on my
ubuntu 10.04 system.  piece of cake.

  however, based on the docs, if i want to cross-compile, i need to do
something like:

  $ make CC=arm-unknown-linux-gnu-gcc LD=arm-unknown-linux-gnu-ld

where i've installed the TS toolchain under my home directory, and set
my shell search PATH to find the executables.  and what i get is:

... snip ...
make[1]: Entering directory
`/home/rpjday/luci/svn/trunk/contrib/luacurses'
mkdir -p dist/usr/lib/lua
arm-unknown-linux-gnu-gcc  -O2 --std=gnu99 -shared -pedantic \
        -Wall -fPIC -I/usr/include/lua5.1   -o
dist/usr/lib/lua/curses.so src/curses.c src/luacurses.c
src/curses.c:39:20: error: curses.h: No such file or directory
... snip ...

  what that tells me is that the toolchain doesn't support curses,
correct?  if i scan the entire toolchain install directory, there is
no curses.h header file, so the above error makes sense.  i *do* have
all of curses development installed *natively*, but the cross compile
operation obviously isn't searching outside of the toolchain for
curses.h, which is exactly what i would expect.

  in short, trying to cross-compile luci with the TS toolchain
installed in a regular directory for me failed because it couldn't
find "curses.h", but that's what i would expect because that toolchain
doesn't *provide* that header file and, in my opinion, it would be
wrong to go looking for it elsewhere.  in other words, installing the
toolchain under /opt should still fail for exactly the same reason --
no toolchain curses support.  is that not correct?

  i'll install under /opt and test it, but i expect the same build
error and i'd be happy for anyone to dissect my logic and explain what
i might have missed.

rday


--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

        Top-notch, inexpensive online Linux/OSS/kernel courses
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
    
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU