crosstool-ng 1.10 - bug reports and questions

Michael Zintakis michael.zintakis@googlemail.com
Wed Mar 16 18:16:00 GMT 2011


I'll start with the bugs I have found so far since using the crosstool:

1. When entering a tarball source directory 
(CT_LOCAL_TARBALLS_DIR="${HOME}/t/gcc-test/src" in my case) this value, 
for some reason automatically gets added to the kernel source tarball 
(CT_KERNEL_LINUX_CUSTOM_TARBALL) and that obviously produces an error 
"[ERROR]    Don't know how to handle '/home/mz/gcc-test/src': unknown 
extension"

2. Even if the CT_LOCAL_TARBALLS_DIR is set, crosstool-ng still looks 
(and demands!) all source tarballs to be in ${CT_BUILD}/tarballs, which 
is wrong and I have to subsequently move (understand copy manually!) 
everything there to make it work (in other words the value of 
CT_LOCAL_TARBALLS_DIR seems to be completely ignored). The error 
message(s) I am getting are like "[ERROR]    'gmp-5.0.1' not found in 
'/home/mz/gcc-test/build/tarballs'"

3. When select that I wish linuxthreads included in glibc I get the 
following error: "[ERROR]    'glibc-linuxthreads-2.12.2' not found in 
'/home/mz/gcc-test/build/tarballs'" - this is wrong since as far as I 
know the newer version of glibc include this in the main source tree. 
There is no separate glibc-linuxthreads tarball for the recent glibc 
versions.

4. GMP header (gmp.h) and library (ligmp.*) version mismatch error 
during PPL build - although that isn't strictly a crosstool-ng bug it is 
nice to know as this could be avoided in the future. The error message 
is this:

[INFO ]  Installing PPL
[ERROR]    configure: error: Cannot find GMP version 4.1.3 or higher.
[ERROR]    Build failed in step 'Installing PPL'
[ERROR]    Error happened in 
'/home/mz/gcc/crosstool-ng-1.10.0/scripts/functions' in function 
'CT_DoExecLog' (line unknown, sorry)
[ERROR]          called from 
'/home/mz/gcc/crosstool-ng-1.10.0/scripts/build/companion_libs/ppl.sh' 
at line # 42 in function 'do_ppl'
[ERROR]          called from 
'/home/mz/gcc/crosstool-ng-1.10.0/scripts/crosstool-NG.sh' at line # 606 
in function 'main'
[ERROR]    Look at 
'/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/build.log' for more 
info on this error.
[ERROR]  (elapsed: 1:28.70)
[01:29] / make: *** [build] Error 1

This stems from configure on ppl, which is finding different versions of 
gmp.h in various places. Quick grep reveals that there are quite a few 
of them in use, but I suspect the culprit is in glibc:

[mz@test1 gcc-test]$ find . | grep gmp.h | more
./install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/linux/igmp.h
./build/src/linux-custom/include/linux/igmp.h
./build/src/mpfr-3.0.0/mpfr-gmp.h
./build/src/glibc-2.12.2/stdlib/gmp.h
./build/src/glibc-2.12.2/include/gmp.h
./build/src/glibc-2.12.2/inet/netinet/igmp.h
./build/src/gmp-5.0.1/gmp-h.in
./build/powerpc-unknown-linux-gnu/build/build-gmp/gmp.h
./build/powerpc-unknown-linux-gnu/build/static/include/gmp.h

The actual configure.log on PPL has this:

configure:11105: checking for the GMP library version 4.1.3 or above
configure:11194: x86_64-build_unknown-linux-gnu-g++ -o conftest   -O2 
-frounding-math  -pipe   conftest.cpp  
/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/static/lib/libgmpxx.a 
/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/static/lib/libgmp.a 
 >&5
configure:11194: $? = 0
configure:11194: ./conftest
GMP header (gmp.h) and library (ligmp.*) version mismatch:
header gives 4.3.1;
library gives 5.0.1.
configure:11194: $? = 1
configure: program exited with status 1

So, to avoid that I used an older version of the gmp library to have it 
matched with the one of gmp.h which isn't ideal!

5. PPL version mismatch during CLooG/ppl build - again, not strictly a 
crosstool-ng bug, but worth creating a patch for to avoid the problem 
described below:

