bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug cross-compiling bash (with buildroot): mkbuiltins uses config.h


From: kus Kusche Klaus
Subject: Bug cross-compiling bash (with buildroot): mkbuiltins uses config.h
Date: Thu, 7 Apr 2005 15:17:49 +0200

Hmmm, it's worse than described below...

* "mkbuiltins.c" includes "config.h" unconditionally, it does not depend
on "HAVE_CONFIG_H".

* "mkbuiltins.c" depends on "config.h", it does not compile when that
include is removed.

-- 
Klaus Kusche                 (Software Development - Control Systems)
KEBA AG             Gewerbepark Urfahr, A-4041 Linz, Austria (Europe)
Tel: +43 / 732 / 7090-3120                 Fax: +43 / 732 / 7090-8919
E-Mail: address@hidden                                WWW: www.keba.com


> -----Original Message-----
> From: kus Kusche Klaus 
> Sent: Thursday, April 07, 2005 2:58 PM
> To: 'address@hidden'; 'address@hidden'
> Subject: Bug cross-compiling bash (with buildroot): 
> mkbuiltins uses config.h
> 
> 
> I've hit the following bug when cross-building bash with buildroot:
> 
> Compiling mkbuiltins fails because "inttypes.h" is not found.
> 
> It turns out that:
> * The target system has an "inttypes.h" header file. It is 
> found by configure, and hence "config.h" sets "HAVE_INTTYPES_H".
> * "mkbuiltins" is compiled with "-DHAVE_CONFIG_H" (but with 
> the host compiler, which only sees the host include 
> directories, but not the target include directories). It uses 
> the "config.h" generated w.r.t. the target, sees 
> "HAVE_INTTYPES_H", and hence tries to include "inttypes.h".
> * The host system does not have any "inttypes.h" header file, 
> and hence the compilation fails...
> 
> However, the "inttypes.h" error is only one consequence of a 
> serious fundamental problem: "mkbuiltins" should not use 
> "config.h" at all! Host and target system differ 
> dramatically, many of the definitions in "config.h" 
> (generated w.r.t. the target system) are most likely wrong 
> for the host system!
> 
> Bash version is 3.0 (with the patches applied by buildroot).
> The host system is Windows/Interix, but with a complete GNU 
> toolchain (gcc, make, bash, ...) instead of the Interix programs.
> However, the host system's C library and headers are still 
> those from Interix, not glibc.
> The target system is an embedded system with uclibc library 
> and headers.
> 
> I also tried on a gentoo host system. There, the make does 
> not fail (because inttypes.h exists on both the host and the 
> target), but still, mkbuiltins is most likely compiled with 
> the wrong config.h.
> 
> How to work around the problem?
> 
> Many thanks in advance for any hints!
> 
> Klaus Kusche
> Entwicklung Software - Steuerung
> Software Development - Control
> 
> KEBA AG
> A-4041 Linz
> Gewerbepark Urfahr
> Tel +43 / 732 / 7090-3120
> Fax +43 / 732 / 7090-8919
> E-Mail: address@hidden
> www.keba.com
> 
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]