Search code examples
c++gitcmakeamazon-kinesis-video-streams

Error while building dependencies for amazon-kinesis-video-streams-producer-sdk-cpp


While trying to compile amazon-kinesis-video-stream-producer-sdk-cpp Repo, I encountered with the dependencies saying that the file path was too long.

  Checking Build System
  Creating directories for 'project_libopenssl'
  Building Custom Rule C:/SDK/C++/amazon-kinesis-video-streams-producer-sdk-cpp/open-source/local/libopenssl/CMakeLists.txt
  Performing download step (git clone) for 'project_libopenssl'
  Cloning into 'project_libopenssl'...
  Note: switching to 'OpenSSL_1_1_1g'.

  You are in 'detached HEAD' state. You can look around, make experimental
  changes and commit them, and you can discard any commits you make in this
  state without impacting any branches by switching back to a branch.

  If you want to create a new branch to retain commits you create, you may
  do so (now or later) by using -c with the switch command. Example:

    git switch -c <new-branch-name>

  Or undo this operation with:

    git switch -

  Turn off this advice by setting config variable advice.detachedHead to false

  HEAD is now at e2e09d9fba Prepare for 1.1.1g release
  Submodule 'boringssl' (https://boringssl.googlesource.com/boringssl) registered for path 'boringssl'
  Submodule 'krb5' (https://github.com/krb5/krb5) registered for path 'krb5'
  Submodule 'pyca.cryptography' (https://github.com/pyca/cryptography.git) registered for path 'pyca-cryptography'
  Cloning into 'C:/SDK/C++/amazon-kinesis-video-streams-producer-sdk-cpp/open-source/local/libopenssl/build/src/project_libopenssl/boringssl'...
  Cloning into 'C:/SDK/C++/amazon-kinesis-video-streams-producer-sdk-cpp/open-source/local/libopenssl/build/src/project_libopenssl/krb5'...
  Cloning into 'C:/SDK/C++/amazon-kinesis-video-streams-producer-sdk-cpp/open-source/local/libopenssl/build/src/project_libopenssl/pyca-cryptography'...
  Submodule path 'boringssl': checked out '2070f8ad9151dc8f3a73bffaa146b5e6937a583f'
  Submodule path 'krb5': checked out '890ca2f401924cdcb88f493950b04700bbe52db3'
CUSTOMBUILD : error : unable to create file vectors/cryptography_vectors/x509/PKITS_data/certpairs/RolloverfromPrintableStringtoUTF8StringCACertforwardcrossCertificatePair.cp: Filename too long [C:\SDK\C++\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\libopenssl\project_libopenssl.vcxproj]
CUSTOMBUILD : error : unable to create file vectors/cryptography_vectors/x509/PKITS_data/certpairs/RolloverfromPrintableStringtoUTF8StringCACertreversecrossCertificatePair.cp: Filename too long [C:\SDK\C++\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\libopenssl\project_libopenssl.vcxproj]
CUSTOMBUILD : error : unable to create file vectors/cryptography_vectors/x509/PKITS_data/certpairs/SeparateCertificateandCRLKeysCA2CertificateSigningCACertforwardcrossCerificatePair.cp: Filename too long [C:\SDK\C++\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\libopenssl\project_libopenssl.vcxproj]
CUSTOMBUILD : error : unable to create file vectors/cryptography_vectors/x509/PKITS_data/certpairs/SeparateCertificateandCRLKeysCA2CertificateSigningCACertreversecrossCerificatePair.cp: Filename too long [C:\SDK\C++\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\libopenssl\project_libopenssl.vcxproj]
CUSTOMBUILD : error : unable to create file vectors/cryptography_vectors/x509/PKITS_data/certpairs/SeparateCertificateandCRLKeysCertificateSigningCACertforwardcrossCertificatePair.cp: Filename too long [C:\SDK\C++\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\libopenssl\project_libopenssl.vcxproj]
CUSTOMBUILD : error : unable to create file vectors/cryptography_vectors/x509/PKITS_data/certpairs/SeparateCertificateandCRLKeysCertificateSigningCACertreversecrossCertificatePair.cp: Filename too long [C:\SDK\C++\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\libopenssl\project_libopenssl.vcxproj]
CUSTOMBUILD : error : unable to create file vectors/cryptography_vectors/x509/PKITS_data/certpairs/requireExplicitPolicy7subsubsubCARE2RE4CertforwardcrossCertificatePair.cp: Filename too long [C:\SDK\C++\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\libopenssl\project_libopenssl.vcxproj]
CUSTOMBUILD : error : unable to create file vectors/cryptography_vectors/x509/PKITS_data/certpairs/requireExplicitPolicy7subsubsubCARE2RE4CertreversecrossCertificatePair.cp: Filename too long [C:\SDK\C++\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\libopenssl\project_libopenssl.vcxproj]
  Unable to checkout '09403100de2f6f1cdd0d484dcb8e620f1c335c8f' in submodule path 'pyca-cryptography'
  CMake Error at C:/SDK/C++/amazon-kinesis-video-streams-producer-sdk-cpp/open-source/local/libopenssl/build/tmp/project_libopenssl-gitclone.cmake:52 (message):
    Failed to update submodules in:
    'C:/SDK/C++/amazon-kinesis-video-streams-producer-sdk-cpp/open-source/local/libopenssl/build/src/project_libopenssl'


CMake Error at dependency/libkvscproducer/kvscproducer-src/CMake/Utilities.cmake:93 (message):
  CMake step for libopenssl failed: 1
Call Stack (most recent call first):
  dependency/libkvscproducer/kvscproducer-src/CMakeLists.txt:64 (build_dependency)


-- Configuring incomplete, errors occurred!
See also "C:/SDK/C++/amazon-kinesis-video-streams-producer-sdk-cpp/build/CMakeFiles/CMakeOutput.log".

I may have been doing something wrong. Let me know if it could be an issue with the repo and I'll lodge it as an issue there. Thanks in advance.


Solution

  • I think it's about your git configuration. Try to modify git to support long path

    git config --system core.longpaths true
    

    This will allow file paths of 4096 characters.