[Craft] [Bug 455119] New: building libgit2 from source fails due to not detecting libssl

Michael Drüing bugzilla_noreply at kde.org
Fri Jun 10 12:34:51 BST 2022


https://bugs.kde.org/show_bug.cgi?id=455119

            Bug ID: 455119
           Summary: building libgit2 from source fails due to not
                    detecting libssl
           Product: Craft
           Version: master
          Platform: Microsoft Windows
                OS: Microsoft Windows
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Blueprints
          Assignee: vonreth at kde.org
          Reporter: michael at drueing.de
                CC: kde-windows at kde.org
  Target Milestone: ---

When trying to build libgit2 (required for kate, for example) the build fails.

Environment: Windows 10, Visual Studio 2022


STEPS TO REPRODUCE
1. `craft libgit2`
2. wait

OBSERVED RESULT

PS D:\KDE> craft libgit2
Craft               : D:\KDE
Version             : master
ABI                 : windows-msvc2022_64-cl
Download directory  : D:\KDE\download
========================================================================================================================
*** Handling package: libs/libgit2, action: all ***
*** Action: fetch-binary for libs/libgit2 ***
Could not find libs/libgit2=1.1.0-1 in
https://files.kde.org/craft/master/22.05/windows/msvc2022_64/cl/RelWithDebInfo
Could not find libs/libgit2=1.1.0-1 in
https://files.kde.org/craft/master/22.05/windows/msvc2022_64/cl/Release
*** libs/libgit2 not found in cache ***
*** Action: fetch for libs/libgit2 ***
*** Action: unpack for libs/libgit2 ***
--- Logging error ---
Traceback (most recent call last):
  File
"C:\Users\User\AppData\Local\Programs\Python\Python38\lib\logging\__init__.py",
line 1084, in emit
    stream.write(msg + self.terminator)
  File
"C:\Users\User\AppData\Local\Programs\Python\Python38\lib\encodings\cp1252.py",
line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u8fd9' in position
105: character maps to <undefined>
Call stack:
  File "D:\KDE\craft\bin\craft.py", line 274, in <module>
    success = main(timer)
  File "D:\KDE\craft\bin\craft.py", line 264, in main
    if not CraftCommands.run(package, action, tempArgs):
  File "D:\KDE\craft\bin\CraftCommands.py", line 425, in run
    if not handlePackage(info, action, directTargets=directTargets):
  File "D:\KDE\craft\bin\CraftCommands.py", line 94, in handlePackage
    success = doExec(package, action)
  File "D:\KDE\craft\bin\CraftCommands.py", line 58, in doExec
    ret = package.instance.runAction(action)
  File "D:\KDE\craft\bin\Package\PackageBase.py", line 247, in runAction
    if not getattr(self, step)():
  File "D:\KDE\craft\bin\Source\MultiSource.py", line 50, in unpack
    return self._sourceClass.unpack(self)
  File "D:\KDE\craft\bin\Source\ArchiveSource.py", line 220, in unpack
    utils.cleanDirectory(self.workDir())
  File "D:\KDE\craft\bin\utils.py", line 348, in cleanDirectory
    if not OsUtils.rmDir(f.path, force=True):
  File "D:\KDE\craft\bin\CraftOS\win\osutils.py", line 58, in rmDir
    if not OsUtils.rmDir(f.path, force):
  File "D:\KDE\craft\bin\CraftOS\win\osutils.py", line 58, in rmDir
    if not OsUtils.rmDir(f.path, force):
  File "D:\KDE\craft\bin\CraftOS\win\osutils.py", line 58, in rmDir
    if not OsUtils.rmDir(f.path, force):
  File "D:\KDE\craft\bin\CraftOS\win\osutils.py", line 61, in rmDir
    if not OsUtils.rm(f.path, force):
  File "D:\KDE\craft\bin\CraftOS\win\osutils.py", line 23, in rm
    CraftCore.log.debug("deleting file %s" % path)
