microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.51k stars 4.4k forks source link

[Package Issue]: SWIG.SWIG: `swig.exe <file>` always fails because `swig.exe -swiglib` is wrong #168066

Open unawarez opened 3 weeks ago

unawarez commented 3 weeks ago

Please confirm these before moving forward

Category of the issue

Other

Brief description of your issue

The swig.exe placed on the system path fails immediately for any input file. SWIG needs to find its standard library dir at runtime, which swig.exe -swiglib is supposed to print. On my machine, the output is the nonexistent path %LOCALAPPDATA%\Microsoft\WinGet\Links\Lib. I found the dir it wants within Packages instead of Links.

CMake is also failing on a project with find_package(SWIG REQUIRED). It finds swig.exe in the WinGet\Links dir, then calls it with -swiglib, sees the result is a broken path, and then fails configuring the project due to "SWIG not found".

Steps to reproduce

Actual behavior

Running SWIG:

C:\Users\User>swig -python -module empty empty.txt
(999999) : Error: Unable to find 'swig.swg'
(2) : Error: Unable to find 'python.swg'

Checking -swiglib output:

PS C:\Users\User> swig.exe -swiglib
C:\Users\User\AppData\Local\Microsoft\WinGet\Links\Lib
PS C:\Users\User> dir C:\Users\User\AppData\Local\Microsoft\WinGet\Links\Lib
dir : Cannot find path 'C:\Users\User\AppData\Local\Microsoft\WinGet\Links\Lib' because it does not exist.
At line:1 char:1
+ dir C:\Users\User\AppData\Local\Microsoft\WinGet\Links\Lib
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\User\A...inGet\Links\Lib:String) [Get-ChildItem], ItemNotFound
   Exception
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

PS C:\Users\User> dir C:\Users\User\AppData\Local\Microsoft\WinGet\Links\

    Directory: C:\Users\User\AppData\Local\Microsoft\WinGet\Links

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---l         8/16/2024   4:43 PM              0 ccache-swig.exe
-a---l         8/16/2024   4:43 PM              0 swig.exe

Finding correct path:

PS C:\Users\User> dir C:\Users\User\AppData\Local\Microsoft\WinGet\Packages\SWIG.SWIG_Microsoft.Winget.Source_8wekyb3d8bbwe\swigwin-4.2.1\Lib

    Directory: C:\Users\User\AppData\Local\Microsoft\WinGet\Packages\SWIG.SWIG_Microsoft.Winget.Source_8wekyb3d8bbwe\sw
    igwin-4.2.1\Lib

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         8/16/2024   4:43 PM                csharp
d-----         8/16/2024   4:43 PM                d
d-----         8/16/2024   4:42 PM                go
d-----         8/16/2024   4:43 PM                guile
d-----         8/16/2024   4:43 PM                java
d-----         8/16/2024   4:42 PM                javascript
d-----         8/16/2024   4:43 PM                lua
d-----         8/16/2024   4:43 PM                mzscheme
d-----         8/16/2024   4:43 PM                ocaml
d-----         8/16/2024   4:43 PM                octave
d-----         8/16/2024   4:43 PM                perl5
d-----         8/16/2024   4:43 PM                php
d-----         8/16/2024   4:43 PM                python
d-----         8/16/2024   4:43 PM                r
d-----         8/16/2024   4:43 PM                ruby
d-----         8/16/2024   4:43 PM                scilab
d-----         8/16/2024   4:43 PM                std
d-----         8/16/2024   4:43 PM                tcl
d-----         8/16/2024   4:43 PM                typemaps
d-----         8/16/2024   4:43 PM                xml
------         2/23/2024  10:57 PM            748 allkw.swg
------         2/23/2024  10:57 PM            496 attribute.i
------         2/23/2024  10:57 PM           2804 carrays.i
------         2/23/2024  10:57 PM           2834 cdata.i
------         2/23/2024  10:57 PM           2354 cmalloc.i
------         2/23/2024  10:57 PM           7156 constraints.i
------         2/23/2024  10:57 PM           3630 cpointer.i
------         2/23/2024  10:57 PM            324 cstring.i
------         2/23/2024  10:57 PM            265 cwstring.i
------         2/23/2024  10:57 PM            512 director_common.swg
------         2/23/2024  10:57 PM           8745 exception.i
------         2/23/2024  10:57 PM           1819 intrusive_ptr.i
------         2/23/2024  10:57 PM           1588 inttypes.i
------         2/23/2024  10:57 PM           1623 javascriptkw.swg
------         2/23/2024  10:57 PM            512 linkruntime.c
------         2/23/2024  10:57 PM           2274 math.i
------         2/23/2024  10:57 PM           1236 runtime.swg
------         2/23/2024  10:57 PM           2202 shared_ptr.i
------         2/23/2024  10:57 PM           2368 stdint.i
------         2/23/2024  10:57 PM           2099 std_except.i
------         2/23/2024  10:57 PM            249 stl.i
------         2/23/2024  10:57 PM          25909 swig.swg
------         2/23/2024  10:57 PM           1060 swigarch.i
------         2/23/2024  10:57 PM            944 swigcompat.swg
------         2/23/2024  10:57 PM            565 swigerrors.swg
------         2/23/2024  10:57 PM           3351 swigfragments.swg
------         2/23/2024  10:57 PM           8126 swiginit.swg
------         2/23/2024  10:57 PM           3922 swiglabels.swg
------         2/23/2024  10:57 PM            256 swigrun.i
------         2/23/2024  10:57 PM          17235 swigrun.swg
------         2/24/2024   7:36 AM          15654 swigwarn.swg
------         2/23/2024  10:57 PM           7305 swigwarnings.swg
------         2/23/2024  10:57 PM            309 wchar.i
------         2/23/2024  10:57 PM           4181 windows.i

