-
-
Notifications
You must be signed in to change notification settings - Fork 110
GCC build errors reported on Windows #155
Comments
Ok, I'll see what's going on. |
Briefly:
|
More details:
So it is not a libmdbx's error, but Nothing can be fixed inside libmdbx to avoid this. |
Additionally, it is worth noting that the macro |
Actually that glitch occurred when I ran
The CMake build fails unless the sources be in a git repo. This was causing problems for me with the way Nim installs packages ... basically by the time CMake runs, my package's source tree (and submodules) has been copied and isn't a git repo any more. Obviously not your problem; I'll try to find a workaround. Thanks for your help! |
Perhaps I'm confusing something, but AFAIR, I checked the work of |
And, of course, all suggestions on how to make the |
@snej, I just added an amalgamated source code check during This means that my amalgamation script do not have any troubles, it work fine on Linux, FreeBSD and MacOS. |
Looks like Go doesn't support linking to MSVC files ( golang/go#20982 ). So, i'm trying to build with mingw. But I didn't use amalgamated code, I run next on "libmdbx" git submodule: |
The first problem was that when building with MinGW, the target version of Windows is selected too old, in which this enum is not yet defined. I made a couple of commits to fix this. However, the second problem
@AskAlexSharov, could you try these solutions (since I haven't MinGW for now) ? |
@AskAlexSharov, another option: you may prefer to build libmdbx by MSVC as a shared library (i.e. dll) with |
|
I've added a few more fixes, but I am more and more inclined to close this issue as "won't fix" since MinGW don't support:
|
Now it (likely) should be possible to build libmdbx by MinGW with (a lot of) warnings, but I still suggest you to use a dll built by MSVC. |
Some warnings of MSVC build: https://github.com/torquem-ch/mdbx-go/runs/2533871563?check_suite_focus=true#step:5:108 |
Windows, MSVC and MinGW must die. |
I got a bit same conclusion today. Will see if I can over-sleep it. |
I have a bug report against my Nimdbx wrapper, that mdbx.c (the amalgamation prebuilt by me with
make dist
) fails to compile with GCC on Windows. I do know Nimdbx builds on macOS and Ubuntu. The first two errors are:I've never seen a preprocessor symbol used as the parameter of
#include
before; is it a GCC extension? But it seems to work for me with Clang, and on Github Actions CI with GCC on Ubuntu.I grepped the libmdbx "dist" sources, and there is no definition of
FILE_INFO_BY_HANDLE_CLASS
anywhere. The code that uses it is conditionalized for Windows only. Is this a libmdbx bug? Or is that symbol supposed to come from a Windows platform header?Unrelated, but I also noticed a missing line break on line 1 of mdbx.c:
It looks like the "
n
" before the second#define
was supposed to be a "\\n
"...(This is using libmdbx commit 3a441d6 from 4 Jan.)
The text was updated successfully, but these errors were encountered: