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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080617/03b85700/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: config.status Type: application/octet-stream Size: 42181 bytes Desc: config.status URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080617/03b85700/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: config.log Type: application/octet-stream Size: 209063 bytes Desc: config.log URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080617/03b85700/attachment-0001.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: gnumake1.out Type: application/octet-stream Size: 6491 bytes Desc: gnumake1.out URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080617/03b85700/attachment-0002.obj>
> 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> Jay > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >
On Jun 17, 2008, at 7:20 PM, Padraig O'Sullivan wrote:>> 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.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. -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University.
On Wed, Jun 18, 2008 at 2:29 AM, Anton Korobeynikov <asl at math.spbu.ru> wrote:> 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> -- > With best regards, Anton Korobeynikov. > > Faculty of Mathematics & Mechanics, Saint Petersburg State University. > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >