The Swift Package Index logo.Swift Package Index

Build Information

Failed to build PerfectCURL with Swift 5.9 for Linux.

Build Command

docker run --rm -v "checkouts-4609320-1":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.19.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/perfectlysoft/perfect-curl.git
Reference: master
Cloned https://github.com/perfectlysoft/perfect-curl.git into spi-builder-workspace
SUCCESS checkout https://github.com/perfectlysoft/perfect-curl.git at master
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.9
Building package at path:  spi-builder-workspace
Running build ...
docker run --rm -v "checkouts-4609320-1":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1
Fetching https://github.com/PerfectlySoft/Perfect-Thread.git
Fetching https://github.com/PerfectlySoft/PerfectLib.git
Fetching https://github.com/PerfectlySoft/Perfect-libcurl.git
[1/379] Fetching perfect-thread
[380/11119] Fetching perfect-thread, perfectlib
Fetched https://github.com/PerfectlySoft/Perfect-libcurl.git (0.23s)
Fetched https://github.com/PerfectlySoft/Perfect-Thread.git (0.24s)
[1397/10740] Fetching perfectlib
warning: 'perfectlib': skipping cache due to an error: Failed to clone repository https://github.com/PerfectlySoft/PerfectLib.git:
    Cloning into bare repository '/root/.cache/org.swift.swiftpm/repositories/PerfectLib-7b80d868'...
    remote: Enumerating objects: 10740, done.        
    remote: Counting objects:   0% (1/1013)        
remote: Counting objects:   1% (11/1013)        
remote: Counting objects:   2% (21/1013)        
remote: Counting objects:   3% (31/1013)        
remote: Counting objects:   4% (41/1013)        
remote: Counting objects:   5% (51/1013)        
remote: Counting objects:   6% (61/1013)        
remote: Counting objects:   7% (71/1013)        
remote: Counting objects:   8% (82/1013)        
remote: Counting objects:   9% (92/1013)        
remote: Counting objects:  10% (102/1013)        
remote: Counting objects:  11% (112/1013)        
remote: Counting objects:  12% (122/1013)        
remote: Counting objects:  13% (132/1013)        
remote: Counting objects:  14% (142/1013)        
remote: Counting objects:  15% (152/1013)        
remote: Counting objects:  16% (163/1013)        
remote: Counting objects:  17% (173/1013)        
remote: Counting objects:  18% (183/1013)        
remote: Counting objects:  19% (193/1013)        
remote: Counting objects:  20% (203/1013)        
remote: Counting objects:  21% (213/1013)        
remote: Counting objects:  22% (223/1013)        
remote: Counting objects:  23% (233/1013)        
remote: Counting objects:  24% (244/1013)        
remote: Counting objects:  25% (254/1013)        
remote: Counting objects:  26% (264/1013)        
remote: Counting objects:  27% (274/1013)        
remote: Counting objects:  28% (284/1013)        
remote: Counting objects:  29% (294/1013)        
remote: Counting objects:  30% (304/1013)        
remote: Counting objects:  31% (315/1013)        
remote: Counting objects:  32% (325/1013)        
remote: Counting objects:  33% (335/1013)        
remote: Counting objects:  34% (345/1013)        
remote: Counting objects:  35% (355/1013)        
remote: Counting objects:  36% (365/1013)        
remote: Counting objects:  37% (375/1013)        
remote: Counting objects:  38% (385/1013)        
remote: Counting objects:  39% (396/1013)        
remote: Counting objects:  40% (406/1013)        
remote: Counting objects:  41% (416/1013)        
remote: Counting objects:  42% (426/1013)        
remote: Counting objects:  43% (436/1013)        
remote: Counting objects:  44% (446/1013)        
remote: Counting objects:  45% (456/1013)        
remote: Counting objects:  46% (466/1013)        
remote: Counting objects:  47% (477/1013)        
remote: Counting objects:  48% (487/1013)        
remote: Counting objects:  49% (497/1013)        
remote: Counting objects:  50% (507/1013)        
remote: Counting objects:  51% (517/1013)        
remote: Counting objects:  52% (527/1013)        
remote: Counting objects:  53% (537/1013)        
remote: Counting objects:  54% (548/1013)        
remote: Counting objects:  55% (558/1013)        
remote: Counting objects:  56% (568/1013)        
remote: Counting objects:  57% (578/1013)        
remote: Counting objects:  58% (588/1013)        
remote: Counting objects:  59% (598/1013)        
remote: Counting objects:  60% (608/1013)        
remote: Counting objects:  61% (618/1013)        
remote: Counting objects:  62% (629/1013)        
remote: Counting objects:  63% (639/1013)        
remote: Counting objects:  64% (649/1013)        
remote: Counting objects:  65% (659/1013)        
remote: Counting objects:  66% (669/1013)        
remote: Counting objects:  67% (679/1013)        
remote: Counting objects:  68% (689/1013)        
remote: Counting objects:  69% (699/1013)        
remote: Counting objects:  70% (710/1013)        
remote: Counting objects:  71% (720/1013)        
remote: Counting objects:  72% (730/1013)        
remote: Counting objects:  73% (740/1013)        
remote: Counting objects:  74% (750/1013)        
remote: Counting objects:  75% (760/1013)        
remote: Counting objects:  76% (770/1013)        
remote: Counting objects:  77% (781/1013)        
remote: Counting objects:  78% (791/1013)        
remote: Counting objects:  79% (801/1013)        
remote: Counting objects:  80% (811/1013)        
remote: Counting objects:  81% (821/1013)        
remote: Counting objects:  82% (831/1013)        
remote: Counting objects:  83% (841/1013)        
remote: Counting objects:  84% (851/1013)        
remote: Counting objects:  85% (862/1013)        
remote: Counting objects:  86% (872/1013)        
remote: Counting objects:  87% (882/1013)        
remote: Counting objects:  88% (892/1013)        
remote: Counting objects:  89% (902/1013)        
remote: Counting objects:  90% (912/1013)        
remote: Counting objects:  91% (922/1013)        
remote: Counting objects:  92% (932/1013)        
remote: Counting objects:  93% (943/1013)        
remote: Counting objects:  94% (953/1013)        
remote: Counting objects:  95% (963/1013)        
remote: Counting objects:  96% (973/1013)        
remote: Counting objects:  97% (983/1013)        
remote: Counting objects:  98% (993/1013)        
remote: Counting objects:  99% (1003/1013)        
remote: Counting objects: 100% (1013/1013)        
remote: Counting objects: 100% (1013/1013), done.        
    remote: Compressing objects:   0% (1/562)        
remote: Compressing objects:   1% (6/562)        
remote: Compressing objects:   2% (12/562)        
remote: Compressing objects:   3% (17/562)        
remote: Compressing objects:   4% (23/562)        
remote: Compressing objects:   5% (29/562)        
remote: Compressing objects:   6% (34/562)        
remote: Compressing objects:   7% (40/562)        
remote: Compressing objects:   8% (45/562)        
remote: Compressing objects:   9% (51/562)        
remote: Compressing objects:  10% (57/562)        
remote: Compressing objects:  11% (62/562)        
remote: Compressing objects:  12% (68/562)        
remote: Compressing objects:  13% (74/562)        
remote: Compressing objects:  14% (79/562)        
remote: Compressing objects:  15% (85/562)        
remote: Compressing objects:  16% (90/562)        
remote: Compressing objects:  17% (96/562)        
remote: Compressing objects:  18% (102/562)        
remote: Compressing objects:  19% (107/562)        
remote: Compressing objects:  20% (113/562)        
remote: Compressing objects:  21% (119/562)        
remote: Compressing objects:  22% (124/562)        
remote: Compressing objects:  23% (130/562)        
remote: Compressing objects:  24% (135/562)        
remote: Compressing objects:  25% (141/562)        
remote: Compressing objects:  26% (147/562)        
remote: Compressing objects:  27% (152/562)        
remote: Compressing objects:  28% (158/562)        
remote: Compressing objects:  29% (163/562)        
remote: Compressing objects:  30% (169/562)        
remote: Compressing objects:  31% (175/562)        
remote: Compressing objects:  32% (180/562)        
remote: Compressing objects:  33% (186/562)        
remote: Compressing objects:  34% (192/562)        
remote: Compressing objects:  35% (197/562)        
remote: Compressing objects:  36% (203/562)        
remote: Compressing objects:  37% (208/562)        
remote: Compressing objects:  38% (214/562)        
remote: Compressing objects:  39% (220/562)        
remote: Compressing objects:  40% (225/562)        
remote: Compressing objects:  41% (231/562)        
remote: Compressing objects:  42% (237/562)        
remote: Compressing objects:  43% (242/562)        
remote: Compressing objects:  44% (248/562)        
remote: Compressing objects:  45% (253/562)        
remote: Compressing objects:  46% (259/562)        
remote: Compressing objects:  47% (265/562)        
remote: Compressing objects:  48% (270/562)        
remote: Compressing objects:  49% (276/562)        
remote: Compressing objects:  50% (281/562)        
remote: Compressing objects:  51% (287/562)        
remote: Compressing objects:  52% (293/562)        
remote: Compressing objects:  53% (298/562)        
remote: Compressing objects:  54% (304/562)        
remote: Compressing objects:  55% (310/562)        
remote: Compressing objects:  56% (315/562)        
remote: Compressing objects:  57% (321/562)        
remote: Compressing objects:  58% (326/562)        
remote: Compressing objects:  59% (332/562)        
remote: Compressing objects:  60% (338/562)        
remote: Compressing objects:  61% (343/562)        
remote: Compressing objects:  62% (349/562)        
remote: Compressing objects:  63% (355/562)        
remote: Compressing objects:  64% (360/562)        
remote: Compressing objects:  65% (366/562)        
remote: Compressing objects:  66% (371/562)        
remote: Compressing objects:  67% (377/562)        
remote: Compressing objects:  68% (383/562)        
remote: Compressing objects:  69% (388/562)        
remote: Compressing objects:  70% (394/562)        
remote: Compressing objects:  71% (400/562)        
remote: Compressing objects:  72% (405/562)        
remote: Compressing objects:  73% (411/562)        
remote: Compressing objects:  74% (416/562)        
remote: Compressing objects:  75% (422/562)        
remote: Compressing objects:  76% (428/562)        
remote: Compressing objects:  77% (433/562)        
remote: Compressing objects:  78% (439/562)        
remote: Compressing objects:  79% (444/562)        
remote: Compressing objects:  80% (450/562)        
remote: Compressing objects:  81% (456/562)        
remote: Compressing objects:  82% (461/562)        
remote: Compressing objects:  83% (467/562)        
remote: Compressing objects:  84% (473/562)        
remote: Compressing objects:  85% (478/562)        
remote: Compressing objects:  86% (484/562)        
remote: Compressing objects:  87% (489/562)        
remote: Compressing objects:  88% (495/562)        
remote: Compressing objects:  89% (501/562)        
remote: Compressing objects:  90% (506/562)        
remote: Compressing objects:  91% (512/562)        
remote: Compressing objects:  92% (518/562)        
remote: Compressing objects:  93% (523/562)        
remote: Compressing objects:  94% (529/562)        
remote: Compressing objects:  95% (534/562)        
remote: Compressing objects:  96% (540/562)        
remote: Compressing objects:  97% (546/562)        
remote: Compressing objects:  98% (551/562)        
remote: Compressing objects:  99% (557/562)        
remote: Compressing objects: 100% (562/562)        
remote: Compressing objects: 100% (562/562), done.        
    Receiving objects:   0% (1/10740)
Receiving objects:   1% (108/10740)
Receiving objects:   2% (215/10740)
Receiving objects:   3% (323/10740)
Receiving objects:   4% (430/10740)
Receiving objects:   5% (537/10740)
Receiving objects:   6% (645/10740)
Receiving objects:   7% (752/10740)
Receiving objects:   8% (860/10740)
Receiving objects:   9% (967/10740)
Receiving objects:  10% (1074/10740)
Receiving objects:  11% (1182/10740)
Receiving objects:  12% (1289/10740)
Receiving objects:  13% (1397/10740)
Receiving objects:  14% (1504/10740)
Receiving objects:  15% (1611/10740)
Receiving objects:  16% (1719/10740)
Receiving objects:  17% (1826/10740)
Receiving objects:  18% (1934/10740)
Receiving objects:  19% (2041/10740)
Receiving objects:  20% (2148/10740)
Receiving objects:  21% (2256/10740)
Receiving objects:  22% (2363/10740)
Receiving objects:  23% (2471/10740)
Receiving objects:  24% (2578/10740)
Receiving objects:  25% (2685/10740)
Receiving objects:  26% (2793/10740)
Receiving objects:  27% (2900/10740)
Receiving objects:  28% (3008/10740)
Receiving objects:  29% (3115/10740)
Receiving objects:  30% (3222/10740)
Receiving objects:  31% (3330/10740)
Receiving objects:  32% (3437/10740)
Receiving objects:  33% (3545/10740)
Receiving objects:  34% (3652/10740)
Receiving objects:  35% (3759/10740)
Receiving objects:  36% (3867/10740)
Receiving objects:  37% (3974/10740)
Receiving objects:  38% (4082/10740)
Receiving objects:  39% (4189/10740)
Receiving objects:  40% (4296/10740)
Receiving objects:  41% (4404/10740)
Receiving objects:  42% (4511/10740)
Receiving objects:  43% (4619/10740)
Receiving objects:  44% (4726/10740)
Receiving objects:  45% (4833/10740)
Receiving objects:  46% (4941/10740)
Receiving objects:  47% (5048/10740)
Receiving objects:  48% (5156/10740)
Receiving objects:  49% (5263/10740)
Receiving objects:  50% (5370/10740)
Receiving objects:  51% (5478/10740)
Receiving objects:  52% (5585/10740)
Receiving objects:  53% (5693/10740)
Receiving objects:  54% (5800/10740)
Receiving objects:  55% (5907/10740)
Receiving objects:  56% (6015/10740)
Receiving objects:  57% (6122/10740)
Receiving objects:  58% (6230/10740)
Receiving objects:  59% (6337/10740)
Receiving objects:  60% (6444/10740)
Receiving objects:  61% (6552/10740)
Receiving objects:  62% (6659/10740)
Receiving objects:  63% (6767/10740)
Receiving objects:  64% (6874/10740)
Receiving objects:  65% (6981/10740)
Receiving objects:  66% (7089/10740)
Receiving objects:  67% (7196/10740)
Receiving objects:  68% (7304/10740)
Receiving objects:  69% (7411/10740)
Receiving objects:  70% (7518/10740)
Receiving objects:  71% (7626/10740)
Receiving objects:  72% (7733/10740)
Receiving objects:  73% (7841/10740)
Receiving objects:  74% (7948/10740)
Receiving objects:  75% (8055/10740)
Receiving objects:  76% (8163/10740)
Receiving objects:  77% (8270/10740), 12.84 MiB | 25.67 MiB/s
Receiving objects:  77% (8285/10740), 27.51 MiB | 27.51 MiB/s
Receiving objects:  78% (8378/10740), 27.51 MiB | 27.51 MiB/s
Receiving objects:  79% (8485/10740), 27.51 MiB | 27.51 MiB/s
Receiving objects:  80% (8592/10740), 27.51 MiB | 27.51 MiB/s
Receiving objects:  81% (8700/10740), 27.51 MiB | 27.51 MiB/s
Receiving objects:  82% (8807/10740), 27.51 MiB | 27.51 MiB/s
Receiving objects:  83% (8915/10740), 27.51 MiB | 27.51 MiB/s
Receiving objects:  84% (9022/10740), 27.51 MiB | 27.51 MiB/s
Receiving objects:  85% (9129/10740), 27.51 MiB | 27.51 MiB/s
Receiving objects:  86% (9237/10740), 27.51 MiB | 27.51 MiB/s
Receiving objects:  87% (9344/10740), 27.51 MiB | 27.51 MiB/s
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
    fatal: the remote end hung up unexpectedly
    fatal: early EOF
    fatal: index-pack failed
Fetched https://github.com/PerfectlySoft/PerfectLib.git (4.74s)
Computing version for https://github.com/PerfectlySoft/PerfectLib.git
Computed https://github.com/PerfectlySoft/PerfectLib.git at 4.0.1 (0.30s)
Fetching https://github.com/PerfectlySoft/Perfect-LinuxBridge.git
Fetched https://github.com/PerfectlySoft/Perfect-LinuxBridge.git (0.19s)
Computing version for https://github.com/PerfectlySoft/Perfect-LinuxBridge.git
Computed https://github.com/PerfectlySoft/Perfect-LinuxBridge.git at 3.1.0 (1.18s)
Computing version for https://github.com/PerfectlySoft/Perfect-Thread.git
Computed https://github.com/PerfectlySoft/Perfect-Thread.git at 3.0.7 (0.31s)
Computing version for https://github.com/PerfectlySoft/Perfect-libcurl.git
Computed https://github.com/PerfectlySoft/Perfect-libcurl.git at 2.1.0 (0.48s)
Creating working copy for https://github.com/PerfectlySoft/Perfect-LinuxBridge.git
Working copy of https://github.com/PerfectlySoft/Perfect-LinuxBridge.git resolved at 3.1.0
Creating working copy for https://github.com/PerfectlySoft/Perfect-Thread.git
Working copy of https://github.com/PerfectlySoft/Perfect-Thread.git resolved at 3.0.7
Creating working copy for https://github.com/PerfectlySoft/Perfect-libcurl.git
Working copy of https://github.com/PerfectlySoft/Perfect-libcurl.git resolved at 2.1.0
Creating working copy for https://github.com/PerfectlySoft/PerfectLib.git
Working copy of https://github.com/PerfectlySoft/PerfectLib.git resolved at 4.0.1
warning: 'perfect-libcurl': ignoring declared target(s) 'cURL' in the system package
warning: 'spi-builder-workspace': dependency 'perfect-libcurl' is not used by any target
Building for debugging...
[0/1] Compiling LinuxBridge LinuxBridge.c
[2/14] Compiling PerfectLib PerfectServer.swift
[3/14] Compiling PerfectThread Threading.swift
[4/15] Compiling PerfectLib Log.swift
[5/15] Compiling PerfectLib PerfectError.swift
[6/15] Compiling PerfectLib SysProcess.swift
[7/15] Compiling PerfectThread Promise.swift
[8/15] Emitting module PerfectThread
[9/15] Compiling PerfectThread ThreadQueue.swift
[10/15] Compiling PerfectLib JSONConvertible.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[13/17] Emitting module PerfectLib
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:130:54: error: cannot find type 'dirent' in scope
    func readDir(_ d: OpaquePointer, _ dirEnt: inout dirent, _ endPtr: UnsafeMutablePointer<UnsafeMutablePointer<dirent>?>!) -> Int32 {
                                                     ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:130:114: error: cannot find type 'dirent' in scope
    func readDir(_ d: OpaquePointer, _ dirEnt: inout dirent, _ endPtr: UnsafeMutablePointer<UnsafeMutablePointer<dirent>?>!) -> Int32 {
                                                                                                                 ^~~~~~
[14/17] Compiling PerfectLib File.swift
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:66:16: error: cannot find 'access' in scope
        return access(internalPath, F_OK) != -1
               ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:88:11: error: cannot find 'readlink' in scope
                        return readlink(internalPath, p, maxPath)
                               ^~~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:119:15: error: cannot find 'wordexp_t' in scope
                        var wexp = wordexp_t()
                                   ^~~~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:120:15: error: cannot find 'wordexp' in scope
                        guard 0 == wordexp(inPath, &wexp, 0),
                                   ^~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:125:5: error: cannot find 'wordfree' in scope
                                wordfree(&wexp)
                                ^~~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:151:8: error: module 'SwiftGlibc' has no member named 'close'
                        _ = SwiftGlibc.close(CInt(fd))
                            ^~~~~~~~~~ ~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:261:28: error: cannot find 'lseek' in scope
                return Int(lseek(Int32(fd), 0, SEEK_CUR))
                           ^~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:267:13: error: cannot find 'lseek' in scope
            lseek(Int32(fd), off_t(newValue), SEEK_SET)
            ^~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:277:9: error: cannot find 'unlink' in scope
        unlink(path)
        ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:410:13: error: cannot find 'symlink' in scope
                let res = symlink(self.path, path)
                          ^~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:445:6: error: cannot find 'read' in scope
                   read(CInt(fd), $0.bindMemory(to: Int8.self).baseAddress, bSize)
                   ^~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:484:4: error: module 'SwiftGlibc' has no member named 'write'
                        SwiftGlibc.write(Int32(fd), $0.bindMemory(to: Int8.self).baseAddress?.advanced(by: dataPosition), len)
                        ^~~~~~~~~~ ~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:580:18: error: cannot find 'mkstemp' in scope
        let fd = mkstemp(name)
                 ^~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:591:45: error: cannot find 'STDIN_FILENO' in scope
    return UnclosableFile("/dev/stdin", fd: STDIN_FILENO)
                                            ^~~~~~~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:596:43: error: cannot find 'STDOUT_FILENO' in scope
        return UnclosableFile("/dev/stdout", fd: STDOUT_FILENO)
                                                 ^~~~~~~~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/File.swift:601:43: error: cannot find 'STDERR_FILENO' in scope
        return UnclosableFile("/dev/stderr", fd: STDERR_FILENO)
                                                 ^~~~~~~~~~~~~
[15/17] Compiling PerfectLib Bytes.swift
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:130:54: error: cannot find type 'dirent' in scope
    func readDir(_ d: OpaquePointer, _ dirEnt: inout dirent, _ endPtr: UnsafeMutablePointer<UnsafeMutablePointer<dirent>?>!) -> Int32 {
                                                     ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:130:114: error: cannot find type 'dirent' in scope
    func readDir(_ d: OpaquePointer, _ dirEnt: inout dirent, _ endPtr: UnsafeMutablePointer<UnsafeMutablePointer<dirent>?>!) -> Int32 {
                                                                                                                 ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:47:13: error: cannot find 'chdir' in scope
                let res = chdir(internalPath)
                          ^~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:57:8: error: cannot find 'getcwd' in scope
                        _ = getcwd($0.bindMemory(to: Int8.self).baseAddress, 2048)
                            ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:64:10: error: cannot find 'access' in scope
                return access(path, F_OK) != -1
                       ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:91:13: error: cannot find 'rmdir' in scope
                let res = rmdir(realPath)
                          ^~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:131:19: error: cannot find 'readdir' in scope
                guard let ent = readdir(d) else {
                                ^~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:147:19: error: cannot find 'opendir' in scope
                guard let dir = opendir(realPath) else {
                                ^~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:151:11: error: cannot find 'closedir' in scope
                defer { closedir(dir) }
                        ^~~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:153:13: error: cannot find 'dirent' in scope
                var ent = dirent()
                          ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:154:58: error: cannot find type 'dirent' in scope
                let entPtr = UnsafeMutablePointer<UnsafeMutablePointer<dirent>?>.allocate(capacity:  1)
                                                                       ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:180:41: error: cannot find 'DT_DIR' in scope
                if Int32(type) == Int32(DT_DIR) {
                                        ^~~~~~
[16/17] Compiling PerfectLib Dir.swift
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:130:54: error: cannot find type 'dirent' in scope
    func readDir(_ d: OpaquePointer, _ dirEnt: inout dirent, _ endPtr: UnsafeMutablePointer<UnsafeMutablePointer<dirent>?>!) -> Int32 {
                                                     ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:130:114: error: cannot find type 'dirent' in scope
    func readDir(_ d: OpaquePointer, _ dirEnt: inout dirent, _ endPtr: UnsafeMutablePointer<UnsafeMutablePointer<dirent>?>!) -> Int32 {
                                                                                                                 ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:47:13: error: cannot find 'chdir' in scope
                let res = chdir(internalPath)
                          ^~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:57:8: error: cannot find 'getcwd' in scope
                        _ = getcwd($0.bindMemory(to: Int8.self).baseAddress, 2048)
                            ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:64:10: error: cannot find 'access' in scope
                return access(path, F_OK) != -1
                       ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:91:13: error: cannot find 'rmdir' in scope
                let res = rmdir(realPath)
                          ^~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:131:19: error: cannot find 'readdir' in scope
                guard let ent = readdir(d) else {
                                ^~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:147:19: error: cannot find 'opendir' in scope
                guard let dir = opendir(realPath) else {
                                ^~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:151:11: error: cannot find 'closedir' in scope
                defer { closedir(dir) }
                        ^~~~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:153:13: error: cannot find 'dirent' in scope
                var ent = dirent()
                          ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:154:58: error: cannot find type 'dirent' in scope
                let entPtr = UnsafeMutablePointer<UnsafeMutablePointer<dirent>?>.allocate(capacity:  1)
                                                                       ^~~~~~
/host/spi-builder-workspace/.build/checkouts/PerfectLib/Sources/PerfectLib/Dir.swift:180:41: error: cannot find 'DT_DIR' in scope
                if Int32(type) == Int32(DT_DIR) {
                                        ^~~~~~
[17/17] Compiling PerfectLib Utilities.swift
error: fatalError
BUILD FAILURE 5.9 linux

Build Machine: Linux 2