This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: wanting to verify that a toolchain should be entirely self-contained


On 07/28/2010 04:35 PM, Robert P. J. Day wrote:

here's a question for which i'm pretty sure i know the answer, but i need to be absolutely sure.

   i'm trying to cross-compile a downloaded tarball (the toolchain was
downloaded from a vendor), and the instructions for cross-compiling
were simply to

$ make CC=arm-...-gcc LD=arm-...-ld

which is pretty standard.

Well, though this is pretty common, it's not "standard" by any means


Actually, it often is "simply plain wrong" ;)

 but the cross compile failed almost
immediately, complaining about a missing "curses.h" file.

   the software compiles fine natively on my ubuntu 10.04 system,
because i have all the curses-related packages installed.  but if i'm
trying to cross-compile, is it not the responsibility of the
*toolchain* to supply all necessary standard header files?
Define "standard" ;)

AFAICT, curses.h is not part of POSIX or similar.

   as soon as i got that error, i checked where i installed the
toolchain and noticed immediately that there was no curses.h file, and
mentioned that.

   someone else claimed that what i really needed to do was install the
toolchain at /opt rather than elsewhere because the README claimed
that the toolchain wasn't relocatable.  but i can't see how that's
relevant.
Correct, this remark is likely nonsense and is almost for sure not related to your "curses.h" issue.

   if i'm trying to cross-compile, and a C file includes a header file,
and the toolchain doesn't supply that header file, shouldn't i expect
the build to fail?
Letting building a package fail if it doesn't find a requirement (e.g. header, library, ...) is common practice - You'd have to talk to your package's upstream. Likely they are not aware about curses not being part of many toolchains.

 i certainly don't expect the cross compiler to
wander off, looking for header files elsewhere
This would certainly fail somewhere and is likely not helpful.

so my position is that
that toolchain simply isn't capable of compiling anything that
requires curses capability because it doesn't provide a curses.h file.
Not quite. Likely you are facing a missing package dependency/missing requirement.

I.e. are trying to build a package which needs another package installed in advance. In your case you likely will have to cross-build/cross-package a "curses" implementation before building "your package".

Ralf


-- For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]