Message: 'deleting file
D:\\KDE\\build\\_\\e4e755c3\\libgit2-1.1.0\\tests\\resources\\status\\这'
Arguments: ()
executing command: D:\KDE\dev-utils\bin\7za.exe x
D:\KDE\download\archives\libs\libgit2\libgit2-1.1.0.tar.gz -so -bsp2 |
C:\Users\User\AppData\Local\Programs\Python\Python38\python.exe -u
D:\KDE\craft\bin\untar.py D:\KDE\build\_\e4e755c3
executing command: D:\KDE\bin\patch.exe --ignore-whitespace -d
D:\KDE\build\_\e4e755c3\libgit2-1.1.0 -p 1 -i
D:\kde\etc\blueprints\locations\craft-blueprints-kde\libs\libgit2\libgit2-pcre2-debugsuffix.diff
patching file cmake/FindPCRE2.cmake
*** Action: compile for libs/libgit2 ***
executing command: "D:\KDE\dev-utils\bin\cmake.exe" -G Ninja 
-DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON   -DBUILD_CLAR=OFF
-DREGEX_BACKEND=pcre2 -DCMAKE_INSTALL_PREFIX=D:/KDE -DCMAKE_PREFIX_PATH=D:/KDE
-DCMAKE_REQUIRED_INCLUDES=D:/KDE/include
-DCMAKE_C_STANDARD_INCLUDE_DIRECTORIES=D:/KDE/include
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON -S D:\KDE\build\_\e4e755c3\libgit2-1.1.0
-- The C compiler identification is MSVC 19.32.31329.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual
Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe -
skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: D:/Bin/Perl/perl/bin/pkg-config.bat (found version "0.26")
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM - Failed
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC - Failed
-- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC
-- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC - Failed
-- Performing Test IS_WMISSING_DECLARATIONS_SUPPORTED
-- Performing Test IS_WMISSING_DECLARATIONS_SUPPORTED - Failed
-- Looking for futimens
-- Looking for futimens - not found
-- Checking prototype qsort_r for HAVE_QSORT_R_BSD
-- Checking prototype qsort_r for HAVE_QSORT_R_BSD - False
-- Checking prototype qsort_r for HAVE_QSORT_R_GNU
-- Checking prototype qsort_r for HAVE_QSORT_R_GNU - False
-- Looking for qsort_s
-- Looking for qsort_s - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - not found
-- Found OpenSSL: D:/kde/lib/libcrypto.lib (found version "1.1.1n")
-- Found PCRE: D:/kde/lib/pcre.lib
-- Found PCRE2: D:/kde/lib/pcre2-8.lib
-- http-parser version 2 was not found or disabled; using bundled 3rd-party
sources.
-- Performing Test IS_WIMPLICIT_FALLTHROUGH_1_SUPPORTED
-- Performing Test IS_WIMPLICIT_FALLTHROUGH_1_SUPPORTED - Failed
-- Found ZLIB: D:/kde/lib/zlib.lib (found version "1.2.12")
-- Checking for module 'libssh2'
--   Found libssh2, version 1.9.0
Can't find libssl.pc in any of D:/KDE/lib/pkgconfig /usr/local/lib/pkgconfig
/usr/local/share/pkgconfig /usr/lib/pkgconfig /usr/share/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
Can't find libssl.pc in any of D:/KDE/lib/pkgconfig /usr/local/lib/pkgconfig
/usr/local/share/pkgconfig /usr/lib/pkgconfig /usr/share/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
Can't find libssl.pc in any of D:/KDE/lib/pkgconfig /usr/local/lib/pkgconfig
/usr/local/share/pkgconfig /usr/lib/pkgconfig /usr/share/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
Can't find libssl.pc in any of D:/KDE/lib/pkgconfig /usr/local/lib/pkgconfig
/usr/local/share/pkgconfig /usr/lib/pkgconfig /usr/share/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
Can't find libssl.pc in any of D:/KDE/lib/pkgconfig /usr/local/lib/pkgconfig
/usr/local/share/pkgconfig /usr/lib/pkgconfig /usr/share/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
Can't find libssl.pc in any of D:/KDE/lib/pkgconfig /usr/local/lib/pkgconfig
/usr/local/share/pkgconfig /usr/lib/pkgconfig /usr/share/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
Can't find libssl.pc in any of D:/KDE/lib/pkgconfig /usr/local/lib/pkgconfig
/usr/local/share/pkgconfig /usr/lib/pkgconfig /usr/share/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
CMake Error at cmake/FindPkgLibraries.cmake:17 (MESSAGE):
  could not resolve ssh2
Call Stack (most recent call first):
  src/CMakeLists.txt:213 (FIND_PKGLIBRARIES)


-- Configuring incomplete, errors occurred!
See also "D:/kde/build/_/e4e755c3/build/CMakeFiles/CMakeOutput.log".
See also "D:/kde/build/_/e4e755c3/build/CMakeFiles/CMakeError.log".
Action: compile for libs/libgit2:1.1.0-1 FAILED
*** Craft all failed: libs/libgit2 after 18 seconds ***
fatal error: package libs/libgit2 all failed
Craft stopped with out completing ['libs/libgit2']
PS D:\KDE>
````

EXPECTED RESULT
the build succeeds

SOFTWARE/OS VERSIONS
Windows: Windows 10 21H2 19044.1706

ADDITIONAL INFORMATION
pkg-config, libssh2 and openssl are all installed as part of the prerequisites
for libgit2:

PS D:\KDE> craft -p openssl
Craft               : D:\KDE
Version             : master
ABI                 : windows-msvc2022_64-cl
Download directory  : D:\KDE\download
*** libs/openssl is up to date, nothing to do ***



PS D:\KDE> craft -p libssh2
Craft               : D:\KDE
Version             : master
ABI                 : windows-msvc2022_64-cl
Download directory  : D:\KDE\download
*** libs/libssh2 is up to date, nothing to do ***



PS D:\KDE> craft -p pkg-config
Craft               : D:\KDE
Version             : master
ABI                 : windows-msvc2022_64-cl
Download directory  : D:\KDE\download
*** dev-utils/pkg-config is up to date, nothing to do ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Kde-windows mailing list