[go: nahoru, domu]

LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 9072 - [META][Win64] build and test issues on MinGW-w64
Summary: [META][Win64] build and test issues on MinGW-w64
Status: RESOLVED FIXED
Alias: None
Product: new-bugs
Classification: Unclassified
Component: new bugs (show other bugs)
Version: trunk
Hardware: PC Windows NT
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords: build-problem, portability
: 10729 (view as bug list)
Depends on: 8833 8848 8850 9099
Blocks: 9100
  Show dependency tree
 
Reported: 2011-01-27 11:44 PST by vanboxem.ruben
Modified: 2015-11-17 11:48 PST (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments
patch for the issues listed in the report (1.74 KB, application/octet-stream)
2011-01-27 11:44 PST, vanboxem.ruben
Details
"mingw32-make check" results (247.30 KB, application/octet-stream)
2011-01-28 09:08 PST, vanboxem.ruben
Details
"mingw32-make check" results (160.18 KB, text/plain)
2011-01-28 09:41 PST, vanboxem.ruben
Details
"mingw32-make check" LLVM results (53.16 KB, text/plain)
2011-02-25 13:41 PST, vanboxem.ruben
Details
"mingw32-make check" tools/clang results (36.09 KB, text/plain)
2011-02-25 13:52 PST, vanboxem.ruben
Details
"mingw32-make check" results (39.87 KB, application/octet-stream)
2011-03-16 16:42 PDT, vanboxem.ruben
Details
output from "mingw32-make check-all" (29.34 KB, text/plain)
2011-04-21 13:13 PDT, vanboxem.ruben
Details
Test report 28/01/2015 (365.68 KB, text/plain)
2015-01-28 15:13 PST, vanboxem.ruben
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vanboxem.ruben 2011-01-27 11:44:05 PST
Created attachment 6059 [details]
patch for the issues listed in the report

When compiling LLVM with MinGW-w64, several easy to fix/workaround issues popped up:

1. _WIN32_WINNT redefined
2. lib/support/Windows/DynamicLibrary.inc: bad ifdef for mingw-w64 which needs the function ifdef'ed out
3. explicit symbol declaration for functions not meant to be present on win64 MinGW platforms.
4. tblgen.exe crashes on CellSPU *.inc files

I have attached a patch for these issues (except 3). I would be much obliged if applied to trunk.

I do not have a clue about number 4, and already opened a bug report about this here: http://llvm.org/bugs/show_bug.cgi?id=8850
Disabling the target in question lets the build continue and finish happily.

I will update the bug report with "make check" results.
Comment 1 NAKAMURA Takumi 2011-01-27 18:08:37 PST
Ruben,

* Please split issues as possible.
* Don't leave a duplicated issue bug 8848.
* You may post patches to llvm-commits when you have both matters and solutions.

(In reply to comment #0)
> 1. _WIN32_WINNT redefined

I prefer as below;

#ifdef _WIN32_WINNT
#if _WIN32_WINNT < 0x0500
#error
#endif
#else
#define _WIN32_WINNT 0x0500
...

How do you think? :)


> 2. lib/support/Windows/DynamicLibrary.inc: bad ifdef for mingw-w64 which needs
> the function ifdef'ed out

Would you like to refer to threads below?
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110124/115720.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110124/115726.html

As simply you hide a matter, I guess you would get test/ExeutionEngine failed.

I will work on this.


> I will update the bug report with "make check" results.

How are your tests?
Comment 2 vanboxem.ruben 2011-01-28 09:08:53 PST
Created attachment 6071 [details]
"mingw32-make check" results

I have made this the "main" bug for all important issues (ie disasterous evil crashes and miscompiles) with mingw-w64 (and 64-bit Windows as far as anything is encountered).

I hope this counts as "splitting and not leaving duplicate issues".

If not, I can reorganize my mess ;)

I understand that you (@Nakamura) will try to sort the 32-bit symbols? I can't really help with anything code-related on that issue, but I can point you to mingw-w64-public@lists.sourceforge.net where (a lot) more knowledgeable people are. They are interested in getting LLVM/Clang working.

I have also attached the first test results, which seem rather awful :s. I did notice several output difference problems (like 0,00e+17 expected 0,000e+017 etc...) which might be due to incompatibility with the MSVC runtime.
Comment 3 vanboxem.ruben 2011-01-28 09:41:06 PST
Created attachment 6072 [details]
"mingw32-make check" results

This time with "cat" and "uniq" in PATH. 164 failures.
Comment 4 NAKAMURA Takumi 2011-01-28 22:32:56 PST
(In reply to comment #2)
> I have made this the "main" bug for all important issues (ie disasterous evil
> crashes and miscompiles) with mingw-w64 (and 64-bit Windows as far as anything
> is encountered).
> 
> I hope this counts as "splitting and not leaving duplicate issues".

Good. I added a few testing issues.


FYI, on my host (x86_64-w64-mingw32(20101129), msys autoconf, python-2.7) with my local patches;

-- Testing: 5789 tests, 8 threads --
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 109.72s
  Expected Passes    : 5182
  Expected Failures  : 43
  Unsupported Tests  : 564
Comment 5 vanboxem.ruben 2011-02-25 13:41:57 PST
Created attachment 6237 [details]
"mingw32-make check" LLVM results

Attached are new test results from LLVM r126497 built and tested with mingw-w64 4.5.2 toolchain built by sezero. Many tests now pass, but there are still 44 failures left. I noticed some are due to the difference in "printf" functionality (amount of digits in scientific notation output between the tested GNU libc output and msvcrt output).
Comment 6 vanboxem.ruben 2011-02-25 13:52:25 PST
Created attachment 6238 [details]
"mingw32-make check" tools/clang results

Results from Clang tests, also under the same GCC 4.5.2 mingw-w64 compiler. Only 20 failures.
Comment 7 vanboxem.ruben 2011-03-16 16:42:25 PDT
Created attachment 6332 [details]
"mingw32-make check" results

  Expected Passes    : 8160
  Expected Failures  : 69
  Unsupported Tests  : 556
  Unexpected Failures: 28

These are results for both LLVM (11 failures) and Clang (17 failures).
Comment 8 vanboxem.ruben 2011-04-21 13:13:53 PDT
Created attachment 6499 [details]
output from "mingw32-make check-all"

New "mingw32-make check-all" results. LLVM passes fully, Clang has some failures, a lot of them due to pointer->int conversions, which don't work well for Win64.
Comment 9 vanboxem.ruben 2011-08-26 13:36:31 PDT
*** Bug 10729 has been marked as a duplicate of this bug. ***
Comment 10 Reid Kleckner 2015-01-27 18:58:14 PST
Is this fixed?
Comment 11 vanboxem.ruben 2015-01-28 15:13:47 PST
Created attachment 13752 [details]
Test report 28/01/2015

I ran the tests on a fresh build of development tip with MSYS2's MinGW-w64 64-bit GCC 4.9.2 on Windows 8.1 x64.

97 failed tests for LLVM+Clang. See attachment for the output log.
Comment 12 Reid Kleckner 2015-11-17 11:48:38 PST
I believe this is fixed. We've built with mingw64 for a long time. This bot provides proof that it works:
http://bb.pgr.jp/builders/ninja-clang-x64-mingw64-RA/

I don't think we need a meta bug for this now that it works. Any breakage can be filed separately.