Errors building llvm

Hi,

I am trying to build LLVM on x86 Windows platform with Cygwin and get an error building lib/Support/APInt.cpp. I get the same errors using gcc 3.4.2 and 3.4.4. The log is attached. Please advice. Thanks.

Jay

config.status (41.2 KB)

config.log (204 KB)

gnumake1.out (6.34 KB)

Hi,

I am trying to build LLVM on x86 Windows platform with Cygwin and get an
error building lib/Support/APInt.cpp. I get the same errors using gcc 3.4.2
and 3.4.4. The log is attached. Please advice. Thanks.

I encountered this issue also when building LLVM on Cygwin. I modified
/usr/include/stdint.h to change int32_t and unit32_t from long's to
int's. So the following changes were performed:

typedef long int32_t becomes typedef int int32_t
typedef unsigned long uint32_t becomes typedef unsigned int uint32_t

That fixed the error for me and LLVM compiled without issues after the change.

Padraig

Can you please send in a patch so we can fix this on mainline?

-Chris

Hi, Chris

Can you please send in a patch so we can fix this on mainline?

This known problem: stdint.h on cygwin declares {u}int32_t type to be
'long', not 'int'. And this causes problems with APInt's uint32_t =>
unsigned casts. I myself don't know good direct fix except patching
Cygwin's stdint.h itself.

Hi, Chris

Can you please send in a patch so we can fix this on mainline?

This known problem: stdint.h on cygwin declares {u}int32_t type to be
'long', not 'int'. And this causes problems with APInt's uint32_t =>
unsigned casts. I myself don't know good direct fix except patching
Cygwin's stdint.h itself.

I was also under the the impression that this issue was due to a
problem with Cygwin and not LLVM. I would love to provide a patch if I
could but I'm unsure as to what the fix would be (aside from patching
Cygwin's stdint.h as Anton mentioned).

-Padraig