Skip to content

[META][Win64] build and test issues on MinGW-w64 #9444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rubenvb opened this issue Jan 27, 2011 · 14 comments
Closed

[META][Win64] build and test issues on MinGW-w64 #9444

rubenvb opened this issue Jan 27, 2011 · 14 comments
Labels
bugzilla Issues migrated from bugzilla build-problem portability

Comments

@rubenvb
Copy link

rubenvb commented Jan 27, 2011

Bugzilla Link 9072
Resolution FIXED
Resolved on Nov 17, 2015 11:48
Version trunk
OS Windows NT
Depends On #9205 #9220 #9222 llvm/llvm-bugzilla-archive#9099
Blocks llvm/llvm-bugzilla-archive#9100
Attachments patch for the issues listed in the report
CC @rnk

Extended Description

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.

@llvmbot
Copy link
Member

llvmbot commented Jan 28, 2011

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.
  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? :)

  1. 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?

@rubenvb
Copy link
Author

rubenvb commented Jan 28, 2011

"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 [email protected] 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.

@rubenvb
Copy link
Author

rubenvb commented Jan 28, 2011

"mingw32-make check" results
This time with "cat" and "uniq" in PATH. 164 failures.

@llvmbot
Copy link
Member

llvmbot commented Jan 29, 2011

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

@rubenvb
Copy link
Author

rubenvb commented Feb 25, 2011

"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).

@rubenvb
Copy link
Author

rubenvb commented Feb 25, 2011

"mingw32-make check" tools/clang results
Results from Clang tests, also under the same GCC 4.5.2 mingw-w64 compiler. Only 20 failures.

@rubenvb
Copy link
Author

rubenvb commented Mar 16, 2011

"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).

@rubenvb
Copy link
Author

rubenvb commented Apr 21, 2011

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.

@rubenvb
Copy link
Author

rubenvb commented Aug 26, 2011

*** Bug llvm/llvm-bugzilla-archive#10729 has been marked as a duplicate of this bug. ***

@rnk
Copy link
Collaborator

rnk commented Jan 28, 2015

Is this fixed?

@rubenvb
Copy link
Author

rubenvb commented Jan 28, 2015

[Test report 28https://user-images.githubusercontent.com/92601424/143742614-d16ccf35-87a3-4c05-a45d-8bea721881b0.gz)
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.

@rnk
Copy link
Collaborator

rnk commented Nov 17, 2015

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.

@llvmbot
Copy link
Member

llvmbot commented Nov 27, 2021

mentioned in issue llvm/llvm-bugzilla-archive#9099

@llvmbot
Copy link
Member

llvmbot commented Nov 27, 2021

mentioned in issue llvm/llvm-bugzilla-archive#9100

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
augusto2112 added a commit to augusto2112/llvm-project that referenced this issue Oct 22, 2024
[🍒 stable/20240723] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla build-problem portability
Projects
None yet
Development

No branches or pull requests

3 participants