<div dir="ltr"><div><div><div><div><div><div>Dear Thomas:<br><br></div>As always, I appreciate working with you. Please bear with me a little as I think I may be on to something. It looks like the compile proceeds until loginutils is compiled. the error is finding RLIMIT_FSIZE which is declared in ../sys/resource.h<br><br></div>The compile line failing has a compile invocation, a --sysroot and a -I which dont quite match. The --sysroot makes sense as it is the copied set of files from the external toolchain, but the -I (for include) points to a directory with gdb stuff and not sysroot.<br><br></div>Here is the failing area without cluttering up the mailing list too much.<br><br>  /opt/powerpc-econolite_e300c2-linux-gnu/bin/powerpc-econolite_e300c2-linux-gnu-gcc --sysroot=/home/ckrinke/asc4_bsp/buildroot-glibc/output/host/usr/powerpc-unknown-linux-gnu/sysroot -Wp,-MD,loginutils/.passwd.o.d   -std=gnu99 -Iinclude -Ilibbb  -include include/autoconf.h -D_GNU_SOURCE -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D"BB_VER=KBUILD_STR(1.18.5)" -DBB_BT=AUTOCONF_TIMESTAMP  -Os  -mtune=e300c2 -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/ckrinke/asc4_bsp/buildroot-glibc/output/toolchain/linux/include -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os     -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(passwd)"  -D"KBUILD_MODNAME=KBUILD_STR(passwd)" -c -o loginutils/passwd.o loginutils/passwd.c<br>loginutils/passwd.c: In function 'passwd_main':<br>loginutils/passwd.c:93:16: error: storage size of 'rlimit_fsize' isn't known<br>  struct rlimit rlimit_fsize;<br>                ^<br>loginutils/passwd.c:180:2: warning: implicit declaration of function 'setrlimit' [-Wimplicit-function-declaration]<br>  setrlimit(RLIMIT_FSIZE, &rlimit_fsize);<br>  ^<br>loginutils/passwd.c:180:12: error: 'RLIMIT_FSIZE' undeclared (first use in this function)<br><br></div>My theory is " /opt/powerpc-econolite_e300c2-linux-gnu/bin/powerpc-econolite_e300c2-linux-gnu-gcc" is just fine. Also "--sysroot=/home/ckrinke/asc4_bsp/buildroot-glibc/output/host/usr/powerpc-unknown-linux-gnu/sysroot" has an include that leads to resource.h.<br><br></div>But, "-I/home/ckrinke/asc4_bsp/buildroot-glibc/output/toolchain/linux/include" doesnt lead to the right place. In fact the ...output/toolchain just leads to a gdb-6.8 directory and I think this may be the area things are going awry.<br><br></div>I'm kinda stuck with 2011.02 and wonder if you could comment on this include issue before I delve into the 2014 release.<br><div><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 20, 2014 at 7:10 AM, Thomas Petazzoni <span dir="ltr"><<a href="mailto:thomas.petazzoni@free-electrons.com" target="_blank">thomas.petazzoni@free-electrons.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Charles Krinke,<br>
<span class=""><br>
On Fri, 19 Dec 2014 11:33:10 -0800, Charles Krinke wrote:<br>
> I'm working with buildroot 2011.02 on a project which is in production and<br>
> the company wishes to change to a newer toolchain, crosstools-ng version<br>
> 1.20.0 (gcc-4.9.1).<br>
><br>
> I set in the toolchain with the location and prefix, but the build fails<br>
> with an incorrect sysroot.<br>
><br>
> For instance, the toolchain is at:<br>
><br>
> /opt/toolchains/powerpc-econolite_e300c2-linux-gnu/bin/powerpc-econolite_e300c2-linux-gnu-gcc<br>
><br>
> But the sysroot comes out:<br>
><br>
> --sysroot=<br>
</span>> */home/ckrinke/asc4_bsp/buildroot-glibc/output/host/usr/powerpc-unknown-linux-gnu/sysroot*<br>
<span class="">><br>
> Note the "econolite" vs the "unknown" in the tuple. This is complicated by<br>
> the fact that output/host/usr/power* is non-existent<br>
><br>
> I *think* that one can specify sysroot when compiling and would appreciate<br>
> a suggestion or two to get me out of this despicable place.<br>
<br>
</span>What you are seeing looks absolutely normal. Buildroot creates its own<br>
sysroot, output/host/usr/powerpc-unknown-linux-gnu/sysroot, and copies<br>
the necessary stuff from the originally sysroot location to this<br>
Buildroot sysroot. This is done so that all other libraries built by<br>
Buildroot get installed into this Buildroot specific sysroot, instead<br>
of being copied back to the original sysroot, which would pollute your<br>
toolchain.<br>
<br>
So, if the build fails, please post:<br>
<br>
 - Your complete .config file.<br>
 - The last 100-200 lines of the build output.<br>
<br>
Also, please try to reproduce with Buildroot 2014.11. Buildroot 2011.02<br>
is very very old, and we've fixed/improved the external toolchain stuff<br>
significantly since 3 and half years.<br>
<br>
Thanks,<br>
<br>
Thomas<br>
<span class="HOEnZb"><font color="#888888">--<br>
Thomas Petazzoni, CTO, Free Electrons<br>
Embedded Linux, Kernel and Android engineering<br>
<a href="http://free-electrons.com" target="_blank">http://free-electrons.com</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Charles Krinke<br><br></div>
</div>