ngscopeclient / scopehal-apps

ngscopeclient and other client applications for libscopehal.
https://www.ngscopeclient.org/
BSD 3-Clause "New" or "Revised" License
535 stars 83 forks source link

Windows build from source does not complete #574

Closed andreasmatz closed 1 year ago

andreasmatz commented 1 year ago

Dear all, I want to get glscopeclient up and running to use with a Siglent SDS5000X. My platform is Windows 10 (not really by choice, but most of my other measurement software is windows only). I ran into a build problem that I cannot solve.

First, I installed glscopeclient (binary) in MSYS2. It connected to the scope fine, but there was no waveform but only errors:

<== [31;1mERROR:←[0m ReadWaveformBlock for wavedesc 0 failed

Afterwards, I uninstalled it again and followed the steps in the build section.

Building the dependencies went fine. Building scopehal-apps failed at this step:

  1. Execute makepkg-mingw in subdir MSYS2: //... MINGW_ARCH = mingw64 makepkg - mingw -- noconfirm -- noprogressbar - sCLf

This build command itself fails on step 464/465 (or 14/15, if you restart it afterwards):

Admin@Labor-PC MINGW64 ~/scopehal-apps/msys2
# MINGW_ARCH=mingw64 makepkg-mingw --noconfirm --noprogressbar -sCLf
==>  MINGW_ARCH: mingw64
  -> Building mingw64...
==> Making package: mingw-w64-scopehal-apps 0.0.0.r2250.g5dff40f-1 (Sat Mar 11 22:19:19 2023)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> Removing existing $srcdir/ directory...
==> Extracting sources...
==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
CMake Warning at cmake/FindVulkan.cmake:523 (message):
  Library glslang for Debug configuration is missing, imported target
  Vulkan::glslang may not be able to link when targeting this build
  configuration due to incompatible MSVC ABI.  Consider re-installing the
  Vulkan SDK and request debug libraries to fix this warning.
Call Stack (most recent call first):
  cmake/FindVulkan.cmake:537 (_Vulkan_set_library_component_found)
  CMakeLists.txt:60 (include)

CMake Warning at cmake/FindVulkan.cmake:523 (message):
  Library shaderc_combined for Debug configuration is missing, imported
  target Vulkan::shaderc_combined may not be able to link when targeting this
  build configuration due to incompatible MSVC ABI.  Consider re-installing
  the Vulkan SDK and request debug libraries to fix this warning.
Call Stack (most recent call first):
  cmake/FindVulkan.cmake:544 (_Vulkan_set_library_component_found)
  CMakeLists.txt:60 (include)

-- Found Vulkan: C:/VulkanSDK/1.3.224.1/Lib/vulkan-1.lib (found version "1.3.224") found components: glslang shaderc_combined glslc glslangValidator
CMake Warning at cmake/FindVulkan.cmake:523 (message):
  Library glslang for Debug configuration is missing, imported target
  Vulkan::glslang may not be able to link when targeting this build
  configuration due to incompatible MSVC ABI.  Consider re-installing the
  Vulkan SDK and request debug libraries to fix this warning.
Call Stack (most recent call first):
  cmake/FindVulkan.cmake:537 (_Vulkan_set_library_component_found)
  src/glscopeclient/CMakeLists.txt:11 (find_package)

CMake Warning at cmake/FindVulkan.cmake:523 (message):
  Library shaderc_combined for Debug configuration is missing, imported
  target Vulkan::shaderc_combined may not be able to link when targeting this
  build configuration due to incompatible MSVC ABI.  Consider re-installing
  the Vulkan SDK and request debug libraries to fix this warning.
Call Stack (most recent call first):
  cmake/FindVulkan.cmake:544 (_Vulkan_set_library_component_found)
  src/glscopeclient/CMakeLists.txt:11 (find_package)

-- Found Vulkan: C:/VulkanSDK/1.3.224.1/Lib/vulkan-1.lib (found version "1.3.224") found components: glslc glslangValidator
nfd Platform: PLATFORM_WIN32
nfd Compiler: COMPILER_GNU
-- Configuring done
-- Generating done
-- Build files have been written to: C:/msys64/home/Admin/scopehal-apps/build
[1/15] cmd.exe /C "cd /D C:\msys64\home\Admin\scopehal-apps\build\lib\scopeprotocols\shaders && C:\msys64\mingw64\bin\cmake.exe -E true"
[2/15] Copying gradients...
[3/15] Copying styles...
[4/15] cmd.exe /C "cd /D C:\msys64\home\Admin\scopehal-apps\build\src\glscopeclient\shaders && C:\msys64\mingw64\bin\cmake.exe -E true"
[5/15] cmd.exe /C "cd /D C:\msys64\home\Admin\scopehal-apps\build\src\ngscopeclient\shaders && C:\msys64\mingw64\bin\cmake.exe -E true"
[6/15] Copying shaders...
[7/15] cmd.exe /C "cd /D C:\msys64\home\Admin\scopehal-apps\build\src\ngscopeclient\shaders && C:\msys64\mingw64\bin\cmake.exe -E true"
[8/15] Copying fonts...
[9/15] Copying protocol shaders...
[10/15] Copying protocol shaders...
[11/15] Copying icons...
[12/15] Copying icons...
[13/15] Creating dist/windows_x64...
[14/15] Creating Windows x64 MSI...
FAILED: src/glscopeclient/CMakeFiles/msi_windows_x64 C:/msys64/home/Admin/scopehal-apps/build/src/glscopeclient/CMakeFiles/msi_windows_x64
cmd.exe /C "cd /D C:\msys64\home\Admin\scopehal-apps\build && C:\msys64\mingw64\bin\cmake.exe -E copy C:/msys64/home/Admin/scopehal-apps/src/glscopeclient/wix/LICENSE.rtf C:/msys64/home/Admin/scopehal-apps/build && "C:\Program Files (x86)\WiX Toolset v3.11\bin\heat" dir dist/windows_x64 -gg -ke -scom -sreg -srd -cg AllFiles -dr APPLICATIONFOLDER -sfrag -template fragment -out glscopeclient-files.wxs && "C:\Program Files (x86)\WiX Toolset v3.11\bin\candle" -nologo glscopeclient-files.wxs -arch x64 -out glscopeclient-files.wixobj && "C:\Program Files (x86)\WiX Toolset v3.11\bin\candle" -nologo glscopeclient.wxs -arch x64 -out glscopeclient.wixobj -ext WixUIExtension -ext WixUtilExtension && "C:\Program Files (x86)\WiX Toolset v3.11\bin\light" -nologo glscopeclient-files.wixobj glscopeclient.wixobj -b dist/windows_x64 -out dist/glscopeclient-5dff40f-windows-x64.msi -ext WixUIExtension -ext WixUtilExtension"
Das System kann den angegebenen Pfad nicht finden.
[15/15] Creating portable zip from dist/windows_x64...
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...

I am not sure in which working directory step 14 is supposed to happen, but both build/CMakeFiles and build/src/glscopeclient/CMakeFiles/ have no msi_windows_x64, so either way it is not surprising that it cannot be found.

I seem to be missing something, but I am not sure what went wrong. Do you have any ideas? Best regards, Andreas

Bueddl commented 1 year ago

Hi!

one way to get started might be to look into what the CI does: https://github.com/glscopeclient/scopehal-apps/blob/master/.github/workflows/build-windows.yml (CI builds can be seen here https://github.com/glscopeclient/scopehal-apps/actions/workflows/build-windows.yml and you could also download the artifacts in case this helps)

Maybe you are missing some minor step here?

HTH Sebastian

bvernoux commented 1 year ago

It seems you have not installed WiX Toolset v3.11 in C:\Program Files (x86)\WiX Toolset v3.11\bin

andreasmatz commented 1 year ago

Installing WiX Toolset fixed the issue. Thanks bvernoux! Closing this.