为 iphoneos 构建 live555 库
building live555 library for iphoneos
我阅读了很多有关为 iOS 平台构建 live555 库的讨论。我成功地使用 ./genMakefiles iphone-simulator
和 make
为模拟器构建了 lib,但无法为设备构建它。 ./genMakefiles iphoneos
没有警告我任何事情,但 运行 make
失败后。它总是产生像 unknown type name …
这样的错误。我用最新的资源尝试了很多次,我也尝试 make clean
在做之前 - 没有帮助。
从日志中我看到一些奇怪的东西,比如 MacOSX
的路径,我认为这是问题的根源,但不确定我应该在脚本中 fix/change让它起作用。
这是完整的日志:
$ make
cd liveMedia ; /Applications/Xcode.app/Contents/Developer/usr/bin/make
/usr/bin/xcrun clang -c -Iinclude -I../UsageEnvironment/include -I../groupsock/include -I. -DBSD=1 -O2 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC -arch armv7 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk -Wall Media.cpp
In file included from Media.cpp:21:
In file included from include/Media.hh:33:
In file included from ../UsageEnvironment/include/UsageEnvironment.hh:28:
In file included from ../groupsock/include/NetCommon.h:94:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/types.h:75:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/cdefs.h:680:2: error:
Unsupported architecture
#error Unsupported architecture
^
In file included from Media.cpp:21:
In file included from include/Media.hh:33:
In file included from ../UsageEnvironment/include/UsageEnvironment.hh:28:
In file included from ../groupsock/include/NetCommon.h:94:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/types.h:78:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/machine/types.h:37:2: error:
architecture not supported
#error architecture not supported
^
In file included from Media.cpp:21:
In file included from include/Media.hh:33:
In file included from ../UsageEnvironment/include/UsageEnvironment.hh:28:
In file included from ../groupsock/include/NetCommon.h:94:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/types.h:79:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/machine/_types.h:34:2: error:
architecture not supported
#error architecture not supported
^
In file included from Media.cpp:21:
In file included from include/Media.hh:33:
In file included from ../UsageEnvironment/include/UsageEnvironment.hh:28:
In file included from ../groupsock/include/NetCommon.h:94:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/types.h:79:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:55:9: error:
unknown type name '__int64_t'
typedef __int64_t __darwin_blkcnt_t; /* total blocks */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:56:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_blksize_t; /* preferred block size */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:57:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_dev_t; /* dev_t */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:60:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:61:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:62:9: error:
unknown type name '__uint64_t'
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:68:9: error:
unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:70:9: error:
unknown type name '__uint16_t'
typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:71:9: error:
unknown type name '__int64_t'
typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:72:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:73:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_sigset_t; /* [???] signal set */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:74:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:75:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_uid_t; /* [???] user IDs */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:76:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
^
In file included from Media.cpp:21:
In file included from include/Media.hh:33:
In file included from ../UsageEnvironment/include/UsageEnvironment.hh:28:
In file included from ../groupsock/include/NetCommon.h:94:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/types.h:81:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/machine/endian.h:37:2: error:
architecture not supported
#error architecture not supported
^
In file included from Media.cpp:21:
In file included from include/Media.hh:33:
In file included from ../UsageEnvironment/include/UsageEnvironment.hh:28:
In file included from ../groupsock/include/NetCommon.h:94:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/types.h:95:9: error:
unknown type name 'u_int64_t'
typedef u_int64_t u_quad_t; /* quads */
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [Media.o] Error 1
make: *** [all] Error 2
我希望有人能帮我解决这个问题。提前致谢!
我想你可以先安装 Xcode 命令行工具。然后重做构建 live555 的所有内容。这对我有用。只需在您的终端中输入 "xcode-select --install" 即可安装。
我阅读了很多有关为 iOS 平台构建 live555 库的讨论。我成功地使用 ./genMakefiles iphone-simulator
和 make
为模拟器构建了 lib,但无法为设备构建它。 ./genMakefiles iphoneos
没有警告我任何事情,但 运行 make
失败后。它总是产生像 unknown type name …
这样的错误。我用最新的资源尝试了很多次,我也尝试 make clean
在做之前 - 没有帮助。
从日志中我看到一些奇怪的东西,比如 MacOSX
的路径,我认为这是问题的根源,但不确定我应该在脚本中 fix/change让它起作用。
这是完整的日志:
$ make
cd liveMedia ; /Applications/Xcode.app/Contents/Developer/usr/bin/make
/usr/bin/xcrun clang -c -Iinclude -I../UsageEnvironment/include -I../groupsock/include -I. -DBSD=1 -O2 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC -arch armv7 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk -Wall Media.cpp
In file included from Media.cpp:21:
In file included from include/Media.hh:33:
In file included from ../UsageEnvironment/include/UsageEnvironment.hh:28:
In file included from ../groupsock/include/NetCommon.h:94:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/types.h:75:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/cdefs.h:680:2: error:
Unsupported architecture
#error Unsupported architecture
^
In file included from Media.cpp:21:
In file included from include/Media.hh:33:
In file included from ../UsageEnvironment/include/UsageEnvironment.hh:28:
In file included from ../groupsock/include/NetCommon.h:94:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/types.h:78:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/machine/types.h:37:2: error:
architecture not supported
#error architecture not supported
^
In file included from Media.cpp:21:
In file included from include/Media.hh:33:
In file included from ../UsageEnvironment/include/UsageEnvironment.hh:28:
In file included from ../groupsock/include/NetCommon.h:94:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/types.h:79:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/machine/_types.h:34:2: error:
architecture not supported
#error architecture not supported
^
In file included from Media.cpp:21:
In file included from include/Media.hh:33:
In file included from ../UsageEnvironment/include/UsageEnvironment.hh:28:
In file included from ../groupsock/include/NetCommon.h:94:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/types.h:79:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:55:9: error:
unknown type name '__int64_t'
typedef __int64_t __darwin_blkcnt_t; /* total blocks */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:56:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_blksize_t; /* preferred block size */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:57:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_dev_t; /* dev_t */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:60:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:61:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:62:9: error:
unknown type name '__uint64_t'
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:68:9: error:
unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:70:9: error:
unknown type name '__uint16_t'
typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:71:9: error:
unknown type name '__int64_t'
typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:72:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:73:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_sigset_t; /* [???] signal set */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:74:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:75:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_uid_t; /* [???] user IDs */
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types.h:76:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
^
In file included from Media.cpp:21:
In file included from include/Media.hh:33:
In file included from ../UsageEnvironment/include/UsageEnvironment.hh:28:
In file included from ../groupsock/include/NetCommon.h:94:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/types.h:81:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/machine/endian.h:37:2: error:
architecture not supported
#error architecture not supported
^
In file included from Media.cpp:21:
In file included from include/Media.hh:33:
In file included from ../UsageEnvironment/include/UsageEnvironment.hh:28:
In file included from ../groupsock/include/NetCommon.h:94:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/types.h:95:9: error:
unknown type name 'u_int64_t'
typedef u_int64_t u_quad_t; /* quads */
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [Media.o] Error 1
make: *** [all] Error 2
我希望有人能帮我解决这个问题。提前致谢!
我想你可以先安装 Xcode 命令行工具。然后重做构建 live555 的所有内容。这对我有用。只需在您的终端中输入 "xcode-select --install" 即可安装。