Building wxWidgets using CMAKE for ARM64 MSW, it generates the wrong lib folder name (Issue #23347)

301 views
Skip to first unread message

ROSSANO PARIS

unread,
Mar 14, 2023, 5:49:43 AM3/14/23
to wx-...@googlegroups.com, Subscribed

Description

Building wxWidgests using CMAKE for MSW arm64 architecture, I've noticed two strange things.
The main one is the final lib folder name, which should be wrong despite its content is OK, I mean binay files.

To build wx, I open MSW terminal and launched vcvarsamd64_arm64.bat batch file in order to prepare ARM64 enviroment as usual; with "as usual" I mean the normal way used with nmake.
vcvarsamd64_arm64.bat is located in "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build"

Then, I prepared the build configuration using the following CMAKE command line:
cmake -S%WXSRC% -B%WXBUILD% -AARM64 -D"wxBUILD_TOOLKIT=msw" -D"CMAKE_BUILD_TYPE=Release" -D"BUILD_SHARED_LIBS=OFF" -D"wxBUILD_USE_STATIC_RUNTIME=ON" -D"wxBUILD_OPTIMISE=ON" -D"wxUSE_STL=ON" -D"wxUSE_UNSAFE_WXSTRING_CONV=OFF" -D"wxUSE_ZLIB=builtin" -D"wxUSE_REGEX=builtin" -D"wxBUILD_COMPATIBILITY=3.1" -D"wxBUILD_VENDOR="

This is the final output, which show (x64 Edition), I would have expected (arm64 Edition):

-- Which libraries should wxWidgets use?
    wxUSE_STL:      ON       (use C++ STL classes)
    wxUSE_REGEX:    builtin  (enable support for wxRegEx class)
    wxUSE_ZLIB:     builtin  (use zlib for LZW compression)
    wxUSE_EXPAT:    builtin  (use expat for XML parsing)
    wxUSE_LIBJPEG:  builtin  (use libjpeg (JPEG file format))
    wxUSE_LIBPNG:   builtin  (use libpng (PNG image format))
    wxUSE_LIBTIFF:  builtin  (use libtiff (TIFF file format))
    wxUSE_NANOSVG:  builtin  (use NanoSVG for rasterizing SVG)
    wxUSE_LIBLZMA:  OFF      (use liblzma for LZMA compression)

-- Configured wxWidgets 3.2.2 for Windows-10.0.22000
    Min OS Version required at runtime:                Windows Vista / Windows Server 2008 (x64 Edition)
    Which GUI toolkit should wxWidgets use?            msw
    Should wxWidgets be compiled into single library?  OFF
    Should wxWidgets be linked as a shared library?    OFF
    Should wxWidgets support Unicode?                  ON
    What wxWidgets compatibility level should be used? 3.1
-- Configuring done
-- Generating done
-- Build files have been written to: C:/temp/build-wx

Going ahead with the building procedure, the final binary files are built correctly, but the not expected thing is the lib folder name, which is "vc_x64_lib" instead of "vc_arm64_lib".

For sure I'm missing something, but I'm not able to notice it ...

Best regards
Rossano

Platform and version information

  • wxWidgets version you are building: v3.2.2.1
  • wxWidgets port you are building: wxMSW
  • OS and its version: Windows 11
  • Compiler being used: MSVS 2022


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23347@github.com>

VZ

unread,
Mar 14, 2023, 5:59:36 AM3/14/23
to wx-...@googlegroups.com, Subscribed

I don't think CMake supports arm64 under MSW, it seems to hardcode x64 for all 64-bit platforms:

https://github.com/wxWidgets/wxWidgets/blob/19100f63ca0e19234010230bcd854b53d4989f7b/build/cmake/init.cmake#L131-L133

From a quick web search it looks like we ought to be using CMAKE_GENERATOR_PLATFORM instead but I'm not really sure.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23347/1467774154@github.com>

Maarten

unread,
Mar 14, 2023, 6:19:10 AM3/14/23
to wx-...@googlegroups.com, Subscribed

CMAKE_SYSTEM_PROCESSOR might work too.
I'll have a look at installing the arm and arm64 build tools and see what their values are.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23347/1467810261@github.com>

Tobias Taschner

unread,
Mar 16, 2023, 5:03:01 PM3/16/23
to wx-...@googlegroups.com, Subscribed

@MaartenBent I've just stumbled acros this including WebView2Loader.dll not being copied from the correct location. If you haven't yet looked into this I could do it.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23347/1472735082@github.com>

Maarten

unread,
Mar 16, 2023, 5:18:36 PM3/16/23
to wx-...@googlegroups.com, Subscribed

I looked at the values of those defines, but didn't fix anything yet.
CMAKE_SYSTEM_PROCESSOR is always AMD64.
CMAKE_GENERATOR_PLATFORM (available since 3.1) does seem usable, it is x64 or ARM64. Don't know if ARM should be added, since the bakefile/makefiles do not have it.

You can go ahead and fix this.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23347/1472755417@github.com>

Tobias Taschner

unread,
Mar 16, 2023, 5:21:55 PM3/16/23
to wx-...@googlegroups.com, Subscribed

I don't think ARM is of any concern anymore.
If you add a fix please make sure to look at build/cmake/webview/CMakeLists.txt for arch of the WebView2 libs.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23347/1472759514@github.com>

Tobias Taschner

unread,
Mar 16, 2023, 5:22:25 PM3/16/23
to wx-...@googlegroups.com, Subscribed

Sorry, misread your last sentence. I'll make the changes


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23347/1472760166@github.com>

ROSSANO PARIS

unread,
Mar 17, 2023, 11:40:28 AM3/17/23
to wx-...@googlegroups.com, Subscribed

Thank you!


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23347/1474030295@github.com>

VZ

unread,
Mar 18, 2023, 4:03:22 PM3/18/23
to wx-...@googlegroups.com, Subscribed

Closed #23347 as completed via 1edb38b.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/23347/issue_event/8785782367@github.com>

Reply all
Reply to author
Forward
0 new messages