Skip to content

Conversation

@luadebug
Copy link
Contributor

@luadebug luadebug commented Oct 9, 2025

  • Changes comply with the maintainer guide.
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx.
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

https://repology.org/project/unarr/versions

@luadebug luadebug changed the title unarr: add new package [unarr] add new package Oct 10, 2025
Copy link
Contributor

@JavierMatosD JavierMatosD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JavierMatosD JavierMatosD marked this pull request as draft October 13, 2025 16:16
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"enable-7z" ENABLE_7Z
"zlib-crc32" USE_ZLIB_CRC
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be a feature since you're unconditionally depending on zlib. Unless I'm missing something?

Copy link
Contributor Author

@luadebug luadebug Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will keep this option ON at any case.

@luadebug luadebug marked this pull request as ready for review October 14, 2025 14:14
@luadebug
Copy link
Contributor Author

Dunno maybe Windows OS has some issues with 7zip port?

Installing 2/3 7zip:[email protected]...
no such file or directory
D:\a\_work\1\s\scripts\azure-pipelines\test-modified-ports.ps1 : vcpkg feature testing failed; this is usually a bug in one of the features in the port(s) edited in this pull request. Check for failure logs attached to the run in Azure Pipelines.
At D:\a\_work\_temp\azureclitaskscript1760475845488_inlinescript.ps1:11 char:1
+ & scripts/azure-pipelines/test-modified-ports.ps1 -Triplet x86-window …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,test-modified-ports.ps1

##[error]Script failed with exit code: 1
C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin\az.cmd" account clear"
Finishing: *** Test Modified Ports

@dg0yt
Copy link
Contributor

dg0yt commented Oct 15, 2025

Vcpkg tool bug, #47757 (comment).

@luadebug
Copy link
Contributor Author

Thank you for your explanation, could you notify when storm would calm down and vcpkg would work? Thanks.

@BillyONeal
Copy link
Member

microsoft/vcpkg-tool#1817 bug fix

@BillyONeal BillyONeal added the requires:tool-release An issue that has been fixed in the microsoft/vcpkg-tool repo and is waiting for a release thereof label Oct 16, 2025
@BillyONeal BillyONeal closed this Oct 16, 2025
@BillyONeal BillyONeal reopened this Oct 16, 2025
@BillyONeal BillyONeal removed the requires:tool-release An issue that has been fixed in the microsoft/vcpkg-tool repo and is waiting for a release thereof label Oct 16, 2025
@BillyONeal
Copy link
Member

It looks like the failures are now "real"

@luadebug
Copy link
Contributor Author

luadebug commented Oct 17, 2025

It looks like the failures are now "real"

What would be insight for this case?
It looks like it works only if Windows library is static, but if Windows library is shared it would probably miss required symbols like SzArEx_Init and there is no workaround for this case rather making some unofficial export symbols that is not good thing to do...?

@BillyONeal
Copy link
Member

if Windows library is shared it would probably miss required symbols like SzArEx_Init and there is no workaround for this case

If upstream doesn't care about supporting shared libraries, vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

@BillyONeal
Copy link
Member

Unfortunately there are more bits that seem to have hard coded dependencies on the vendored lzmasdk. Examples:

https://github.com/selmf/unarr/blob/1df8ab3d281409e9fe6bed8bf485976bb47f5bef/CMakeLists.txt#L55-L67

https://github.com/selmf/unarr/blob/1df8ab3d281409e9fe6bed8bf485976bb47f5bef/zip/zip.h#L21