Expected behavior

The empty swig command should exit successfully with no output (and creating some files). The output of swig -swiglib should be a directory containing swig.swg among other files.

Environment

C:\Users\User>winget --info
Windows Package Manager v1.8.1911
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.3880
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1911.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled

C:\Users\User>winget list
Name                                           Id                                             Version           Source
-----------------------------------------------------------------------------------------------------------------------
Git                                            Git.Git                                        2.46.0            winget
Oracle VM VirtualBox Guest Additions 7.0.14    ARP\Machine\X64\Oracle VM VirtualBox Guest Ad… 7.0.14.161095
Microsoft ODBC Driver 17 for SQL Server        ARP\Machine\X64\{0E0F96AC-80DE-4400-A40C-429D… 17.10.6.1
Microsoft SQL Server 2019 LocalDB              ARP\Machine\X64\{36E492B8-CB83-4DA5-A5D2-D99A… 15.0.4153.1
Windows Subsystem for Linux Update             ARP\Machine\X64\{36EF257E-21D5-44F7-8451-0792… 5.10.16
Microsoft System CLR Types for SQL Server 2019 Microsoft.CLRTypesSQLServer.2019               15.0.2000.5       winget
Microsoft Visual Studio Installer              ARP\Machine\X64\{6F320B93-EE3C-4826-85E0-ADF7… 3.11.2177.7163
Microsoft Azure Libraries for .NET – v2.9      ARP\Machine\X64\{7D1D9444-B5EA-4587-A81D-4737… 3.0.2404.2502
IIS 10.0 Express                               ARP\Machine\X64\{A43F6F96-4CED-4152-8086-AF95… 10.0.08608
Microsoft Azure CLI (64-bit)                   Microsoft.AzureCLI                             2.63.0            winget
Microsoft Update Health Tools                  ARP\Machine\X64\{C6FD611E-7EFE-488C-A0E0-974C… 5.72.0.0
Microsoft .NET SDK 8.0.400 (x64) from Visual … ARP\Machine\X64\{D77DA550-2511-4108-8019-D02D… 8.4.24.37502
Microsoft Edge                                 Microsoft.Edge                                 127.0.2651.105    winget
Microsoft Edge Update                          ARP\Machine\X86\Microsoft Edge Update          1.3.195.15
Microsoft Edge WebView2 Runtime                Microsoft.EdgeWebView2Runtime                  127.0.2651.105    winget
Visual Studio Community 2022                   Microsoft.VisualStudio.2022.Community          17.11.0           winget
vs_CoreEditorFonts                             ARP\Machine\X86\{1851460E-0E63-4117-B5BA-25A2… 17.7.40001
Microsoft Visual C++ 2015-2022 Redistributabl… Microsoft.VCRedist.2015+.x86                   14.40.33810.0     winget
Microsoft Visual C++ 2015-2022 Redistributabl… Microsoft.VCRedist.2015+.x64                   14.40.33810.0     winget
Windows Assessment and Deployment Kit          Microsoft.WindowsADK                           10.1.26100.1      winget
Windows Software Development Kit - Windows 10… ARP\Machine\X86\{71684ad3-afc2-4a65-9d45-92ef… 10.1.22621.3233
Windows SDK AddOn                              ARP\Machine\X86\{F1E37C98-16B7-421F-BA33-6C5B… 10.1.0.0
Python Launcher                                Python.Launcher                                > 3.12.0          winget
Microsoft OneDrive                             Microsoft.OneDrive                             24.156.0804.0002  winget
SWIG                                           SWIG.SWIG                                      4.2.1             winget
Python 3.12.5 (64-bit)                         Python.Python.3.12                             3.12.5            winget
Vulkan SDK 1.3.261.1                           KhronosGroup.VulkanSDK                         1.3.261.1         winget
Ubuntu on Windows                              MSIX\CanonicalGroupLimited.UbuntuonWindows_20… 2004.2022.1.0
Clipchamp                                      MSIX\Clipchamp.Clipchamp_2.2.8.0_neutral__yxz… 2.2.8.0
Cortana                                        MSIX\Microsoft.549981C3F5F10_3.2204.14815.0_x… 3.2204.14815.0
App Installer                                  Microsoft.AppInstaller                         1.23.1911.0       winget
Xbox                                           MSIX\Microsoft.GamingApp_2105.900.24.0_x64__8… 2105.900.24.0
Get Help                                       MSIX\Microsoft.GetHelp_10.2403.20861.0_x64__8… 10.2403.20861.0
Microsoft Tips                                 MSIX\Microsoft.Getstarted_10.2312.1.0_x64__8w… 10.2312.1.0
HEIF Image Extensions                          MSIX\Microsoft.HEIFImageExtension_1.1.861.0_x… 1.1.861.0
HEVC Video Extensions from Device Manufacturer MSIX\Microsoft.HEVCVideoExtension_2.1.1803.0_… 2.1.1803.0
Microsoft Edge                                 MSIX\Microsoft.MicrosoftEdge.Stable_127.0.265… 127.0.2651.98
Microsoft Sticky Notes                         MSIX\Microsoft.MicrosoftStickyNotes_4.0.422.0… 4.0.422.0
Microsoft .Net Native Framework Package 2.2    MSIX\Microsoft.NET.Native.Framework.2.2_2.2.2… 2.2.29512.0
Microsoft .Net Native Framework Package 2.2    MSIX\Microsoft.NET.Native.Framework.2.2_2.2.2… 2.2.29512.0
Microsoft .Net Native Runtime Package 2.2      MSIX\Microsoft.NET.Native.Runtime.2.2_2.2.286… 2.2.28604.0
Microsoft .Net Native Runtime Package 2.2      MSIX\Microsoft.NET.Native.Runtime.2.2_2.2.286… 2.2.28604.0
Paint                                          MSIX\Microsoft.Paint_11.2404.1020.0_x64__8wek… 11.2404.1020.0
Power Automate                                 MSIX\Microsoft.PowerAutomateDesktop_1.0.219.0… 1.0.219.0
Raw Image Extension                            MSIX\Microsoft.RawImageExtension_2.3.2051.0_x… 2.3.2051.0
Snipping Tool                                  MSIX\Microsoft.ScreenSketch_11.2201.12.0_x64_… 11.2201.12.0
Windows Security                               MSIX\Microsoft.SecHealthUI_1000.25992.9000.0_… 1000.25992.9000.0
Store Experience Host                          MSIX\Microsoft.StorePurchaseApp_22406.1401.1.… 22406.1401.1.0
Microsoft.UI.Xaml.2.4                          MSIX\Microsoft.UI.Xaml.2.4_2.42007.9001.0_x64… 2.42007.9001.0
Microsoft.UI.Xaml.2.7                          Microsoft.UI.Xaml.2.7                          7.2208.15002.0    winget
Microsoft.UI.Xaml.2.7                          Microsoft.UI.Xaml.2.7                          7.2208.15002.0    winget
Microsoft.UI.Xaml.2.8                          Microsoft.UI.Xaml.2.8                          8.2310.30001.0    winget
Microsoft.UI.Xaml.2.8                          Microsoft.UI.Xaml.2.8                          8.2310.30001.0    winget
Microsoft Visual C++ 2015 UWP Desktop Runtime… Microsoft.VCLibs.Desktop.14                    14.0.33728.0      winget
Microsoft Visual C++ 2015 UWP Desktop Runtime… Microsoft.VCLibs.Desktop.14                    14.0.33728.0      winget
Microsoft Visual C++ 2015 UWP Runtime Package  MSIX\Microsoft.VCLibs.140.00_14.0.33519.0_x64… 14.0.33519.0
Microsoft Visual C++ 2015 UWP Runtime Package  MSIX\Microsoft.VCLibs.140.00_14.0.33519.0_x86… 14.0.33519.0
VP9 Video Extensions                           MSIX\Microsoft.VP9VideoExtensions_1.1.451.0_x… 1.1.451.0
Web Media Extensions                           MSIX\Microsoft.WebMediaExtensions_1.1.1295.0_… 1.1.1295.0
Webp Image Extensions                          MSIX\Microsoft.WebpImageExtension_1.1.1711.0_… 1.1.1711.0
Microsoft Photos                               MSIX\Microsoft.Windows.Photos_21.21030.25003.… 21.21030.25003.0
Windows Clock                                  MSIX\Microsoft.WindowsAlarms_1.0.75.0_x64__8w… 1.0.75.0
WindowsAppRuntime.1.4                          MSIX\Microsoft.WindowsAppRuntime.1.4_4000.130… 4000.1309.2056.0
WindowsAppRuntime.1.4                          MSIX\Microsoft.WindowsAppRuntime.1.4_4000.130… 4000.1309.2056.0
Windows Calculator                             MSIX\Microsoft.WindowsCalculator_11.2405.2.0_… 11.2405.2.0
Windows Camera                                 MSIX\Microsoft.WindowsCamera_2022.2201.4.0_x6… 2022.2201.4.0
Feedback Hub                                   MSIX\Microsoft.WindowsFeedbackHub_1.2405.2148… 1.2405.21481.0
Windows Notepad                                MSIX\Microsoft.WindowsNotepad_11.2405.13.0_x6… 11.2405.13.0
Windows Voice Recorder                         MSIX\Microsoft.WindowsSoundRecorder_1.0.42.0_… 1.0.42.0
Microsoft Store                                MSIX\Microsoft.WindowsStore_22406.1401.7.0_x6… 22406.1401.7.0
Windows Terminal                               Microsoft.WindowsTerminal                      1.20.11781.0      winget
Windows Package Manager Source (winget) V2     MSIX\Microsoft.Winget.Source_2024.817.130.49_… 2024.817.130.49
Xbox TCUI                                      MSIX\Microsoft.Xbox.TCUI_1.23.28004.0_x64__8w… 1.23.28004.0
Xbox Game Bar Plugin                           MSIX\Microsoft.XboxGameOverlay_1.47.2385.0_x6… 1.47.2385.0
Game Bar                                       MSIX\Microsoft.XboxGamingOverlay_7.124.5142.0… 7.124.5142.0
Xbox Identity Provider                         MSIX\Microsoft.XboxIdentityProvider_12.50.600… 12.50.6001.0
Xbox Game Speech Window                        MSIX\Microsoft.XboxSpeechToTextOverlay_1.17.2… 1.17.29001.0
Quick Assist                                   MSIX\MicrosoftCorporationII.QuickAssist_2.0.5… 2.0.5.0
Windows Web Experience Pack                    MSIX\MicrosoftWindows.Client.WebExperience_52… 524.18500.10.0

Screenshots and Logs

No response

Dragon1573 commented 3 weeks ago
Trenly commented 3 weeks ago

[Policy] Zip Binary

microsoft-github-policy-service[bot] commented 3 weeks ago

Hello @unawarez,

This package appears to depend on .dlls that aren't available via symlink.

This package is blocked until support for zipped binaries is implemented in:

Be sure to add your 👍 to the issue to help raise the priority and avoid posting "Me too!" messages to respect those who have subscribed to the issue.

Template: msftbot/blockingIssue/zipBinary

unawarez commented 3 weeks ago

Just to clarify by "library" it's looking for text files, not DLLs, but looks like that issue still applies (I think? I don't know anything about WinGet manifests or installation at this point)