[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Performance improvement for large keysets
From: |
Pavel Pavlov |
Subject: |
Re: Performance improvement for large keysets |
Date: |
Sun, 4 May 2025 18:42:40 +0200 |
When I see such hairy instructions I assume they do not work. All
those things in paths like "WindowsCrtIncludeDir='C:\Program Files
(x86)\Windows Kits\10\Include\10.0.10240.0\ucrt'" cannot possibly
work, unless one happens to magically get the same old version of win
sdk.
These much simpler instructions should work for anybody:
from msvc developer command prompt (the one that sets x64 or x86 env)
start mingw64 shell: `C:\msys64\msys2_shell.cmd -mingw64
-use-full-path`
`-use-full-path` param above is essential, this ensure that the
mingw64 shell that starts will inherit env setup created by the `msvc
developer command prompt`; basically, this takes care of all the env
for INCLUDE/LIB/PATH to be able to compile/lib with ms compiler from
mingw64 shell. This replaces 50+ lines of messy commands in
INSTALL.windows that work only for some version of sdk.
Then, as long as `ar-lib` and `compile` scripts are copied to
"`pwd`/msvc" this configure works:
./configure --host=x86_64-w64-mingw32 --prefix=/usr/local/msvc64 \
CC="`pwd`/msvc/compile cl -nologo /std:c11" \
CFLAGS="-MT" \
CXX="`pwd`/msvc/compile cl -nologo /std:c++11" \
CXXFLAGS="-MT" \
CPPFLAGS="-D_WIN32_WINNT=_WIN32_WINNT_WIN7" \
LD="link" \
NM="dumpbin -symbols" \
STRIP=":" \
AR="`pwd`/msvc/ar-lib lib" \
RANLIB=":"
According to the logs many checks fail though:
checking for /c/work-pps/gperf/gperf.tar/gperf-3.3/msvc/compile cl
-nologo /std:c++11 option to enable C++11 features... unsupported
checking for /c/work-pps/gperf/gperf.tar/gperf-3.3/msvc/compile cl
-nologo /std:c++11 option to enable C++98 features... unsupported
This doesn't seem ok if the check for c++98/c++11 fails even though
there is `/std:c++11` on the cmd line. Not sure how it affects the
build of gperf, but it all works and `make check` also passes. The
final binary is 320KB (vs 1200KB when I build with mingw).
The most important part: this configure created working config.h files
that I can now use with normal VS projects/solutions. This way it's
easy to test/debug/profile gperf on windows.
Pavel
On Sun, 4 May 2025 at 07:06, Bruno Haible <bruno@clisp.org> wrote:
>
> Hi,
>
> Pavel Pavlov wrote:
> > I tried to build it with VS2022 and it's close to impossible now with
> > the latest updates. The version from previous year didn't require much
> > tweaking and could be built with VS without any problems. Whatever was
> > done, it made close to impossible to build it with ms compiler now
>
> The file INSTALL.windows, included in the gperf-3.3 distribution, section 2,
> explains how to build gperf with that compiler.
>
> We even have a continuous integration [1] which verifies that it builds
> successfully with that compiler and passes all tests.
>
> Bruno
>
> [1] https://github.com/gnu-gperf/ci-check/actions
>
>
>
- Re: Performance improvement for large keysets, Pavel Pavlov, 2025/05/04
- Re: Performance improvement for large keysets, Bruno Haible, 2025/05/04
- Re: Performance improvement for large keysets,
Pavel Pavlov <=
- Re: Performance improvement for large keysets, Pavel Pavlov, 2025/05/04
- Re: Performance improvement for large keysets, Pavel Pavlov, 2025/05/04
- Re: Performance improvement for large keysets, Bruno Haible, 2025/05/04
- Re: Performance improvement for large keysets, Pavel Pavlov, 2025/05/04
- Re: Performance improvement for large keysets, Pavel Pavlov, 2025/05/04
- Re: Performance improvement for large keysets, Bruno Haible, 2025/05/04
- Re: Performance improvement for large keysets, Bruno Haible, 2025/05/04