[INFO ]  Installing CLooG/ppl
[ERROR]    checking for version 0.10 of PPL... configure: error: Can't 
find correct version of PPL.
[ERROR]    Build failed in step 'Installing CLooG/ppl'
[ERROR]    Error happened in 
'/home/mz/gcc/crosstool-ng-1.10.0/scripts/functions' in function 
'CT_DoExecLog' (line unknown, sorry)
[ERROR]          called from 
'/home/mz/gcc/crosstool-ng-1.10.0/scripts/build/companion_libs/cloog.sh' 
at line # 65 in function 'do_cloog'
[ERROR]          called from 
'/home/mz/gcc/crosstool-ng-1.10.0/scripts/crosstool-NG.sh' at line # 606 
in function 'main'
[ERROR]    Look at 
'/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/build.log' for more 
info on this error.
[ERROR]  (elapsed: 8:21.49)
[08:22] / make: *** [build] Error 1

CLooG/ppl configure.log reveals all:

configure:12853: checking for version 0.10 of PPL
configure:12880: x86_64-build_unknown-linux-gnu-gcc -c  -pipe 
-I/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/static/include 
-I/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/static/include  
conftest.c >&5
conftest.c: In function 'main':
conftest.c:32: error: 'choke' undeclared (first use in this function)
conftest.c:32: error: (Each undeclared identifier is reported only once
conftest.c:32: error: for each function it appears in.)
conftest.c:32: error: expected ';' before 'me'
configure:12887: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "cloog"
| #define VERSION "0.15"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define STDC_HEADERS 1
| #define HAVE_STRTOL 1
| #define HAS_SYS_RESOURCE_H 1
| #define LINEAR_VALUE_IS_MP 1
| /* end confdefs.h.  */
| #include "ppl_c.h"
| int
| main ()
| {
|
|     #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR != 10
|     choke me
|     #endif
|
|   ;
|   return 0;
| }
configure:12898: error: Can't find correct version of PPL.

The code for 'main()' should be

#if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR >= 10

to account for PPL libraries which have minor versions 
greater-or-equal-to 10, not just different-to 10 as it allows the use of 
newer versions of that library. Without this the build simply fails.

6. The value of CT_LIBC_GLIBC_CONFIGPARMS seems to be ignored.

I had the 'unwind-not-forced' nasties so I tried to use 
CT_LIBC_GLIBC_CONFIGPARMS="libc_cv_forced_unwind=yes\nlibc_cv_c_cleanup=yes" 
to force it (unaware at the time that there is a specific option dealing 
with this), though whatever I entered as a value of that parameter 
seemed to be ignored by the glibc configure, giving me the 
unwind-not-forced error. Once I found out and used 
CT_LIBC_GLIBC_FORCE_UNWIND=y that cured the build error, but the fact 
remains that CT_LIBC_GLIBC_CONFIGPARMS value seems to be ignored completely.

Finally, 2 questions:

1. What is the difference between  CT_LIBC_GLIBC_EXTRA_CONFIG and 
CT_LIBC_GLIBC_CONFIGPARMS?

2. What is the significance of the various CT_BINUTILS_V_x_y_z, 
CT_CC_V_x_y_z, CT_LIBC_GLIBC_V_x_y_z, CT_GMP_V_x_y_z, CT_MPFR_V_x_y_z, 
CT_PPL_V_x_y_z, CT_CLOOG_V_x_y_z, CT_MPC_V_x_y_z and CT_LIBELF_V_x_y_z 
when they have their corresponding string values set as well 
(CT_LIBC_GLIBC_V_2_12_2=y and CT_LIBC_VERSION="2.12.2" for example)?

The reason I am asking this is because most of the new versions of 
various of the libraries are not listed in the list provided by the 
menuconfig make target (CT_LIBC_X is a prime example of this - I can't 
specify CT_LIBC_GLIBC_V_2_13 even though I may set 
CT_LIBC_VERSION="2.13"). I also suspect the inability to use more 
'modern' version of glibc is causing me the current grief with trying to 
build that library, but I do not wish to change/use glibc 2.13 as I 
simply do not know what effect, if any, that would have on these 
parameters, so clarification on that issue is welcome.

The same goes for PPL as well - I was forced to use much older version 
of that library source (0.10) to make it work even though the latest 
stable version is 0.11.2.

Many thanks in advance to those who wish to clarify the above issues. 
Also, I have detailed log and .config files from when I encountered the 
above bugs and can provide them on request - please let me know and I 
will attach them straight away.


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



More information about the crossgcc mailing list