The Swift Package Index logo.Swift Package Index

Build Information

Failed to build SwiftPCAP, reference main (7a8e57), with Swift 6.1 for Android on 29 May 2025 01:13:15 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/OperatorFoundation/SwiftPCAP.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/OperatorFoundation/SwiftPCAP
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 7a8e571 Changed module path on macOS to homebrew install location
Cloned https://github.com/OperatorFoundation/SwiftPCAP.git
Revision (git rev-parse @):
7a8e571abc33dbeff42adc30418828e084e919b6
SUCCESS checkout https://github.com/OperatorFoundation/SwiftPCAP.git at main
========================================
Build
========================================
Selected platform:         android
Swift version:             6.1
Building package at path:  $PWD
https://github.com/OperatorFoundation/SwiftPCAP.git
https://github.com/OperatorFoundation/SwiftPCAP.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
    {
      "identity" : "swifthextools",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "1.2.3",
            "upper_bound" : "2.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/OperatorFoundation/SwiftHexTools"
    }
  ],
  "manifest_display_name" : "SwiftPCAP",
  "name" : "SwiftPCAP",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "11.0"
    }
  ],
  "products" : [
    {
      "name" : "SwiftPCAP",
      "targets" : [
        "SwiftPCAP"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SwiftPCAPTests",
      "module_type" : "SwiftTarget",
      "name" : "SwiftPCAPTests",
      "path" : "Tests/SwiftPCAPTests",
      "product_dependencies" : [
        "SwiftHexTools"
      ],
      "sources" : [
        "SwiftPCAPTests.swift"
      ],
      "target_dependencies" : [
        "SwiftPCAP",
        "Clibpcap"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SwiftPCAP",
      "module_type" : "SwiftTarget",
      "name" : "SwiftPCAP",
      "path" : "Sources/SwiftPCAP",
      "product_memberships" : [
        "SwiftPCAP"
      ],
      "sources" : [
        "SwiftPCAP.swift",
        "SwiftPCAPLive.swift",
        "SwiftPCAPOffline.swift"
      ],
      "target_dependencies" : [
        "Clibpcap"
      ],
      "type" : "library"
    },
    {
      "c99name" : "Clibpcap",
      "module_type" : "SystemLibraryTarget",
      "name" : "Clibpcap",
      "path" : "Sources/Clibpcap",
      "product_memberships" : [
        "SwiftPCAP"
      ],
      "sources" : [
      ],
      "type" : "system-target"
    }
  ],
  "tools_version" : "5.3"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
android-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:fe1962677657b2408c217cb5cceb3c09bc1d91486e360cebbc6eee461a5945d8
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.1-latest
Fetching https://github.com/OperatorFoundation/SwiftHexTools
[1/96] Fetching swifthextools
Fetched https://github.com/OperatorFoundation/SwiftHexTools from cache (0.25s)
Computing version for https://github.com/OperatorFoundation/SwiftHexTools
Computed https://github.com/OperatorFoundation/SwiftHexTools at 1.2.6 (0.84s)
Creating working copy for https://github.com/OperatorFoundation/SwiftHexTools
Working copy of https://github.com/OperatorFoundation/SwiftHexTools resolved at 1.2.6
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/6] Emitting module SwiftPCAP
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:34:31: error: cannot find type 'pcap_pkthdr' in scope
 32 |
 33 |     /// packet header
 34 |     public var currentHeader: pcap_pkthdr
    |                               `- error: cannot find type 'pcap_pkthdr' in scope
 35 |
 36 |     /// base class initializer
[4/6] Compiling SwiftPCAP SwiftPCAPOffline.swift
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPOffline.swift:26:70: error: cannot find 'PCAP_ERRBUF_SIZE' in scope
24 |
25 |       // prepare error buffer for libpcap to use
26 |       let errbuf = UnsafeMutablePointer<Int8>.allocate(capacity: Int(PCAP_ERRBUF_SIZE))
   |                                                                      `- error: cannot find 'PCAP_ERRBUF_SIZE' in scope
27 |
28 |       // create the pcap_t handle
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPOffline.swift:29:20: error: cannot find 'pcap_open_offline' in scope
27 |
28 |       // create the pcap_t handle
29 |       pcapDevice = pcap_open_offline(path, errbuf)
   |                    `- error: cannot find 'pcap_open_offline' in scope
30 |
31 |       if (pcapDevice == nil) {
[5/6] Compiling SwiftPCAP SwiftPCAPLive.swift
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:37:72: error: cannot find 'PCAP_ERRBUF_SIZE' in scope
35 |         super.init()
36 |         // prepare error buffer for libpcap to use
37 |         let errbuf = UnsafeMutablePointer<Int8>.allocate(capacity: Int(PCAP_ERRBUF_SIZE))
   |                                                                        `- error: cannot find 'PCAP_ERRBUF_SIZE' in scope
38 |
39 |         // create the pcap_t handle for live capture
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:40:22: error: cannot find 'pcap_create' in scope
38 |
39 |         // create the pcap_t handle for live capture
40 |         pcapDevice = pcap_create(interface, errbuf)
   |                      `- error: cannot find 'pcap_create' in scope
41 |
42 |         if (pcapDevice == nil) {
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:57:34: error: cannot find 'pcap_activate' in scope
55 |         // activate the live capture handle
56 |         do {
57 |             try handleReturnCode(pcap_activate(pcapDevice))
   |                                  `- error: cannot find 'pcap_activate' in scope
58 |         }
59 |         catch{
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:80:28: error: cannot find 'pcap_set_buffer_size' in scope
78 |       // libpcap options
79 |       // currently no error handling, may want to add that
80 |       try handleReturnCode(pcap_set_buffer_size(pcapDevice, bufferSize))
   |                            `- error: cannot find 'pcap_set_buffer_size' in scope
81 |       try handleReturnCode(pcap_set_snaplen(pcapDevice, snaplen))
82 |       try handleReturnCode(pcap_set_promisc(pcapDevice, 1))
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:81:28: error: cannot find 'pcap_set_snaplen' in scope
79 |       // currently no error handling, may want to add that
80 |       try handleReturnCode(pcap_set_buffer_size(pcapDevice, bufferSize))
81 |       try handleReturnCode(pcap_set_snaplen(pcapDevice, snaplen))
   |                            `- error: cannot find 'pcap_set_snaplen' in scope
82 |       try handleReturnCode(pcap_set_promisc(pcapDevice, 1))
83 |       try handleReturnCode(pcap_set_timeout(pcapDevice, 1))
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:82:28: error: cannot find 'pcap_set_promisc' in scope
80 |       try handleReturnCode(pcap_set_buffer_size(pcapDevice, bufferSize))
81 |       try handleReturnCode(pcap_set_snaplen(pcapDevice, snaplen))
82 |       try handleReturnCode(pcap_set_promisc(pcapDevice, 1))
   |                            `- error: cannot find 'pcap_set_promisc' in scope
83 |       try handleReturnCode(pcap_set_timeout(pcapDevice, 1))
84 |     }
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:83:28: error: cannot find 'pcap_set_timeout' in scope
81 |       try handleReturnCode(pcap_set_snaplen(pcapDevice, snaplen))
82 |       try handleReturnCode(pcap_set_promisc(pcapDevice, 1))
83 |       try handleReturnCode(pcap_set_timeout(pcapDevice, 1))
   |                            `- error: cannot find 'pcap_set_timeout' in scope
84 |     }
85 |   }
[6/6] Compiling SwiftPCAP SwiftPCAP.swift
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:34:31: error: cannot find type 'pcap_pkthdr' in scope
 32 |
 33 |     /// packet header
 34 |     public var currentHeader: pcap_pkthdr
    |                               `- error: cannot find type 'pcap_pkthdr' in scope
 35 |
 36 |     /// base class initializer
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:39:38: error: cannot find type 'pcap_pkthdr' in scope
 37 |     init() {
 38 |       // initialize memory for the pcap_pkthdr struct
 39 |       let ptr = UnsafeMutablePointer<pcap_pkthdr>.allocate(capacity: MemoryLayout<pcap_pkthdr>.size)
    |                                      `- error: cannot find type 'pcap_pkthdr' in scope
 40 |       currentHeader = ptr.pointee
 41 |       ptr.deinitialize(count: 1)
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:39:83: error: cannot find type 'pcap_pkthdr' in scope
 37 |     init() {
 38 |       // initialize memory for the pcap_pkthdr struct
 39 |       let ptr = UnsafeMutablePointer<pcap_pkthdr>.allocate(capacity: MemoryLayout<pcap_pkthdr>.size)
    |                                                                                   `- error: cannot find type 'pcap_pkthdr' in scope
 40 |       currentHeader = ptr.pointee
 41 |       ptr.deinitialize(count: 1)
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:51:25: error: cannot find 'pcap_next' in scope
 49 |         // get the next packet, should not block
 50 |
 51 |         guard let pkt = pcap_next(pcapDevice, &currentHeader)
    |                         `- error: cannot find 'pcap_next' in scope
 52 |         else
 53 |         {
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:54:26: error: cannot find 'pcap_geterr' in scope
 52 |         else
 53 |         {
 54 |           if let error = pcap_geterr(pcapDevice)
    |                          `- error: cannot find 'pcap_geterr' in scope
 55 |           {
 56 |               print(error)
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:67:28: error: generic parameter 'Element' could not be inferred
 65 |         }
 66 |
 67 |         let unsafePacket = UnsafeBufferPointer(start: pkt, count: Int(currentHeader.len))
    |                            |- error: generic parameter 'Element' could not be inferred
    |                            `- note: explicitly specify the generic arguments to fix this issue
 68 |         return Data(unsafePacket)
 69 |     }
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:73:7: error: cannot find 'pcap_close' in scope
 71 |     public func close()
 72 |     {
 73 |       pcap_close(pcapDevice)
    |       `- error: cannot find 'pcap_close' in scope
 74 |     }
 75 |
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:84:14: error: cannot find 'PCAP_WARNING' in scope
 82 |       if (rc != 0) {
 83 |         switch rc {
 84 |         case PCAP_WARNING:
    |              `- error: cannot find 'PCAP_WARNING' in scope
 85 |           throw Errors.warningMessage(msg: "generic warning code")
 86 |         case PCAP_WARNING_PROMISC_NOTSUP:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:86:14: error: cannot find 'PCAP_WARNING_PROMISC_NOTSUP' in scope
 84 |         case PCAP_WARNING:
 85 |           throw Errors.warningMessage(msg: "generic warning code")
 86 |         case PCAP_WARNING_PROMISC_NOTSUP:
    |              `- error: cannot find 'PCAP_WARNING_PROMISC_NOTSUP' in scope
 87 |           throw Errors.warningMessage(msg: "this device doesn't support promiscuous mode")
 88 |         case PCAP_WARNING_TSTAMP_TYPE_NOTSUP:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:88:14: error: cannot find 'PCAP_WARNING_TSTAMP_TYPE_NOTSUP' in scope
 86 |         case PCAP_WARNING_PROMISC_NOTSUP:
 87 |           throw Errors.warningMessage(msg: "this device doesn't support promiscuous mode")
 88 |         case PCAP_WARNING_TSTAMP_TYPE_NOTSUP:
    |              `- error: cannot find 'PCAP_WARNING_TSTAMP_TYPE_NOTSUP' in scope
 89 |           throw Errors.warningMessage(msg: "the requested time stamp type is not supported")
 90 |         case PCAP_ERROR:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:90:14: error: cannot find 'PCAP_ERROR' in scope
 88 |         case PCAP_WARNING_TSTAMP_TYPE_NOTSUP:
 89 |           throw Errors.warningMessage(msg: "the requested time stamp type is not supported")
 90 |         case PCAP_ERROR:
    |              `- error: cannot find 'PCAP_ERROR' in scope
 91 |           throw Errors.errorMessage(msg: "generic error code")
 92 |         case PCAP_ERROR_BREAK:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:92:14: error: cannot find 'PCAP_ERROR_BREAK' in scope
 90 |         case PCAP_ERROR:
 91 |           throw Errors.errorMessage(msg: "generic error code")
 92 |         case PCAP_ERROR_BREAK:
    |              `- error: cannot find 'PCAP_ERROR_BREAK' in scope
 93 |           throw Errors.errorMessage(msg: "loop terminated by pcap_breakloop")
 94 |         case PCAP_ERROR_NOT_ACTIVATED:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:94:14: error: cannot find 'PCAP_ERROR_NOT_ACTIVATED' in scope
 92 |         case PCAP_ERROR_BREAK:
 93 |           throw Errors.errorMessage(msg: "loop terminated by pcap_breakloop")
 94 |         case PCAP_ERROR_NOT_ACTIVATED:
    |              `- error: cannot find 'PCAP_ERROR_NOT_ACTIVATED' in scope
 95 |           throw Errors.errorMessage(msg: "the capture needs to be activated")
 96 |         case PCAP_ERROR_ACTIVATED:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:96:14: error: cannot find 'PCAP_ERROR_ACTIVATED' in scope
 94 |         case PCAP_ERROR_NOT_ACTIVATED:
 95 |           throw Errors.errorMessage(msg: "the capture needs to be activated")
 96 |         case PCAP_ERROR_ACTIVATED:
    |              `- error: cannot find 'PCAP_ERROR_ACTIVATED' in scope
 97 |           throw Errors.errorMessage(msg: "the operation can't be performed on already activated captures")
 98 |         case PCAP_ERROR_NO_SUCH_DEVICE:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:98:14: error: cannot find 'PCAP_ERROR_NO_SUCH_DEVICE' in scope
 96 |         case PCAP_ERROR_ACTIVATED:
 97 |           throw Errors.errorMessage(msg: "the operation can't be performed on already activated captures")
 98 |         case PCAP_ERROR_NO_SUCH_DEVICE:
    |              `- error: cannot find 'PCAP_ERROR_NO_SUCH_DEVICE' in scope
 99 |           throw Errors.errorMessage(msg: "no such device exists")
100 |         case PCAP_ERROR_RFMON_NOTSUP:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:100:14: error: cannot find 'PCAP_ERROR_RFMON_NOTSUP' in scope
 98 |         case PCAP_ERROR_NO_SUCH_DEVICE:
 99 |           throw Errors.errorMessage(msg: "no such device exists")
100 |         case PCAP_ERROR_RFMON_NOTSUP:
    |              `- error: cannot find 'PCAP_ERROR_RFMON_NOTSUP' in scope
101 |           throw Errors.errorMessage(msg: "this device doesn't support rfmon (monitor) mode")
102 |         case PCAP_ERROR_NOT_RFMON:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:102:14: error: cannot find 'PCAP_ERROR_NOT_RFMON' in scope
100 |         case PCAP_ERROR_RFMON_NOTSUP:
101 |           throw Errors.errorMessage(msg: "this device doesn't support rfmon (monitor) mode")
102 |         case PCAP_ERROR_NOT_RFMON:
    |              `- error: cannot find 'PCAP_ERROR_NOT_RFMON' in scope
103 |           throw Errors.errorMessage(msg: "operation supported only in monitor mode")
104 |         case PCAP_ERROR_PERM_DENIED:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:104:14: error: cannot find 'PCAP_ERROR_PERM_DENIED' in scope
102 |         case PCAP_ERROR_NOT_RFMON:
103 |           throw Errors.errorMessage(msg: "operation supported only in monitor mode")
104 |         case PCAP_ERROR_PERM_DENIED:
    |              `- error: cannot find 'PCAP_ERROR_PERM_DENIED' in scope
105 |           throw Errors.errorMessage(msg: "no permission to open the device")
106 |         case PCAP_ERROR_IFACE_NOT_UP:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:106:14: error: cannot find 'PCAP_ERROR_IFACE_NOT_UP' in scope
104 |         case PCAP_ERROR_PERM_DENIED:
105 |           throw Errors.errorMessage(msg: "no permission to open the device")
106 |         case PCAP_ERROR_IFACE_NOT_UP:
    |              `- error: cannot find 'PCAP_ERROR_IFACE_NOT_UP' in scope
107 |           throw Errors.errorMessage(msg: "interface isn't up")
108 |         case PCAP_ERROR_CANTSET_TSTAMP_TYPE:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:108:14: error: cannot find 'PCAP_ERROR_CANTSET_TSTAMP_TYPE' in scope
106 |         case PCAP_ERROR_IFACE_NOT_UP:
107 |           throw Errors.errorMessage(msg: "interface isn't up")
108 |         case PCAP_ERROR_CANTSET_TSTAMP_TYPE:
    |              `- error: cannot find 'PCAP_ERROR_CANTSET_TSTAMP_TYPE' in scope
109 |           throw Errors.errorMessage(msg: "this device doesn't support setting the time stamp type")
110 |         case PCAP_ERROR_PROMISC_PERM_DENIED:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:110:14: error: cannot find 'PCAP_ERROR_PROMISC_PERM_DENIED' in scope
108 |         case PCAP_ERROR_CANTSET_TSTAMP_TYPE:
109 |           throw Errors.errorMessage(msg: "this device doesn't support setting the time stamp type")
110 |         case PCAP_ERROR_PROMISC_PERM_DENIED:
    |              `- error: cannot find 'PCAP_ERROR_PROMISC_PERM_DENIED' in scope
111 |           throw Errors.errorMessage(msg: "you don't have permission to capture in promiscuous mode")
112 |         case PCAP_ERROR_TSTAMP_PRECISION_NOTSUP:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:112:14: error: cannot find 'PCAP_ERROR_TSTAMP_PRECISION_NOTSUP' in scope
110 |         case PCAP_ERROR_PROMISC_PERM_DENIED:
111 |           throw Errors.errorMessage(msg: "you don't have permission to capture in promiscuous mode")
112 |         case PCAP_ERROR_TSTAMP_PRECISION_NOTSUP:
    |              `- error: cannot find 'PCAP_ERROR_TSTAMP_PRECISION_NOTSUP' in scope
113 |           throw Errors.errorMessage(msg: "the requested time stamp precision is not supported")
114 |         default:
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1
android-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:fe1962677657b2408c217cb5cceb3c09bc1d91486e360cebbc6eee461a5945d8
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/5] Compiling SwiftPCAP SwiftPCAPLive.swift
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:37:72: error: cannot find 'PCAP_ERRBUF_SIZE' in scope
35 |         super.init()
36 |         // prepare error buffer for libpcap to use
37 |         let errbuf = UnsafeMutablePointer<Int8>.allocate(capacity: Int(PCAP_ERRBUF_SIZE))
   |                                                                        `- error: cannot find 'PCAP_ERRBUF_SIZE' in scope
38 |
39 |         // create the pcap_t handle for live capture
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:40:22: error: cannot find 'pcap_create' in scope
38 |
39 |         // create the pcap_t handle for live capture
40 |         pcapDevice = pcap_create(interface, errbuf)
   |                      `- error: cannot find 'pcap_create' in scope
41 |
42 |         if (pcapDevice == nil) {
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:57:34: error: cannot find 'pcap_activate' in scope
55 |         // activate the live capture handle
56 |         do {
57 |             try handleReturnCode(pcap_activate(pcapDevice))
   |                                  `- error: cannot find 'pcap_activate' in scope
58 |         }
59 |         catch{
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:80:28: error: cannot find 'pcap_set_buffer_size' in scope
78 |       // libpcap options
79 |       // currently no error handling, may want to add that
80 |       try handleReturnCode(pcap_set_buffer_size(pcapDevice, bufferSize))
   |                            `- error: cannot find 'pcap_set_buffer_size' in scope
81 |       try handleReturnCode(pcap_set_snaplen(pcapDevice, snaplen))
82 |       try handleReturnCode(pcap_set_promisc(pcapDevice, 1))
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:81:28: error: cannot find 'pcap_set_snaplen' in scope
79 |       // currently no error handling, may want to add that
80 |       try handleReturnCode(pcap_set_buffer_size(pcapDevice, bufferSize))
81 |       try handleReturnCode(pcap_set_snaplen(pcapDevice, snaplen))
   |                            `- error: cannot find 'pcap_set_snaplen' in scope
82 |       try handleReturnCode(pcap_set_promisc(pcapDevice, 1))
83 |       try handleReturnCode(pcap_set_timeout(pcapDevice, 1))
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:82:28: error: cannot find 'pcap_set_promisc' in scope
80 |       try handleReturnCode(pcap_set_buffer_size(pcapDevice, bufferSize))
81 |       try handleReturnCode(pcap_set_snaplen(pcapDevice, snaplen))
82 |       try handleReturnCode(pcap_set_promisc(pcapDevice, 1))
   |                            `- error: cannot find 'pcap_set_promisc' in scope
83 |       try handleReturnCode(pcap_set_timeout(pcapDevice, 1))
84 |     }
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPLive.swift:83:28: error: cannot find 'pcap_set_timeout' in scope
81 |       try handleReturnCode(pcap_set_snaplen(pcapDevice, snaplen))
82 |       try handleReturnCode(pcap_set_promisc(pcapDevice, 1))
83 |       try handleReturnCode(pcap_set_timeout(pcapDevice, 1))
   |                            `- error: cannot find 'pcap_set_timeout' in scope
84 |     }
85 |   }
[3/5] Compiling SwiftPCAP SwiftPCAPOffline.swift
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPOffline.swift:26:70: error: cannot find 'PCAP_ERRBUF_SIZE' in scope
24 |
25 |       // prepare error buffer for libpcap to use
26 |       let errbuf = UnsafeMutablePointer<Int8>.allocate(capacity: Int(PCAP_ERRBUF_SIZE))
   |                                                                      `- error: cannot find 'PCAP_ERRBUF_SIZE' in scope
27 |
28 |       // create the pcap_t handle
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAPOffline.swift:29:20: error: cannot find 'pcap_open_offline' in scope
27 |
28 |       // create the pcap_t handle
29 |       pcapDevice = pcap_open_offline(path, errbuf)
   |                    `- error: cannot find 'pcap_open_offline' in scope
30 |
31 |       if (pcapDevice == nil) {
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/5] Emitting module SwiftPCAP
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:34:31: error: cannot find type 'pcap_pkthdr' in scope
 32 |
 33 |     /// packet header
 34 |     public var currentHeader: pcap_pkthdr
    |                               `- error: cannot find type 'pcap_pkthdr' in scope
 35 |
 36 |     /// base class initializer
[5/5] Compiling SwiftPCAP SwiftPCAP.swift
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:34:31: error: cannot find type 'pcap_pkthdr' in scope
 32 |
 33 |     /// packet header
 34 |     public var currentHeader: pcap_pkthdr
    |                               `- error: cannot find type 'pcap_pkthdr' in scope
 35 |
 36 |     /// base class initializer
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:39:38: error: cannot find type 'pcap_pkthdr' in scope
 37 |     init() {
 38 |       // initialize memory for the pcap_pkthdr struct
 39 |       let ptr = UnsafeMutablePointer<pcap_pkthdr>.allocate(capacity: MemoryLayout<pcap_pkthdr>.size)
    |                                      `- error: cannot find type 'pcap_pkthdr' in scope
 40 |       currentHeader = ptr.pointee
 41 |       ptr.deinitialize(count: 1)
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:39:83: error: cannot find type 'pcap_pkthdr' in scope
 37 |     init() {
 38 |       // initialize memory for the pcap_pkthdr struct
 39 |       let ptr = UnsafeMutablePointer<pcap_pkthdr>.allocate(capacity: MemoryLayout<pcap_pkthdr>.size)
    |                                                                                   `- error: cannot find type 'pcap_pkthdr' in scope
 40 |       currentHeader = ptr.pointee
 41 |       ptr.deinitialize(count: 1)
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:51:25: error: cannot find 'pcap_next' in scope
 49 |         // get the next packet, should not block
 50 |
 51 |         guard let pkt = pcap_next(pcapDevice, &currentHeader)
    |                         `- error: cannot find 'pcap_next' in scope
 52 |         else
 53 |         {
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:54:26: error: cannot find 'pcap_geterr' in scope
 52 |         else
 53 |         {
 54 |           if let error = pcap_geterr(pcapDevice)
    |                          `- error: cannot find 'pcap_geterr' in scope
 55 |           {
 56 |               print(error)
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:67:28: error: generic parameter 'Element' could not be inferred
 65 |         }
 66 |
 67 |         let unsafePacket = UnsafeBufferPointer(start: pkt, count: Int(currentHeader.len))
    |                            |- error: generic parameter 'Element' could not be inferred
    |                            `- note: explicitly specify the generic arguments to fix this issue
 68 |         return Data(unsafePacket)
 69 |     }
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:73:7: error: cannot find 'pcap_close' in scope
 71 |     public func close()
 72 |     {
 73 |       pcap_close(pcapDevice)
    |       `- error: cannot find 'pcap_close' in scope
 74 |     }
 75 |
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:84:14: error: cannot find 'PCAP_WARNING' in scope
 82 |       if (rc != 0) {
 83 |         switch rc {
 84 |         case PCAP_WARNING:
    |              `- error: cannot find 'PCAP_WARNING' in scope
 85 |           throw Errors.warningMessage(msg: "generic warning code")
 86 |         case PCAP_WARNING_PROMISC_NOTSUP:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:86:14: error: cannot find 'PCAP_WARNING_PROMISC_NOTSUP' in scope
 84 |         case PCAP_WARNING:
 85 |           throw Errors.warningMessage(msg: "generic warning code")
 86 |         case PCAP_WARNING_PROMISC_NOTSUP:
    |              `- error: cannot find 'PCAP_WARNING_PROMISC_NOTSUP' in scope
 87 |           throw Errors.warningMessage(msg: "this device doesn't support promiscuous mode")
 88 |         case PCAP_WARNING_TSTAMP_TYPE_NOTSUP:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:88:14: error: cannot find 'PCAP_WARNING_TSTAMP_TYPE_NOTSUP' in scope
 86 |         case PCAP_WARNING_PROMISC_NOTSUP:
 87 |           throw Errors.warningMessage(msg: "this device doesn't support promiscuous mode")
 88 |         case PCAP_WARNING_TSTAMP_TYPE_NOTSUP:
    |              `- error: cannot find 'PCAP_WARNING_TSTAMP_TYPE_NOTSUP' in scope
 89 |           throw Errors.warningMessage(msg: "the requested time stamp type is not supported")
 90 |         case PCAP_ERROR:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:90:14: error: cannot find 'PCAP_ERROR' in scope
 88 |         case PCAP_WARNING_TSTAMP_TYPE_NOTSUP:
 89 |           throw Errors.warningMessage(msg: "the requested time stamp type is not supported")
 90 |         case PCAP_ERROR:
    |              `- error: cannot find 'PCAP_ERROR' in scope
 91 |           throw Errors.errorMessage(msg: "generic error code")
 92 |         case PCAP_ERROR_BREAK:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:92:14: error: cannot find 'PCAP_ERROR_BREAK' in scope
 90 |         case PCAP_ERROR:
 91 |           throw Errors.errorMessage(msg: "generic error code")
 92 |         case PCAP_ERROR_BREAK:
    |              `- error: cannot find 'PCAP_ERROR_BREAK' in scope
 93 |           throw Errors.errorMessage(msg: "loop terminated by pcap_breakloop")
 94 |         case PCAP_ERROR_NOT_ACTIVATED:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:94:14: error: cannot find 'PCAP_ERROR_NOT_ACTIVATED' in scope
 92 |         case PCAP_ERROR_BREAK:
 93 |           throw Errors.errorMessage(msg: "loop terminated by pcap_breakloop")
 94 |         case PCAP_ERROR_NOT_ACTIVATED:
    |              `- error: cannot find 'PCAP_ERROR_NOT_ACTIVATED' in scope
 95 |           throw Errors.errorMessage(msg: "the capture needs to be activated")
 96 |         case PCAP_ERROR_ACTIVATED:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:96:14: error: cannot find 'PCAP_ERROR_ACTIVATED' in scope
 94 |         case PCAP_ERROR_NOT_ACTIVATED:
 95 |           throw Errors.errorMessage(msg: "the capture needs to be activated")
 96 |         case PCAP_ERROR_ACTIVATED:
    |              `- error: cannot find 'PCAP_ERROR_ACTIVATED' in scope
 97 |           throw Errors.errorMessage(msg: "the operation can't be performed on already activated captures")
 98 |         case PCAP_ERROR_NO_SUCH_DEVICE:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:98:14: error: cannot find 'PCAP_ERROR_NO_SUCH_DEVICE' in scope
 96 |         case PCAP_ERROR_ACTIVATED:
 97 |           throw Errors.errorMessage(msg: "the operation can't be performed on already activated captures")
 98 |         case PCAP_ERROR_NO_SUCH_DEVICE:
    |              `- error: cannot find 'PCAP_ERROR_NO_SUCH_DEVICE' in scope
 99 |           throw Errors.errorMessage(msg: "no such device exists")
100 |         case PCAP_ERROR_RFMON_NOTSUP:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:100:14: error: cannot find 'PCAP_ERROR_RFMON_NOTSUP' in scope
 98 |         case PCAP_ERROR_NO_SUCH_DEVICE:
 99 |           throw Errors.errorMessage(msg: "no such device exists")
100 |         case PCAP_ERROR_RFMON_NOTSUP:
    |              `- error: cannot find 'PCAP_ERROR_RFMON_NOTSUP' in scope
101 |           throw Errors.errorMessage(msg: "this device doesn't support rfmon (monitor) mode")
102 |         case PCAP_ERROR_NOT_RFMON:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:102:14: error: cannot find 'PCAP_ERROR_NOT_RFMON' in scope
100 |         case PCAP_ERROR_RFMON_NOTSUP:
101 |           throw Errors.errorMessage(msg: "this device doesn't support rfmon (monitor) mode")
102 |         case PCAP_ERROR_NOT_RFMON:
    |              `- error: cannot find 'PCAP_ERROR_NOT_RFMON' in scope
103 |           throw Errors.errorMessage(msg: "operation supported only in monitor mode")
104 |         case PCAP_ERROR_PERM_DENIED:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:104:14: error: cannot find 'PCAP_ERROR_PERM_DENIED' in scope
102 |         case PCAP_ERROR_NOT_RFMON:
103 |           throw Errors.errorMessage(msg: "operation supported only in monitor mode")
104 |         case PCAP_ERROR_PERM_DENIED:
    |              `- error: cannot find 'PCAP_ERROR_PERM_DENIED' in scope
105 |           throw Errors.errorMessage(msg: "no permission to open the device")
106 |         case PCAP_ERROR_IFACE_NOT_UP:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:106:14: error: cannot find 'PCAP_ERROR_IFACE_NOT_UP' in scope
104 |         case PCAP_ERROR_PERM_DENIED:
105 |           throw Errors.errorMessage(msg: "no permission to open the device")
106 |         case PCAP_ERROR_IFACE_NOT_UP:
    |              `- error: cannot find 'PCAP_ERROR_IFACE_NOT_UP' in scope
107 |           throw Errors.errorMessage(msg: "interface isn't up")
108 |         case PCAP_ERROR_CANTSET_TSTAMP_TYPE:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:108:14: error: cannot find 'PCAP_ERROR_CANTSET_TSTAMP_TYPE' in scope
106 |         case PCAP_ERROR_IFACE_NOT_UP:
107 |           throw Errors.errorMessage(msg: "interface isn't up")
108 |         case PCAP_ERROR_CANTSET_TSTAMP_TYPE:
    |              `- error: cannot find 'PCAP_ERROR_CANTSET_TSTAMP_TYPE' in scope
109 |           throw Errors.errorMessage(msg: "this device doesn't support setting the time stamp type")
110 |         case PCAP_ERROR_PROMISC_PERM_DENIED:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:110:14: error: cannot find 'PCAP_ERROR_PROMISC_PERM_DENIED' in scope
108 |         case PCAP_ERROR_CANTSET_TSTAMP_TYPE:
109 |           throw Errors.errorMessage(msg: "this device doesn't support setting the time stamp type")
110 |         case PCAP_ERROR_PROMISC_PERM_DENIED:
    |              `- error: cannot find 'PCAP_ERROR_PROMISC_PERM_DENIED' in scope
111 |           throw Errors.errorMessage(msg: "you don't have permission to capture in promiscuous mode")
112 |         case PCAP_ERROR_TSTAMP_PRECISION_NOTSUP:
/host/spi-builder-workspace/Sources/SwiftPCAP/SwiftPCAP.swift:112:14: error: cannot find 'PCAP_ERROR_TSTAMP_PRECISION_NOTSUP' in scope
110 |         case PCAP_ERROR_PROMISC_PERM_DENIED:
111 |           throw Errors.errorMessage(msg: "you don't have permission to capture in promiscuous mode")
112 |         case PCAP_ERROR_TSTAMP_PRECISION_NOTSUP:
    |              `- error: cannot find 'PCAP_ERROR_TSTAMP_PRECISION_NOTSUP' in scope
113 |           throw Errors.errorMessage(msg: "the requested time stamp precision is not supported")
114 |         default:
BUILD FAILURE 6.1 android