Il giorno lun 26 nov 2018 alle ore 20:26 Thomas Trepl <tho...@linuxfromscratch.org> ha scritto: > > Am Montag, den 26.11.2018, 19:09 +0100 schrieb Michele Bucca: > > Hello everyone, > > > > I'm sorry to bother you with a question like this but I have no other > > place to ask, nobody has answered to this. > > I have problems compiling TAR for arm-linux-gnueabi (ARMv5), I think > > that the problem is Glibc. I built the toolchains a lot of times using > > different versions of GLIBC, GCC and BINUTILS using the LFS book as a > > reference. the package versions are the one suggested by LFS so they > > SHOULD be compatible. I'm so tired and in frustration. Anyway, the > > error that I get is this one > > > > CC areadlink-with-size.o > > In file included from > > /home/michele/tmp/arm/install/arm-linux-gnueabi/include/stdlib.h:941:0, > > from ./stdlib.h:36, > > from ../../gnu/areadlink-with-size.c:28: > > /home/michele/tmp/arm/install/arm-linux-gnueabi/include/bits/stdlib.h: > > In function 'wctomb': > > /home/michele/tmp/arm/install/arm-linux-gnueabi/include/bits/stdlib.h:90:3: > > error: #error "Assumed value of MB_LEN_MAX wrong" > > # error "Assumed value of MB_LEN_MAX wrong" > > ^~~~~ > > Makefile:1829: recipe for target 'areadlink-with-size.o' failed > > make[4]: *** [areadlink-with-size.o] Error 1 > > make[4]: Leaving directory '/home/michele/tmp/tar-1.29/build/gnu' > > Makefile:1854: recipe for target 'all-recursive' failed > > make[3]: *** [all-recursive] Error 1 > > make[3]: Leaving directory '/home/michele/tmp/tar-1.29/build/gnu' > > Makefile:1524: recipe for target 'all' failed > > make[2]: *** [all] Error 2 > > make[2]: Leaving directory '/home/michele/tmp/tar-1.29/build/gnu' > > Makefile:1338: recipe for target 'all-recursive' failed > > make[1]: *** [all-recursive] Error 1 > > make[1]: Leaving directory '/home/michele/tmp/tar-1.29/build' > > Makefile:1277: recipe for target 'all' failed > > make: *** [all] Error 2 > > > > I'm using gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) > > as native compiler. > > > > These are the info on my cross-compiler (built manually): > > > > COLLECT_GCC=arm-linux-gnueabi-gcc > > COLLECT_LTO_WRAPPER=/home/michele/x-tools/arm-linux-gnueabi/libexec/gcc/arm-linux-gnueabi/8.2.0/lto-wrapper > > Target: arm-linux-gnueabi > > Configured with: ../configure --target=arm-linux-gnueabi > > --prefix=/home/michele/x-tools/arm-linux-gnueabi/ > > --enable-languages=c,c++ --disable-libsanitizer --disable-multilib > > --disable-libmpx > > Thread model: posix > > gcc version 8.2.0 (GCC) > > > > Cross Binutils 2.31.1 > > ../configure --target=arm-linux-gnueabi --disable-nls --disable-multilib > > > > and Glibc 2.28 compiled with: ../configure --host=arm-linux-gnueabi > > --prefix=/home/michele/tmp/arm/install/arm-linux-gnueabi > > --enable-obsolete-rpc --disable-werror --disable-debug > > --enable-add-ons=no libc_cv_c_cleanup=yes libc_cv_forced_unwind=yes > > > > > > otherwise it would fail because of a warning being treated as an error > > while compiling op-2.h > > > > Can someone help me with this? The toolchain can cross-compile some > > complex packages such as: > > > > - binutils > > - gmp > > - mpfr > > - mpc > > - gcc > > - glibc (disable werror) > > - busybox > > - xz > > > > but it fails with this one. What can I do? > > > > I've tried to use some toolchains provided by crosstool-ng and > > buildroot and they work fine but mine doesn't. If I can't get a static > > TAR to cross-compileI can basically give up on ARM. I need a Glibc > > toolchain because it is the most complete and the de facto standard C > > Library in the Linux World. > > > > I've tried to post on CLFS but nobody game me a working solution. Only > > one person tried to answer me and I thank him for that..How can I fix > > that error? > > > > sounds like some problem with this bit of code in > > $PREFIX/$TARGET/include/bits/stdlib.h > > > > __NTH (wctomb (char *__s, wchar_t __wchar)) > > { > > /* We would have to include <limits.h> to get a definition of MB_LEN_MAX. > > But this would only disturb the namespace. So we define our own > > version here. */ > > #define __STDLIB_MB_LEN_MAX 16 > > #if defined MB_LEN_MAX && MB_LEN_MAX != __STDLIB_MB_LEN_MAX > > # error "Assumed value of MB_LEN_MAX wrong" > > #endif > > if (__bos (__s) != (size_t) -1 && __STDLIB_MB_LEN_MAX > __bos (__s)) > > return __wctomb_chk (__s, __wchar, __bos (__s)); > > return __wctomb_alias (__s, __wchar); > > } > > Cannot answer directly to try to solve that issue but i assume its > about Raspberry. Maybe http://intestinate.com/pilfs/ can help, do you > know that site? > > -- > Thomas >
Ok, I've re-read the script that builds the toolchain and I figured out that I skipped a step. My Cross compiler is a normal cross-compiler without a full limits.h Inside GCC source directory I had to run cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ `dirname $($LFS_TGT-gcc -print-libgcc-fiĆ²e-name)`/include-fixed/limits.h The problem is now dixed > > -- > http://lists.linuxfromscratch.org/listinfo/lfs-support > FAQ: http://www.linuxfromscratch.org/blfs/faq.html > Unsubscribe: See the above information page > > Do not top post on this list. > > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > http://en.wikipedia.org/wiki/Posting_style -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style