This is the mail archive of the crossgcc@sources.redhat.com 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: [BusyBox] Is it a cross-compiler problem?


Dear Shawn,

in message <3D49F9E3.1060107@redswitch.com> you wrote:
> I tried to use the cross gcc-2.95.3 that I built to compile 
> busybox-0.60.1 and have a very strange problem.

Actually, this is not a strange problem but pretty "normal" when  you
dive into the uglier parts of building cross development tools.

> I just followed the instructions 
> (http://billgatliff.com/twiki/bin/view/Crossgcc/BuildToolchainScript) 

Well, if you look at the build scripts (the  RPM  "spec"  files  plus
patches)  of our ELDK you'll see some differences... The problem with
most of those "build scripts"  is  that  they  miss  some  tiny,  but
essential details.

> step by step to build my cross gcc (powerpc-linux). It looks successful. 
> But when using it to compile busybox-0.60.1's 'mount.c', I encountered 
> an error message 
> (http://www.geocities.com/shawnxjin/crossgcc/rs-bb.txt). It complains 
> that 'PATH_MAX' is not definied, which is defined in <linux/limits.h>, 
> which is included in <bits/local_lim.h>, which is included in 

Obviously you have problems with your header files.

> Well, I tried the ELDK (http://www.denx.de) cross gcc to compile the 
> file. It passed. Here is the result 

Well, then dump your version of cross tools, and continue to use  the
ELDK.  That's  what  we  made  it  for.  Or  if  you really feel like
recompiling, recompile the ELDK using the provided build scripts.

> Why? Later I tried to another c file and the compiler complains that 
> 'LINE_MAX' is not defined, which is defined in <bits/posix2_lim.h>. So I 

You have serious porblems with the header files,  and  probably  with
glibc, too.

> Nobody who successfuly built a cross gcc (powerpc-linux) have ever run 
> into such problems? Why am I so 'lucky'? :(((

Everybody has seen such problems, I think. And a _lot_  of  work  has
been spent to get working tools. Use these.

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
When you die, the first thing you lose is your life. The  next  thing
is the illusions.                       - Terry Pratchett, _Pyramids_

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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