I'm not sure it's going to be easy to devendor this thing :(

@BillyONeal BillyONeal marked this pull request as draft October 17, 2025 21:33
Copy link
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick look.

target_compile_definitions(unarr PRIVATE -DHAVE_BZIP2)
# Bzip2 upstream does not supply a .pc file. Add it to Libs.private.
- set(PROJECT_LIBS_PRIVATE "-I${BZIP2_INCLUDE_DIRS} -l${BZIP2_LIBRARIES}")
+ set(PROJECT_LIBS_PRIVATE "${PROJECT_LIBS_PRIVATE} -I${BZIP2_INCLUDE_DIRS} -l${BZIP2_LIBRARIES}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not your bug, but: -I doesn't belong to pkg-config's Libs.private.

@luadebug
Copy link
Contributor Author

Change Dir: 'D:/b/unarr/x64-windows-dbg'

Run Build Command(s): D:/downloads/tools/ninja/1.13.1-windows/ninja.exe -v -v -j33 install
[1/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\common\crc32.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\common\crc32.c
[2/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\zip\inflate.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\zip\inflate.c
[3/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\_7z\_7z.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\_7z\_7z.c
[4/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\common\conv.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\common\conv.c
[5/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\common\unarr.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\common\unarr.c
[6/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\tar\tar.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\tar\tar.c
[7/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\tar\parse-tar.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\tar\parse-tar.c
[8/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\rar\rar.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\rar\rar.c
[9/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\rar\filter-rar.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\rar\filter-rar.c
[10/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\rar\huffman-rar.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\rar\huffman-rar.c
[11/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\rar\parse-rar.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\rar\parse-rar.c
[12/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\zip\parse-zip.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\zip\parse-zip.c
[13/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\rar\rarvm.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\rar\rarvm.c
[14/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\rar\uncompress-rar.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\rar\uncompress-rar.c
[15/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\zip\uncompress-zip.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\zip\uncompress-zip.c
D:\b\unarr\src\v1.1.1-74767a1cdd.clean\zip\uncompress-zip.c(238): warning C4267: 'return': conversion from 'size_t' to 'uint32_t', possible loss of data
D:\b\unarr\src\v1.1.1-74767a1cdd.clean\zip\uncompress-zip.c(273): warning C4267: 'return': conversion from 'size_t' to 'uint32_t', possible loss of data
[16/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\zip\zip.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\zip\zip.c
[17/19] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe   -DHAVE_7Z -DHAVE_BZIP2 -DHAVE_LIBLZMA -DHAVE_ZLIB -DUNARR_EXPORT_SYMBOLS -DUNARR_IS_SHARED_LIBRARY -DUNICODE -DUSE_ZLIB_CRC -DZ7_PPMD_SUPPORT -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -ID:\b\unarr\src\v1.1.1-74767a1cdd.clean -external:ID:\installed\x64-windows\include\7zip\CPP -external:ID:\installed\x64-windows\include\7zip\C -external:ID:\installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  /W3 /showIncludes /FoCMakeFiles\unarr.dir\common\stream.c.obj /FdCMakeFiles\unarr.dir\ /FS -c D:\b\unarr\src\v1.1.1-74767a1cdd.clean\common\stream.c
[18/19] C:\Windows\system32\cmd.exe /C "cd . && D:\downloads\tools\cmake-3.30.1-windows\cmake-3.30.1-windows-i386\bin\cmake.exe -E vs_link_dll --intdir=CMakeFiles\unarr.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\link.exe  CMakeFiles\unarr.dir\_7z\_7z.c.obj CMakeFiles\unarr.dir\common\conv.c.obj CMakeFiles\unarr.dir\common\crc32.c.obj CMakeFiles\unarr.dir\common\stream.c.obj CMakeFiles\unarr.dir\common\unarr.c.obj CMakeFiles\unarr.dir\rar\filter-rar.c.obj CMakeFiles\unarr.dir\rar\uncompress-rar.c.obj CMakeFiles\unarr.dir\rar\huffman-rar.c.obj CMakeFiles\unarr.dir\rar\rar.c.obj CMakeFiles\unarr.dir\rar\rarvm.c.obj CMakeFiles\unarr.dir\rar\parse-rar.c.obj CMakeFiles\unarr.dir\tar\parse-tar.c.obj CMakeFiles\unarr.dir\tar\tar.c.obj CMakeFiles\unarr.dir\zip\inflate.c.obj CMakeFiles\unarr.dir\zip\parse-zip.c.obj CMakeFiles\unarr.dir\zip\uncompress-zip.c.obj CMakeFiles\unarr.dir\zip\zip.c.obj  /out:unarr.dll /implib:unarr.lib /pdb:unarr.pdb /dll /version:1.1 /machine:x64 /nologo    /debug /INCREMENTAL  D:\installed\x64-windows\debug\lib\7zip.lib  D:\installed\x64-windows\debug\lib\bz2d.lib  D:\installed\x64-windows\debug\lib\lzma.lib  D:\installed\x64-windows\debug\lib\zlibd.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FAILED: [code=4294967295] unarr.dll unarr.lib 
C:\Windows\system32\cmd.exe /C "cd . && D:\downloads\tools\cmake-3.30.1-windows\cmake-3.30.1-windows-i386\bin\cmake.exe -E vs_link_dll --intdir=CMakeFiles\unarr.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\link.exe  CMakeFiles\unarr.dir\_7z\_7z.c.obj CMakeFiles\unarr.dir\common\conv.c.obj CMakeFiles\unarr.dir\common\crc32.c.obj CMakeFiles\unarr.dir\common\stream.c.obj CMakeFiles\unarr.dir\common\unarr.c.obj CMakeFiles\unarr.dir\rar\filter-rar.c.obj CMakeFiles\unarr.dir\rar\uncompress-rar.c.obj CMakeFiles\unarr.dir\rar\huffman-rar.c.obj CMakeFiles\unarr.dir\rar\rar.c.obj CMakeFiles\unarr.dir\rar\rarvm.c.obj CMakeFiles\unarr.dir\rar\parse-rar.c.obj CMakeFiles\unarr.dir\tar\parse-tar.c.obj CMakeFiles\unarr.dir\tar\tar.c.obj CMakeFiles\unarr.dir\zip\inflate.c.obj CMakeFiles\unarr.dir\zip\parse-zip.c.obj CMakeFiles\unarr.dir\zip\uncompress-zip.c.obj CMakeFiles\unarr.dir\zip\zip.c.obj  /out:unarr.dll /implib:unarr.lib /pdb:unarr.pdb /dll /version:1.1 /machine:x64 /nologo    /debug /INCREMENTAL  D:\installed\x64-windows\debug\lib\7zip.lib  D:\installed\x64-windows\debug\lib\bz2d.lib  D:\installed\x64-windows\debug\lib\lzma.lib  D:\installed\x64-windows\debug\lib\zlibd.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\link.exe CMakeFiles\unarr.dir\_7z\_7z.c.obj CMakeFiles\unarr.dir\common\conv.c.obj CMakeFiles\unarr.dir\common\crc32.c.obj CMakeFiles\unarr.dir\common\stream.c.obj CMakeFiles\unarr.dir\common\unarr.c.obj CMakeFiles\unarr.dir\rar\filter-rar.c.obj CMakeFiles\unarr.dir\rar\uncompress-rar.c.obj CMakeFiles\unarr.dir\rar\huffman-rar.c.obj CMakeFiles\unarr.dir\rar\rar.c.obj CMakeFiles\unarr.dir\rar\rarvm.c.obj CMakeFiles\unarr.dir\rar\parse-rar.c.obj CMakeFiles\unarr.dir\tar\parse-tar.c.obj CMakeFiles\unarr.dir\tar\tar.c.obj CMakeFiles\unarr.dir\zip\inflate.c.obj CMakeFiles\unarr.dir\zip\parse-zip.c.obj CMakeFiles\unarr.dir\zip\uncompress-zip.c.obj CMakeFiles\unarr.dir\zip\zip.c.obj /out:unarr.dll /implib:unarr.lib /pdb:unarr.pdb /dll /version:1.1 /machine:x64 /nologo /debug /INCREMENTAL D:\installed\x64-windows\debug\lib\7zip.lib D:\installed\x64-windows\debug\lib\bz2d.lib D:\installed\x64-windows\debug\lib\lzma.lib D:\installed\x64-windows\debug\lib\zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\unarr.dir/intermediate.manifest CMakeFiles\unarr.dir/manifest.res" failed (exit code 1120) with the following output:
   Creating library unarr.lib and object unarr.exp
_7z.c.obj : error LNK2019: unresolved external symbol LookToRead2_CreateVTable referenced in function ar_open_7z_archive
_7z.c.obj : error LNK2019: unresolved external symbol SzArEx_Init referenced in function ar_open_7z_archive
_7z.c.obj : error LNK2019: unresolved external symbol SzArEx_Free referenced in function _7z_close
_7z.c.obj : error LNK2019: unresolved external symbol SzArEx_Extract referenced in function _7z_uncompress
_7z.c.obj : error LNK2019: unresolved external symbol SzArEx_Open referenced in function ar_open_7z_archive
uncompress-rar.c.obj : error LNK2019: unresolved external symbol Ppmd7_Construct referenced in function rar_parse_codes
uncompress-rar.c.obj : error LNK2019: unresolved external symbol Ppmd7_Alloc referenced in function rar_parse_codes
uncompress-rar.c.obj : error LNK2019: unresolved external symbol Ppmd7_Free referenced in function rar_clear_uncompress
uncompress-rar.c.obj : error LNK2019: unresolved external symbol Ppmd7_Init referenced in function rar_parse_codes
uncompress-rar.c.obj : error LNK2019: unresolved external symbol Ppmd7a_RangeDec_Init referenced in function rar_parse_codes
uncompress-rar.c.obj : error LNK2019: unresolved external symbol Ppmd7a_DecodeSymbol referenced in function rar_decode_ppmd7_symbol
uncompress-zip.c.obj : error LNK2019: unresolved external symbol Ppmd8_Construct referenced in function zip_init_uncompress_ppmd
uncompress-zip.c.obj : error LNK2019: unresolved external symbol Ppmd8_Alloc referenced in function zip_uncompress_data_ppmd
uncompress-zip.c.obj : error LNK2019: unresolved external symbol Ppmd8_Free referenced in function zip_clear_uncompress_ppmd
uncompress-zip.c.obj : error LNK2019: unresolved external symbol Ppmd8_Init referenced in function zip_uncompress_data_ppmd
uncompress-zip.c.obj : error LNK2019: unresolved external symbol Ppmd8_Init_RangeDec referenced in function zip_uncompress_data_ppmd
uncompress-zip.c.obj : error LNK2019: unresolved external symbol Ppmd8_DecodeSymbol referenced in function zip_uncompress_data_ppmd
unarr.dll : fatal error LNK1120: 17 unresolved externals
ninja: build stopped: subcommand failed.

I think nor unarr nor 7zip intend to support Windows OS shared library build.

@luadebug luadebug marked this pull request as ready for review October 18, 2025 14:30
@dg0yt
Copy link
Contributor

dg0yt commented Oct 19, 2025

I think nor unarr nor 7zip intend to support Windows OS shared library build.

7zip is fine. The 7zip build in vcpkg uses CMake, but with pristine .def files for DLL exports.
unarr might be using functions which were never exposed in the DLL interface.

@luadebug
Copy link
Contributor Author

Change Dir: 'D:/b/vcpkg-ci-unarr/x86-windows-dbg'

Run Build Command(s): D:/downloads/tools/ninja/1.13.1-windows/ninja.exe -v -v -j33
[1/4] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x86\cl.exe    -external:ID:\installed\x86-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  -MDd /showIncludes /FoCMakeFiles\main.dir\main.c.obj /FdCMakeFiles\main.dir\ /FS -c D:\a\_work\1\s\scripts\test_ports\vcpkg-ci-unarr\project\main.c
D:\a\_work\1\s\scripts\test_ports\vcpkg-ci-unarr\project\main.c(5) : warning C4700: uninitialized local variable 'stream' used
[2/4] C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x86\cl.exe    -external:ID:\installed\x86-windows\debug\..\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /MP  /MDd /Z7 /Ob0 /Od /RTC1  -MDd /showIncludes /FoCMakeFiles\main2.dir\main.c.obj /FdCMakeFiles\main2.dir\ /FS -c D:\a\_work\1\s\scripts\test_ports\vcpkg-ci-unarr\project\main.c
D:\a\_work\1\s\scripts\test_ports\vcpkg-ci-unarr\project\main.c(5) : warning C4700: uninitialized local variable 'stream' used
[3/4] C:\Windows\system32\cmd.exe /C "cd . && D:\downloads\tools\cmake-3.30.1-windows\cmake-3.30.1-windows-i386\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\main.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x86\link.exe  CMakeFiles\main.dir\main.c.obj  /out:main.exe /implib:main.lib /pdb:main.pdb /version:0.0 /machine:X86 /nologo    /debug /INCREMENTAL /subsystem:console  D:\installed\x86-windows\debug\lib\unarr.lib  D:\installed\x86-windows\debug\lib\7zip.lib  D:\installed\x86-windows\debug\lib\bz2d.lib  D:\installed\x86-windows\debug\lib\lzma.lib  D:\installed\x86-windows\debug\lib\zlibd.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FAILED: [code=4294967295] main.exe 
C:\Windows\system32\cmd.exe /C "cd . && D:\downloads\tools\cmake-3.30.1-windows\cmake-3.30.1-windows-i386\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\main.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x86\link.exe  CMakeFiles\main.dir\main.c.obj  /out:main.exe /implib:main.lib /pdb:main.pdb /version:0.0 /machine:X86 /nologo    /debug /INCREMENTAL /subsystem:console  D:\installed\x86-windows\debug\lib\unarr.lib  D:\installed\x86-windows\debug\lib\7zip.lib  D:\installed\x86-windows\debug\lib\bz2d.lib  D:\installed\x86-windows\debug\lib\lzma.lib  D:\installed\x86-windows\debug\lib\zlibd.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x86\link.exe CMakeFiles\main.dir\main.c.obj /out:main.exe /implib:main.lib /pdb:main.pdb /version:0.0 /machine:X86 /nologo /debug /INCREMENTAL /subsystem:console D:\installed\x86-windows\debug\lib\unarr.lib D:\installed\x86-windows\debug\lib\7zip.lib D:\installed\x86-windows\debug\lib\bz2d.lib D:\installed\x86-windows\debug\lib\lzma.lib D:\installed\x86-windows\debug\lib\zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\main.dir/intermediate.manifest CMakeFiles\main.dir/manifest.res" failed (exit code 1120) with the following output:
unarr.lib(uncompress-rar.c.obj) : error LNK2019: unresolved external symbol _Ppmd7_Construct referenced in function _rar_parse_codes
unarr.lib(uncompress-rar.c.obj) : error LNK2019: unresolved external symbol _Ppmd7_Alloc referenced in function _rar_parse_codes
unarr.lib(uncompress-rar.c.obj) : error LNK2019: unresolved external symbol _Ppmd7_Free referenced in function _rar_clear_uncompress
unarr.lib(uncompress-rar.c.obj) : error LNK2019: unresolved external symbol _Ppmd7_Init referenced in function _rar_parse_codes
unarr.lib(uncompress-rar.c.obj) : error LNK2019: unresolved external symbol _Ppmd7a_RangeDec_Init referenced in function _rar_parse_codes
unarr.lib(uncompress-rar.c.obj) : error LNK2019: unresolved external symbol _Ppmd7a_DecodeSymbol referenced in function _rar_decode_ppmd7_symbol
main.exe : fatal error LNK1120: 6 unresolved externals
[4/4] C:\Windows\system32\cmd.exe /C "cd . && D:\downloads\tools\cmake-3.30.1-windows\cmake-3.30.1-windows-i386\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\main2.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x86\link.exe  CMakeFiles\main2.dir\main.c.obj  /out:main2.exe /implib:main2.lib /pdb:main2.pdb /version:0.0 /machine:X86 /nologo    /debug /INCREMENTAL /subsystem:console   D:/installed/x86-windows/debug/lib/bz2d.lib  D:\installed\x86-windows\debug\lib\unarr.lib  D:\installed\x86-windows\debug\lib\7zip.lib  D:\installed\x86-windows\debug\lib\lzma.lib  D:\installed\x86-windows\debug\lib\zlibd.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FAILED: [code=4294967295] main2.exe 
C:\Windows\system32\cmd.exe /C "cd . && D:\downloads\tools\cmake-3.30.1-windows\cmake-3.30.1-windows-i386\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\main2.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x86\link.exe  CMakeFiles\main2.dir\main.c.obj  /out:main2.exe /implib:main2.lib /pdb:main2.pdb /version:0.0 /machine:X86 /nologo    /debug /INCREMENTAL /subsystem:console   D:/installed/x86-windows/debug/lib/bz2d.lib  D:\installed\x86-windows\debug\lib\unarr.lib  D:\installed\x86-windows\debug\lib\7zip.lib  D:\installed\x86-windows\debug\lib\lzma.lib  D:\installed\x86-windows\debug\lib\zlibd.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x86\link.exe CMakeFiles\main2.dir\main.c.obj /out:main2.exe /implib:main2.lib /pdb:main2.pdb /version:0.0 /machine:X86 /nologo /debug /INCREMENTAL /subsystem:console D:/installed/x86-windows/debug/lib/bz2d.lib D:\installed\x86-windows\debug\lib\unarr.lib D:\installed\x86-windows\debug\lib\7zip.lib D:\installed\x86-windows\debug\lib\lzma.lib D:\installed\x86-windows\debug\lib\zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\main2.dir/intermediate.manifest CMakeFiles\main2.dir/manifest.res" failed (exit code 1120) with the following output:
unarr.lib(uncompress-rar.c.obj) : error LNK2019: unresolved external symbol _Ppmd7_Construct referenced in function _rar_parse_codes
unarr.lib(uncompress-rar.c.obj) : error LNK2019: unresolved external symbol _Ppmd7_Alloc referenced in function _rar_parse_codes
unarr.lib(uncompress-rar.c.obj) : error LNK2019: unresolved external symbol _Ppmd7_Free referenced in function _rar_clear_uncompress
unarr.lib(uncompress-rar.c.obj) : error LNK2019: unresolved external symbol _Ppmd7_Init referenced in function _rar_parse_codes
unarr.lib(uncompress-rar.c.obj) : error LNK2019: unresolved external symbol _Ppmd7a_RangeDec_Init referenced in function _rar_parse_codes
unarr.lib(uncompress-rar.c.obj) : error LNK2019: unresolved external symbol _Ppmd7a_DecodeSymbol referenced in function _rar_decode_ppmd7_symbol
main2.exe : fatal error LNK1120: 6 unresolved externals
ninja: build stopped: subcommand failed.

Well I will place supports for !(windows & !static)

@luadebug luadebug requested a review from dg0yt October 19, 2025 07:18
"description": "A decompression library for rar, tar, zip and 7z archives.",
"homepage": "https://github.com/selmf/unarr",
"license": "LGPL-3.0-only",
"supports": "!(windows & !static)",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately:

  • !(windows & !static)
  • !windows | !static (DeMorgan)

excludes every triplet we have so this doesn't pass the 'tested on at least one official triplet' requirement we need to put in the curated registry.

Did you intend !(windows & static)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it simply "SUPPORTS: NOT (WINDOWS & DYNAMIC)"?

* `!(windows & !static)`

* `!windows | !static` (DeMorgan)
  • !(windows & !static)
  • !windows | !!static
  • !windows | static

Copy link
Contributor Author

@luadebug luadebug Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intended to skip shared library builds for Windows OS, but keep everything else.

Is it "supports": "!windows | static", by any chance?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it simply "SUPPORTS: NOT (WINDOWS & DYNAMIC)"?

I am an idiot, sorry :(

@luadebug
Copy link
Contributor Author

luadebug commented Oct 21, 2025

Unfortunately there are more bits that seem to have hard coded dependencies on the vendored lzmasdk. Examples:

https://github.com/selmf/unarr/blob/1df8ab3d281409e9fe6bed8bf485976bb47f5bef/CMakeLists.txt#L55-L67

https://github.com/selmf/unarr/blob/1df8ab3d281409e9fe6bed8bf485976bb47f5bef/zip/zip.h#L21

I'm not sure it's going to be easy to devendor this thing :(

Is there difference between:

  1. supports: "static"
  2. vcpkg_check_linkage(ONLY_STATIC_LIBRARY) although that is pretty much like 3 first lines of portfile
if(VCPKG_TARGET_IS_WINDOWS)
    vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()

?

@luadebug luadebug requested a review from BillyONeal October 22, 2025 09:05
@BillyONeal
Copy link
Member

Is there difference between:

  1. supports: "static"
  2. vcpkg_check_linkage(ONLY_STATIC_LIBRARY) although that is pretty much like 3 first lines of portfile

Yes. "supports": "static" says "if the user didn't ask for static, emit a failure message. vcpkg_check_linkage(ONLY_STATIC_LIBRARY) says "if the user didn't ask for static, give them static anyway".

Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the new port, for devendoring stuff, and sorry for the confusion. Thanks also @dg0yt for pointing out where Bill was a dum dum.

@BillyONeal BillyONeal merged commit 58338d5 into microsoft:master Oct 23, 2025
18 checks passed
@dg0yt
Copy link
Contributor

dg0yt commented Oct 23, 2025

Is there difference between:

  1. supports: "static"
  2. vcpkg_check_linkage(ONLY_STATIC_LIBRARY) although that is pretty much like 3 first lines of portfile

Yes. "supports": "static" says "if the user didn't ask for static, emit a failure message. vcpkg_check_linkage(ONLY_STATIC_LIBRARY) says "if the user didn't ask for static, give them static anyway".

The first is checked by vcpkg tool when making an installation plan. Regardless of per-port triplet customization.

The second is checked by CMake when vcpkg gets to actually building the port. Subject to per-port triplet customization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants