ThibaultBee / srtdroid

Secure Reliable Transport (SRT) Protocol for Android
https://ThibaultBee.github.io/srtdroid
Apache License 2.0
91 stars 31 forks source link

openssl_project compiler error #1

Closed xiawenq closed 3 years ago

xiawenq commented 4 years ago

Hi, ThibaultBee, thanks for your good job.

I'm try to build this projiect on my PC, But I can't do it. Android studio reported a error when compiler the openssl project.

I don't know how to check the error message and fix it, could you help me?

SDK Platform-Tools vresion: 29.0.4 SDK Tools version: 26.1.1 NDK version: 20.0.5594570

follow the error message output ` Build command failed. Error while executing process D:\Android\SDK\cmake\3.6.4111459\bin\cmake.exe with arguments {--build D:\git\SRTWrapper\lib.cxx\cmake\debug\armeabi-v7a --target jnisrt} [1/16] Performing configure step for 'openssl_project' FAILED: cmd.exe /C "cd /D D:\git\SRTWrapper\lib.cxx\cmake\debug\armeabi-v7a\openssl_project-prefix\src\openssl_project && "PATH=D:\Android\SDK\ndk\20.0.5594570\toolchains\llvm\prebuilt\windows-x86_64\bin:C:\Program Files (x86)\NetSarang\Xftp 6" "C:\Program Files (x86)\NetSarang\Xshell 6" C:\ProgramData\Oracle\Java\javapath C:\Python27 C:\Python27\Scripts "C:\Program Files\ARM\bin\win_32-pentium" "C:\Program Files (x86)\Intel\iCLS Client" "C:\Program Files\Intel\iCLS Client" C:\Windows\system32 C:\Windows C:\Windows\System32\Wbem C:\Windows\System32\WindowsPowerShell\v1.0 "C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common" "C:\Program Files\Intel\Intel(R) Management Engine Components\DAL" "C:\Program Files\Intel\Intel(R) Management Engine Components\IPT" "C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL" "C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT" "C:\Program Files\doxygen\bin" "C:\Program Files\TortoiseSVN\bin" "C:\Program Files\ARM\RVI\Tools\3.3\106\programs\win_32-pentium" "C:\Program Files\ARM\Utilities\FLEXlm\10.8.5.0\1\win_32-pentium" "C:\Program Files\ARM\RVCT\Programs\4.0\400\win_32-pentium" "C:\Program Files\ARM\RVD\Core\4.0\1106\win_32-pentium\bin" "C:\Program Files\ARM\RVI\GDB\3.3\8" "C:\Program Files\Microsoft VS Code\bin" "D:\Program Files\MATLAB\R2018a\runtime\win64" "D:\Program Files\MATLAB\R2018a\bin" "d:\Program Files\MATLAB\R2015b\runtime\win64" "d:\Program Files\MATLAB\R2015b\bin" "d:\Program Files\MATLAB\R2015b\polyspace\bin" "C:\Program Files (x86)\Paragon Software\ExtFS for Windows" "C:\Program Files\Java\jdk1.8.0_31\bin" "C:\Program Files\Java\jdk1.8.0_31\jre\bin" "C:\Program Files\Microsoft SQL Server\110\Tools\Binn" C:\MinGW\bin "C:\Program Files\Microsoft\Web Platform Installer" "C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0" "C:\Program Files\Microsoft SQL Server\120\Tools\Binn" "C:\Program Files\CMake\bin" "C:\Program Files\Git\cmd" "C:\Program Files\dotnet" "C:\Program Files\LLVM\bin" C:\glo663wb\bin "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\bin" "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\eclipse\jre\bin" C:\Users\xiawq\AppData\Local\Programs\Python\Python36-32 C:\Users\xiaw "C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR" E:\Go\bin E:\texlive\2019\bin\win32 D:\Android\SDK\platform-tools "C:\Program Files\TortoiseGit\bin" "C:\Program Fil" C:\Windows\system32\WindowsPowerShell\v1.0 "C:\Program Files (x86)\NetSarang\Xftp 6" "C:\Program Files (x86)\NetSarang\Xshell 6" C:\ProgramData\Oracle\Java\javapath C:\Python27 C:\Python27\Scripts "C:\Program Files\ARM\bin\win_32-pentium" "C:\Program Files (x86)\Intel\iCLS Client" "C:\Program Files\Intel\iCLS Client" C:\Windows\system32 C:\Windows C:\Windows\System32\Wbem C:\Windows\System32\WindowsPowerShell\v1.0 "C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common" "C:\Program Files\Intel\Intel(R) Management Engine Components\DAL" "C:\Program Files\Intel\Intel(R) Management Engine Components\IPT" "C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL" "C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT" "C:\Program Files\doxygen\bin" "C:\Program Files\TortoiseSVN\bin" "C:\Program Files\ARM\RVI\Tools\3.3\106\programs\win_32-pentium" "C:\Program Files\ARM\Utilities\FLEXlm\10.8.5.0\1\win_32-pentium" "C:\Program Files\ARM\RVCT\Programs\4.0\400\win_32-pentium" "C:\Program Files\ARM\RVD\Core\4.0\1106\win_32-pentium\bin" "C:\Program Files\ARM\RVI\GDB\3.3\8" "C:\Program Files\Microsoft VS Code\bin" "D:\Program Files\MATLAB\R2018a\runtime\win64" "D:\Program Files\MATLAB\R2018a\bin" "d:\Program Files\MATLAB\R2015b\runtime\win64" "d:\Program Files\MATLAB\R2015b\bin" "d:\Program Files\MATLAB\R2015b\polyspace\bin" "C:\Program Files (x86)\Paragon Software\ExtFS for Windows" "C:\Program Files\Java\jdk1.8.0_31\bin" "C:\Program Files\Java\jdk1.8.0_31\jre\bin" "C:\Program Files\Microsoft SQL Server\110\Tools\Binn" C:\MinGW\bin "C:\Program Files\Microsoft\Web Platform Installer" "C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0" "C:\Program Files\Microsoft SQL Server\120\Tools\Binn" "C:\Program Files\CMake\bin" "C:\Program Files\Git\cmd" "C:\Program Files\dotnet" "C:\Program Files\LLVM\bin" C:\glo663wb\bin "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\bin" "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\eclipse\jre\bin" C:\Users\xiawq\AppData\Local\Programs\Python\Python36-32 C:\Users\xiaw "C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR" E:\Go\bin E:\texlive\2019\bin\win32 D:\Android\SDK\platform-tools "C:\Program Files\TortoiseGit\bin" "C:\Program Fil" E:\cuda\10.2\development\libnvvp E:\cuda\10.2\development\bin C:\Users\xiawq\AppData\Local\Programs\Python\Python36-32\Scripts C:\Users\xiawq\AppData\Local\Programs\Python\Python36-32 C:\Users\xiawq\AppData\Local\GitHubDesktop\bin C:\Users\xiawq\go\bin "E:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.3\bin" C:\Users\xiawq.local\bin CC=D:/Android/SDK/ndk/20.0.5594570/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe ANDROID_NDK_HOME=D:/Android/SDK/ndk/20.0.5594570 ./Configure android-arm -D__ANDROID_API__=21 --openssldir=D:\git\SRTWrapper\lib\build\intermediates\cmake\debug\obj\armeabi-v7a --libdir=\"\" --prefix=D:\git\SRTWrapper\lib\build\intermediates\cmake\debug\obj\armeabi-v7a && D:\Android\SDK\cmake\3.6.4111459\bin\cmake.exe -E touch D:/git/SRTWrapper/lib/.cxx/cmake/debug/armeabi-v7a/openssl_project-prefix/src/openssl_project-stamp/openssl_project-configure" �ļ�����Ŀ¼�������﷨����ȷ��

ninja: build stopped: subcommand failed. `

xiawenq commented 4 years ago

I'm try to use ninja instead the make in file lib/src/main/cpp/CMakeLists.txt. But throws the sames error.

And I don't know how to apply the patches file lib/src/main/cpp/patches/0001_srt_cmakefiles.patch. Maybe I must apply the patches first, and then build the project?

ThibaultBee commented 4 years ago

Hi,

You are building on Windows whereas I have been working on Linux only. I will give a try on a Windows VM. Maybe remove the ./ of ./Configure in the project_openssl in the CMakeLists.txt.

For the patch, in srt directory (which is somewhere in a CMake/gradle folder), apply "patch -p0 < lib/src/main/cpp/patches/0001_srt_cmakefiles.patch". Anyway, you don't need the patch to build openssl.

xiawenq commented 4 years ago

Hi,

You are building on Windows whereas I have been working on Linux only. I will give a try on a Windows VM. Maybe remove the ./ of ./Configure in the project_openssl in the CMakeLists.txt.

thanks for your reply and thanks for your help too. Emm, about the solution of remove Configure file in the project_openssl's CMakeLists.txt. I don't understand how to do it. where can i find the Configure file?

ThibaultBee commented 4 years ago

Hi, Do you need to build the project ? Because, if you just need to use it, it now supports jitpack: https://jitpack.io/#ThibaultBee/SRTWrapper/master-SNAPSHOT.

About the Windows build, I didn't find a way to build/install openssl with Ninja. One solution could be to force cmake to use make instead of Ninja.

xiawenq commented 4 years ago

Hi,

Yes, I think I just need to use the library only. thanks your great solution. I will try import jar instead build the project.

About the issue, I always try to fix with you.

ThibaultBee commented 4 years ago

Hi,

I spent lot of times trying to build the project on Windows for Android (especially openssl which is really painfull). Unfortunately, I couldn't make openssl build. You can find my work on: https://github.com/ThibaultBee/SRTWrapper/tree/feature/build_windows The current issue I face this issue:

no NDK arm-linux-androideabi-gcc on $PATH at (eval 11) line 124. Configuring OpenSSL version 1.1.1d (0x1010104fL) for android-arm Using os-specific seed configuration

which("clang") can not find NDK clang which is in the system Path!

Do you have any idea what could be wrong ?

ThibaultBee commented 3 years ago

I am sorry, this is going to be a restriction for a while. I just update build info in README.md in https://github.com/ThibaultBee/srtdroid/commit/f18f81947fcfac3d56f921673b3bc1bedf88f24f

-> Closing this issue