-
Notifications
You must be signed in to change notification settings - Fork 1.6k
undefined reference to `__imp__cprintf' during build x86_64-w64-mingw32 on Windows #4263
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
Comments
did you install the gcc-fortran part(s) of mingw as well ? |
Yes as discussed #1306, unless I am missing something. |
gfortran dev package looks to be a different version ? |
I updated the MinGW installation manager catalogue but no updated/newer version is available. I will remove the dev version and try to build again, although I don't think this should affect my installation since as mentioned #1306
And I already tried the build without the fortran installation and it also failed. |
Corporate network profile might be on a network share or under aggressive virus control. |
Can you please elaborate on this. I am not sure I understand it
|
errno 1 is permission denied which means that your admin is better positioned to help. It can be your profile syncing to a file server or antivirus nagging you with background scan. You can have mingw cross-compiler in linux if you cannot get normal filesystem on windows. |
I get the feeling that all the discussion around the fortran part of mingw in earlier issues were either misunderstandings or symptoms of an incomplete or broken installation of the cross-compiler in general. _cprintf is specifically declared to override the generic printf (in drivers/other/memory.c and drivers/other/xerbla.c) when compiling with mingw like this
and this code fragment appears to be unchanged from the original GotoBLAS of >15 years ago. My (older) mingw-gcc on Linux which I use to cross-build the Windows packages appears to provide the implementations in its libmsvcrt , so maybe this is a question of setting up the library paths for linking ? |
Suspect that the ucrt in your gcc version string may be the key here - perhaps it would be worth a try to remove the above five lines from both files. |
Getting a flawless build with an unmodified current develop branch and "MinGW-W64 x86_64-ucrt-mcf-seh, built by Brecht Sanders 13.2.0", from winlibs.com. Builds with "your" MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders) 12.2.0 are currently timing out in the Azure cloud before they reach the critical link step, probably from getting scheduled on slower hardware. |
Built fine with MinGW-W64-x86_64-ucrt-posix-seh as well (once I reduced the build size to fit into Azure's time constraint).
And I notice now that all the MinGW packages shown in your screenshot appear to be much older versions (4.8.2, 6.3.0) than the 12.2.0 from |
And @brada4 I'm fairly sure the "error 1" reported by |
I think this could be related to my setup, I have a very weird hybrid setup at this point and I am not even sure where to start. I tried to build within CLion but I got a different errors. However, finally I managed to install a compatible OpenBLAS from here https://packages.msys2.org/package/mingw-w64-x86_64-openblas?repo=mingw64 Since my problem cannot be reproduced and seems more of a my setup issue. I suggest closing this for now. If I needed help again, I will open a new one. |
CLion is just a commercial IDE on top of whatever compiler(s) you already have installed, or did I get that wrong ? |
Would it be useful to add a runner to the existing GitHub-CI to build OpenBLAS for that environment of MSYS2? |
Thought about that, but it did not strike me as that different from the existing builds in the end. |
Given that projects start to switch to UCRT for binaries that they distribute for Windows, and the fact that mingw-w64 switched their default CRT to UCRT, we could also replace the MINGW64 runners with UCRT64 ones. |
Yes, guess it would make sense to replace the MINW64 ones with UCRT64, given that old-style MSVCRT builds are also covered by Azure and Appveyor. (The alternative would seem to be to consolidate all these in runners, if the performance is consistently better - but Appveyor is only used for really ancient gcc builds anyway, not sure if these would fit in with the gh job matrix) |
MSYS2 follows a rolling release model. That means that the compilers are always quite recent versions. I don't know if there is a way to install older versions of the compilers using MSYS2. (I'd guess there isn't.) (If that is what you meant...) |
I am trying to build OpenBlas so I can use
blas_sgemm()
on Windows 10 using x86_64-w64-mingw32. Unfortunately, I keep running across this error, when running themake
command. I did not specify any extra arguments.I already tried
make clean
and installing the mingw dependencies as mentioned here, but no luck:My GCC version is:
Any help on how to solve this is appreciated.
Thank you.
The text was updated successfully, but these errors were encountered: