shaka-project / shaka-packager

A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
https://shaka-project.github.io/shaka-packager/
Other
2.01k stars 512 forks source link

Error building shaka packager in windows 10 #1385

Closed serena13 closed 7 months ago

serena13 commented 7 months ago

System info

Operating System: Windows 10 Shaka Packager Version: latest

Issue and steps to reproduce the problem

Following steps at: https://github.com/shaka-project/shaka-packager/blob/main/docs/source/build_instructions.md

Extra steps to reproduce the problem? (1) git clone --recurse-submodules https://github.com/shaka-project/shaka-packager.git (2) Visual Studio 2022 -> Developer Command Prompt -> "cmake -B build"

What is the expected result? Build successful

What happens instead? CMake Error at packager/tools/CMakeLists.txt:12 (message): Failed to generate Packager license notice

**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.7.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************

C:\Users\localadmin\Downloads\shaka-packager>cmake -B build

-- Building for: Visual Studio 17 2022
-- The C compiler identification is MSVC 19.37.32824.0
-- The CXX compiler identification is MSVC 19.37.32824.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17 - Success
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX20
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX20 - Failed
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Looking for res_servicename
-- Looking for res_servicename - not found
-- Looking for res_servicename in resolv
-- Looking for res_servicename in resolv - not found
-- Looking for gethostbyname
-- Looking for gethostbyname - not found
-- Looking for gethostbyname in nsl
-- Looking for gethostbyname in nsl - not found
-- Looking for gethostbyname in socket
-- Looking for gethostbyname in socket - not found
-- Looking for gethostbyname in network
-- Looking for gethostbyname in network - not found
-- Looking for socket
-- Looking for socket - not found
-- Looking for socket in socket
-- Looking for socket in socket - not found
-- Looking for clock_gettime
-- Looking for clock_gettime - not found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - not found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for include file sys/random.h
-- Looking for include file sys/random.h - not found
-- Looking for include file sys/socket.h
-- Looking for include file sys/socket.h - not found
-- Looking for include file sys/sockio.h
-- Looking for include file sys/sockio.h - not found
-- Looking for include file arpa/inet.h
-- Looking for include file arpa/inet.h - not found
-- Looking for include file arpa/nameser_compat.h
-- Looking for include file arpa/nameser_compat.h - not found
-- Looking for include file arpa/nameser.h
-- Looking for include file arpa/nameser.h - not found
-- Looking for include file assert.h
-- Looking for include file assert.h - found
-- Looking for include file errno.h
-- Looking for include file errno.h - found
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file limits.h
-- Looking for include file limits.h - found
-- Looking for include file malloc.h
-- Looking for include file malloc.h - found
-- Looking for include file memory.h
-- Looking for include file memory.h - found
-- Looking for include file netdb.h
-- Looking for include file netdb.h - not found
-- Looking for include file netinet/in.h
-- Looking for include file netinet/in.h - not found
-- Looking for include file net/if.h
-- Looking for include file net/if.h - not found
-- Looking for include file signal.h
-- Looking for include file signal.h - found
-- Looking for include file socket.h
-- Looking for include file socket.h - not found
-- Looking for include file stdbool.h
-- Looking for include file stdbool.h - found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file stdlib.h
-- Looking for include file stdlib.h - found
-- Looking for include file strings.h
-- Looking for include file strings.h - not found
-- Looking for include file string.h
-- Looking for include file string.h - found
-- Looking for include file stropts.h
-- Looking for include file stropts.h - not found
-- Looking for include file sys/ioctl.h
-- Looking for include file sys/ioctl.h - not found
-- Looking for include file sys/param.h
-- Looking for include file sys/param.h - not found
-- Looking for include file sys/select.h
-- Looking for include file sys/select.h - not found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - not found
-- Looking for include file sys/uio.h
-- Looking for include file sys/uio.h - not found
-- Looking for include file time.h
-- Looking for include file time.h - found
-- Looking for include file dlfcn.h
-- Looking for include file dlfcn.h - not found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - not found
-- Looking for include files sys/types.h, netinet/tcp.h
-- Looking for include files sys/types.h, netinet/tcp.h - not found
-- Looking for include files winsock2.h, windows.h
-- Looking for include files winsock2.h, windows.h - found
-- Looking for 3 include files winsock2.h, ..., windows.h
-- Looking for 3 include files winsock2.h, ..., windows.h - found
-- Looking for include files winsock.h, windows.h
-- Looking for include files winsock.h, windows.h - found
-- Looking for include file windows.h
-- Looking for include file windows.h - found
-- Performing Test HAVE_SOCKLEN_T
-- Performing Test HAVE_SOCKLEN_T - Success
-- Performing Test HAVE_TYPE_SOCKET
-- Performing Test HAVE_TYPE_SOCKET - Success
-- Performing Test HAVE_BOOL_T
-- Performing Test HAVE_BOOL_T - Success
-- Performing Test HAVE_SSIZE_T
-- Performing Test HAVE_SSIZE_T - Failed
-- Performing Test HAVE_LONGLONG
-- Performing Test HAVE_LONGLONG - Success
-- Performing Test HAVE_SIG_ATOMIC_T
-- Performing Test HAVE_SIG_ATOMIC_T - Success
-- Performing Test HAVE_STRUCT_ADDRINFO
-- Performing Test HAVE_STRUCT_ADDRINFO - Success
-- Performing Test HAVE_STRUCT_IN6_ADDR
-- Performing Test HAVE_STRUCT_IN6_ADDR - Success
-- Performing Test HAVE_STRUCT_SOCKADDR_IN6
-- Performing Test HAVE_STRUCT_SOCKADDR_IN6 - Success
-- Performing Test HAVE_STRUCT_SOCKADDR_STORAGE
-- Performing Test HAVE_STRUCT_SOCKADDR_STORAGE - Success
-- Performing Test HAVE_STRUCT_TIMEVAL
-- Performing Test HAVE_STRUCT_TIMEVAL - Success
-- Looking for AF_INET6
-- Looking for AF_INET6 - found
-- Looking for O_NONBLOCK
-- Looking for O_NONBLOCK - not found
-- Looking for FIONBIO
-- Looking for FIONBIO - found
-- Looking for SIOCGIFADDR
-- Looking for SIOCGIFADDR - not found
-- Looking for MSG_NOSIGNAL
-- Looking for MSG_NOSIGNAL - not found
-- Looking for PF_INET6
-- Looking for PF_INET6 - found
-- Looking for SO_NONBLOCK
-- Looking for SO_NONBLOCK - not found
-- Looking for CLOCK_MONOTONIC
-- Looking for CLOCK_MONOTONIC - not found
-- Performing Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
-- Performing Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - Success
-- Performing Test HAVE_LL
-- Performing Test HAVE_LL - Success
-- Looking for bitncmp
-- Looking for bitncmp - not found
-- Looking for closesocket
-- Looking for closesocket - found
-- Looking for CloseSocket
-- Looking for CloseSocket - not found
-- Looking for connect
-- Looking for connect - found
-- Looking for fcntl
-- Looking for fcntl - not found
-- Looking for freeaddrinfo
-- Looking for freeaddrinfo - found
-- Looking for getaddrinfo
-- Looking for getaddrinfo - found
-- Looking for getenv
-- Looking for getenv - found
-- Looking for gethostbyaddr
-- Looking for gethostbyaddr - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for gethostname
-- Looking for gethostname - found
-- Looking for getnameinfo
-- Looking for getnameinfo - found
-- Looking for getrandom
-- Looking for getrandom - not found
-- Looking for getservbyport_r
-- Looking for getservbyport_r - not found
-- Looking for getservbyname_r
-- Looking for getservbyname_r - not found
-- Looking for gettimeofday
-- Looking for gettimeofday - not found
-- Looking for if_indextoname
-- Looking for if_indextoname - not found
-- Looking for inet_net_pton
-- Looking for inet_net_pton - not found
-- Looking for ioctl
-- Looking for ioctl - not found
-- Looking for ioctlsocket
-- Looking for ioctlsocket - found
-- Looking for IoctlSocket
-- Looking for IoctlSocket - not found
-- Looking for recv
-- Looking for recv - found
-- Looking for recvfrom
-- Looking for recvfrom - found
-- Looking for send
-- Looking for send - found
-- Looking for setsockopt
-- Looking for setsockopt - found
-- Looking for socket
-- Looking for socket - found
-- Looking for strcasecmp
-- Looking for strcasecmp - not found
-- Looking for strcmpi
-- Looking for strcmpi - found
-- Looking for strdup
-- Looking for strdup - found
-- Looking for stricmp
-- Looking for stricmp - found
-- Looking for strncasecmp
-- Looking for strncasecmp - not found
-- Looking for strncmpi
-- Looking for strncmpi - not found
-- Looking for strnicmp
-- Looking for strnicmp - found
-- Looking for writev
-- Looking for writev - not found
-- Looking for arc4random_buf
-- Looking for arc4random_buf - not found
-- Looking for __system_property_get
-- Looking for __system_property_get - not found
-- curl version=[7.83.1-DEV]
-- Could NOT find Perl (missing: PERL_EXECUTABLE)
-- Looking for getch in ws2_32;
-- Looking for getch in ws2_32; - found
-- Looking for getch in winmm;ws2_32
-- Looking for getch in winmm;ws2_32 - found
-- Looking for cldap_open in wldap32;winmm;ws2_32
-- Looking for cldap_open in wldap32;winmm;ws2_32 - found
-- Looking for include file winldap.h
-- Looking for include file winldap.h - not found
-- Looking for include file winber.h
-- Looking for include file winber.h - not found
-- Looking for include file ldap_ssl.h
-- Looking for include file ldap_ssl.h - not found
-- Looking for include file ldapssl.h
-- Looking for include file ldapssl.h - not found
-- Looking for 4 include files windows.h, ..., wincrypt.h
-- Looking for 4 include files windows.h, ..., wincrypt.h - found
-- Looking for 5 include files windows.h, ..., stdio.h
-- Looking for 5 include files windows.h, ..., stdio.h - found
-- Looking for 6 include files windows.h, ..., sys/filio.h
-- Looking for 6 include files windows.h, ..., sys/filio.h - not found
-- Looking for 6 include files windows.h, ..., sys/resource.h
-- Looking for 6 include files windows.h, ..., sys/resource.h - not found
-- Looking for 8 include files windows.h, ..., sys/un.h
-- Looking for 8 include files windows.h, ..., sys/un.h - not found
-- Looking for 9 include files windows.h, ..., sys/xattr.h
-- Looking for 9 include files windows.h, ..., sys/xattr.h - not found
-- Looking for 9 include files windows.h, ..., arpa/tftp.h
-- Looking for 9 include files windows.h, ..., arpa/tftp.h - not found
-- Looking for 12 include files windows.h, ..., idn2.h
-- Looking for 12 include files windows.h, ..., idn2.h - not found
-- Looking for 12 include files windows.h, ..., ifaddrs.h
-- Looking for 12 include files windows.h, ..., ifaddrs.h - not found
-- Looking for 13 include files windows.h, ..., krb.h
-- Looking for 13 include files windows.h, ..., krb.h - not found
-- Looking for 13 include files windows.h, ..., libgen.h
-- Looking for 13 include files windows.h, ..., libgen.h - not found
-- Looking for 13 include files windows.h, ..., locale.h
-- Looking for 13 include files windows.h, ..., locale.h - found
-- Looking for linux/tcp.h
-- Looking for linux/tcp.h - not found
-- Looking for 14 include files windows.h, ..., pem.h
-- Looking for 14 include files windows.h, ..., pem.h - not found
-- Looking for 14 include files windows.h, ..., poll.h
-- Looking for 14 include files windows.h, ..., poll.h - not found
-- Looking for 16 include files windows.h, ..., ssl.h
-- Looking for 16 include files windows.h, ..., ssl.h - not found
-- Looking for 22 include files windows.h, ..., stddef.h
-- Looking for 22 include files windows.h, ..., stddef.h - found
-- Looking for 25 include files windows.h, ..., sys/utsname.h
-- Looking for 25 include files windows.h, ..., sys/utsname.h - not found
-- Check size of size_t
-- Check size of size_t - done
-- Check size of ssize_t
-- Check size of ssize_t - failed
-- Check size of long long
-- Check size of long long - done
-- Check size of long
-- Check size of long - done
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of __int64
-- Check size of __int64 - done
-- Check size of time_t
-- Check size of time_t - done
-- Looking for basename
-- Looking for basename - not found
-- Looking for alarm
-- Looking for alarm - not found
-- Looking for getppid
-- Looking for getppid - not found
-- Looking for utimes
-- Looking for utimes - not found
-- Looking for getpwuid_r
-- Looking for getpwuid_r - not found
-- Looking for usleep
-- Looking for usleep - not found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for _strtoi64
-- Looking for _strtoi64 - found
-- Looking for strerror_r
-- Looking for strerror_r - not found
-- Looking for siginterrupt
-- Looking for siginterrupt - not found
-- Looking for pipe
-- Looking for pipe - not found
-- Looking for ftruncate
-- Looking for ftruncate - not found
-- Looking for getprotobyname
-- Looking for getprotobyname - found
-- Looking for getpeername
-- Looking for getpeername - found
-- Looking for getsockname
-- Looking for getsockname - found
-- Looking for if_nametoindex
-- Looking for if_nametoindex - not found
-- Looking for getrlimit
-- Looking for getrlimit - not found
-- Looking for setlocale
-- Looking for setlocale - found
-- Looking for setmode
-- Looking for setmode - found
-- Looking for setrlimit
-- Looking for setrlimit - not found
-- Looking for mach_absolute_time
-- Looking for mach_absolute_time - not found
-- Looking for inet_pton
-- Looking for inet_pton - found
-- Looking for fsetxattr
-- Looking for fsetxattr - not found
-- Check size of sa_family_t
-- Check size of sa_family_t - failed
-- Check size of ADDRESS_FAMILY
-- Check size of ADDRESS_FAMILY - failed
-- Performing Curl Test HAVE_FCNTL_O_NONBLOCK
-- Performing Curl Test HAVE_FCNTL_O_NONBLOCK - Failed
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL_FIONBIO
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL_FIONBIO - Failed
-- Performing Curl Test HAVE_IOCTLSOCKET_FIONBIO
-- Performing Curl Test HAVE_IOCTLSOCKET_FIONBIO - Success
-- Performing Curl Test HAVE_IOCTL_FIONBIO
-- Performing Curl Test HAVE_IOCTL_FIONBIO - Failed
-- Performing Curl Test HAVE_SETSOCKOPT_SO_NONBLOCK
-- Performing Curl Test HAVE_SETSOCKOPT_SO_NONBLOCK - Failed
-- Performing Curl Test HAVE_FILE_OFFSET_BITS
-- Performing Curl Test HAVE_FILE_OFFSET_BITS - Failed
-- Performing Curl Test HAVE_VARIADIC_MACROS_C99
-- Performing Curl Test HAVE_VARIADIC_MACROS_C99 - Success
-- Performing Curl Test HAVE_VARIADIC_MACROS_GCC
-- Performing Curl Test HAVE_VARIADIC_MACROS_GCC - Failed
-- Check size of off_t
-- Check size of off_t - done
-- Check size of curl_off_t
-- Check size of curl_off_t - done
-- Performing Curl Test HAVE_GLIBC_STRERROR_R
-- Performing Curl Test HAVE_GLIBC_STRERROR_R - Failed
-- Performing Curl Test HAVE_POSIX_STRERROR_R
-- Performing Curl Test HAVE_POSIX_STRERROR_R - Failed
-- Performing Curl Test HAVE_BUILTIN_AVAILABLE
-- Performing Curl Test HAVE_BUILTIN_AVAILABLE - Failed
-- Performing Test curl_cv_recv
-- Performing Test curl_cv_recv - Success
-- Performing Test curl_cv_func_recv_test
-- Performing Test curl_cv_func_recv_test - Success
-- Tested: int recv(SOCKET, char *, int, int)
-- Performing Test curl_cv_send
-- Performing Test curl_cv_send - Success
-- Performing Test curl_cv_func_send_test
-- Performing Test curl_cv_func_send_test - Success
-- Tested: int send(SOCKET, const char *, int, int)
-- Check size of struct sockaddr_storage
-- Check size of struct sockaddr_storage - done
-- Performing Test HAVE_POLL_FINE
-- Performing Test HAVE_POLL_FINE - Failed
-- Looking for CryptAcquireContext
-- Looking for CryptAcquireContext - found
-- Enabled features: SSL IPv6 unixsockets AsynchDNS Largefile SSPI alt-svc HSTS SPNEGO Kerberos NTLM
-- Enabled protocols: DICT FILE FTP FTPS GOPHER GOPHERS HTTP HTTPS IMAP IMAPS LDAP MQTT POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP
-- Enabled SSL backends: Schannel
-- Found Python: C:/Python312/python3.exe (found version "3.12.3") found components: Interpreter
-- Using the multi-header code from C:/Users/localadmin/Downloads/shaka-packager/packager/third_party/json/source/include/
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe
-- Performing Test HAVE_LD_VERSION_SCRIPT
-- Performing Test HAVE_LD_VERSION_SCRIPT - Failed
-- Performing Test HAVE_SOLARIS_LD_VERSION_SCRIPT
-- Performing Test HAVE_SOLARIS_LD_VERSION_SCRIPT - Failed
Checking CXX compiler flag support for: /W4
-- Performing Test CXX_FLAG_SUPPORTED
-- Performing Test CXX_FLAG_SUPPORTED - Success
Checking CXX compiler flag support for: /wd4996
-- Performing Test CXX_FLAG_SUPPORTED
-- Performing Test CXX_FLAG_SUPPORTED - Success
Checking CXX compiler flag support for: /WX
-- Performing Test CXX_FLAG_SUPPORTED
-- Performing Test CXX_FLAG_SUPPORTED - Success
-- Found Python3: C:/Python312/python3.exe (found version "3.12.3") found components: Interpreter
Could not find platform independent libraries <prefix>
Could not find platform independent libraries <prefix>
Hardlink created for C:\Users\localadmin\Downloads\shaka-packager\build\packager\third_party\mbedtls\source\library\error.c <<===>> C:\Users\localadmin\Downloads\shaka-packager\packager\third_party\mbedtls\source\library\error.c
Hardlink created for C:\Users\localadmin\Downloads\shaka-packager\build\packager\third_party\mbedtls\source\library\version_features.c <<===>> C:\Users\localadmin\Downloads\shaka-packager\packager\third_party\mbedtls\source\library\version_features.c
Hardlink created for C:\Users\localadmin\Downloads\shaka-packager\build\packager\third_party\mbedtls\source\library\ssl_debug_helpers_generated.c <<===>> C:\Users\localadmin\Downloads\shaka-packager\packager\third_party\mbedtls\source\library\ssl_debug_helpers_generated.c
Hardlink created for C:\Users\localadmin\Downloads\shaka-packager\build\packager\third_party\mbedtls\source\library\ssl_debug_helpers_generated.h <<===>> C:\Users\localadmin\Downloads\shaka-packager\packager\third_party\mbedtls\source\library\ssl_debug_helpers_generated.h
--
-- No build type selected, default to: Release
-- Override standard malloc (MI_OVERRIDE=ON)
-- Use the C++ compiler to compile (MI_USE_CXX=ON)
--
-- Library base name: mimalloc
-- Version          : 2.1
-- Build type       : release
-- C++ Compiler     : C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe
-- Compiler flags   : /Zc:__cplusplus
-- Compiler defines :
-- Link libraries   : psapi;shell32;user32;advapi32;bcrypt
-- Build targets    : object
--
--
-- 25.2.0
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT - Failed
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
CMake Error at packager/tools/CMakeLists.txt:12 (message):
  Failed to generate Packager license notice

-- Configuring incomplete, errors occurred!

C:\Users\localadmin\Downloads\shaka-packager>
serena13 commented 7 months ago

I solved it by changing the following lines:

execute_process(
    COMMAND python3

by the following:

find_package(Python3 COMPONENTS Interpreter)
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})

execute_process(
    COMMAND "${PYTHON_EXECUTABLE}"

in the following files:

shaka-packager\packager\tools\CMakeLists.txt
shaka-packager\packager\version\CMakeLists.txt
joeyparrish commented 7 months ago

Thanks @serena13. We will incorporate those changes into #1381 (https://github.com/shaka-project/shaka-packager/pull/1381#discussion_r1566283886)