apple / swift-nio-ssl

TLS Support for SwiftNIO, based on BoringSSL.
https://swiftpackageindex.com/apple/swift-nio-ssl/main/documentation/niossl
Apache License 2.0
393 stars 142 forks source link

Swift-Nio-SSL podspec issue #492

Open ayush-yadav001 opened 1 day ago

ayush-yadav001 commented 1 day ago

Hi , Our project still support Cocoapods and addition of PrivacyInfo.xcprivacy will make us to move the latest version of swift nio ssl else it may reject the application . due to that i am trying to create podspec of swift nio ssl with latest version but facing issue while trying to push at private url hosting using pod repo push . After trying so many thing i still facing an error i am posting the podspec and error please help me to create a working podspec.

Pod::Spec.new do |s|
  s.name = 'CNIOBoringSSL'
  s.version = '2.29.0'
  s.license = { :type => 'Apache 2.0', :file => 'LICENSE.txt' }
  s.summary = 'TLS Support for SwiftNIO, based on BoringSSL.'
  s.homepage = 'https://github.com/apple/swift-nio-ssl'
  s.author = 'Apple Inc.'
  s.source = { :git => 'https://github.com/apple/swift-nio-ssl.git', :tag => s.version.to_s }
  s.documentation_url = 'https://apple.github.io/swift-nio-ssl/'
  s.module_name = 'CNIOBoringSSL'

  s.swift_version = '5.4'
  s.cocoapods_version = '>=1.6.0'
  s.ios.deployment_target = '12.0'
  s.osx.deployment_target = '10.13'

  s.compiler_flags = '-D_GNU_SOURCE', '-D_POSIX_C_SOURCE=200112L','-D_DARWIN_C_SOURCE'

  s.source_files = 'Sources/CNIOBoringSSL/**/*.{swift,c,h,cc}'
  s.ios.source_files = 'Sources/CNIOBoringSSL/**/*.S'
  s.osx.source_files = 'Sources/CNIOBoringSSL/**/*.S'
  s.tvos.source_files = 'Sources/CNIOBoringSSL/**/*.S'

  s.public_header_files = 'Sources/CNIOBoringSSL/include/**/*.h'

  s.libraries = 'c++'
  s.pod_target_xcconfig = { 'HEADER_SEARCH_PATHS' => 'Sources/CNIOBoringSSL/include', 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14', 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES' }
end

ERROR

CNIOBoringSSL/Sources/CNIOBoringSSL/ssl/ssl_key_share.cc:28:10: fatal error: 'experimental/CNIOBoringSSL_kyber.h' file not found

Lukasa commented 1 day ago

It’s likely that the header in question hasn’t been included. Check the source files directives to confirm whether that path is actually included.

ayush-yadav001 commented 1 day ago

path for experimental/CNIOBoringSSL_kyber.h is Sources/CNIOBoringSSL/include/experimental/CNIOBoringSSL_kyber.h it should include with this path `s.source_files = 'Sources/CNIOBoringSSL//*.{swift,c,h,cc}'`** am i missing something here?

Lukasa commented 1 day ago

I would expect it to be included, yes. The next question is whether the include path has been set up appropriately. Do you have the compile invocation that failed?