Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c Xcode警告:无法打开OSO文件_Objective C_Xcode_Ffmpeg_Gdb_Dwarf - Fatal编程技术网

Objective c Xcode警告:无法打开OSO文件

Objective c Xcode警告:无法打开OSO文件,objective-c,xcode,ffmpeg,gdb,dwarf,Objective C,Xcode,Ffmpeg,Gdb,Dwarf,我将我的Xcode项目中的ffmpeg动态库升级到了一个新版本,现在当我运行我的应用程序时,我在Xcode控制台窗口中得到了所有这些警告。知道我为什么要买这些吗 提前谢谢 这是一个缩写版本,但你会明白的 warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/4xm.o" more recent than executable timestamp in "/Users/username/Library/Develop

我将我的Xcode项目中的ffmpeg动态库升级到了一个新版本,现在当我运行我的应用程序时,我在Xcode控制台窗口中得到了所有这些警告。知道我为什么要买这些吗

提前谢谢

这是一个缩写版本,但你会明白的

warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/4xm.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/4xm.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/8bps.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/8bps.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/8svx.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/8svx.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/a64multienc.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/a64multienc.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aac_ac3_parser.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aac_ac3_parser.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aac_adtstoasc_bsf.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aac_adtstoasc_bsf.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aac_parser.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aac_parser.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aacadtsdec.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aacadtsdec.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aaccoder.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aaccoder.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aacdec.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aacdec.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aacenc.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aacenc.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aacps.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aacps.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aacpsy.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aacpsy.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aacsbr.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aacsbr.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aactab.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aactab.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aandcttab.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aandcttab.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aasc.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/aasc.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3_parser.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3_parser.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3dec.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3dec.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3dec_data.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3dec_data.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3dsp.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3dsp.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3enc.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3enc.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3enc_combined.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3enc_combined.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3enc_fixed.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3enc_fixed.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3enc_float.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3enc_float.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3tab.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/ac3tab.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/acelp_filters.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/acelp_filters.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib
warning: .o file "/Users/username/Downloads/ffmpeg-0.8.5/libavcodec/acelp_pitch_delay.o" more recent than executable timestamp in "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib"
warning: Could not open OSO file /Users/username/Downloads/ffmpeg-0.8.5/libavcodec/acelp_pitch_delay.o to scan for pubtypes for objfile /Users/username/Library/Developer/Xcode/DerivedData/MyApp-cjpuovfvlxckuddiuysbbosqgbsj/Build/Products/Debug/MyProject.framework/Versions/A/Libraries/libavcodec.dylib

当我看到这一点时,我经常发现clean and rebuild会修复警告。

我已经容忍gdb中的这种“无法打开OSO文件”输出几个星期了。随意的谷歌搜索总是让我回到这里

@kakyo的答案(尝试重建)是可行的,但我想知道更多

基本(众所周知的?)背景信息:在构建过程中生成“o”文件和“dylib”文件。“o”文件包含调试信息。但是,当链接器链接“o”文件以创建“动态库”时,该调试信息不会放入结果动态库中

警告宣布“o”文件上的时间戳比“dylib”上的时间戳更新。实际上,这种区别非常重要,警告将“o”文件的时间与动态库中的时间戳进行比较。您可以使用以下命令在动态库中查看与OSO相关的时间戳:

bash_提示符$nm-ap libavcodec.dylib | grep OSO
00000000 560D913F-03 0001 OSO/Downloads/ffmpeg-0.8.5/libavcodec/4xm.o
00000000 560D913F-03 0001 OSO/Downloads/ffmpeg-0.8.5/libavcodec/8bps.o
00000000 560D913E-03 0001 OSO/Downloads/ffmpeg-0.8.5/libavcodec/8svx.o
00000000 560D913E-03 0001 OSO/Downloads/ffmpeg-0.8.5/libavcodec/a64multienc.o
00000000 560D9140-03 0001 OSO/Downloads/ffmpeg-0.8.5/libavcodec/aac_parser.o
00000000 560D9141-03 0001 OSO/Downloads/ffmpeg-0.8.5/libavcodec/aaccorder.o
请注意:第一列中的十六进制值是时间戳

GDB(调试器)在动态库中记录的路径上查找o文件,然后GDB检查时间戳

此时间戳检查功能最明显的用例如下所示:

  • 您的产品(比方说,您公司的“旗舰应用程序”)在应用程序包中附带了一些第三方动态库(如ffmpeg动态库)
  • 在GDB下启动应用程序,应用程序将加载第三方动态库
  • 哎呀!您的应用程序包包含过期的
    第三方.dylib
    。实际上,您昨天构建了一个新的
    第三方.dylib
    (它生成了一个新的dylib和新的“o”文件)。这些新的第三方项目都在“
    ~/third\u party/other\u文件夹
    ”中,您忘记将最新的
    third\u party.dylib
    复制到应用程序包中
  • 假设
    第三方.dylib
    始终构建在同一个(project external)目录中,那么这些时间戳检查是提醒您注意上述“Oops!”的一种方法。您过期的
    third\u party.dylib
    (应用程序包中的副本)的“OSO”条目指向“
    ~/third\u/other\u folder/someclass.o
    ”,但调试器提醒您“
    ~/third\u party/other\u folder/someclass.o
    ”最近已重新编译,您似乎没有使用与最新编译对应的动态库

    有趣的琐事:错误显示“比可执行时间戳更近”[重点是我的]——但这并不总是正确的!如果时间戳比dylib OSO条目预期的时间戳新或旧,则会出现错误。当严格的时间戳相等测试失败时,会出现此错误。在此处查看相关的gdb源代码:

    最后注意:要实际解决“无法打开OSO”错误,请返回到

    如何中和“无法打开OSO”并强制加载“o”:
    免责声明:您不应该这样做:)


    ,错误消息告诉您调试信息是动态库的错误信息

    然而,如果出于某种奇怪的原因,您认为您的“o”文件(尽管它们可能带有错误的时间戳)确实包含正确的信息,并且您需要将它们加载到gdb中,那么继续

    对于下面的示例代码,我假设一个名为
    abcdefg.o
    的o文件和一个名为
    lib_jklmnop.dylib


    第一步。运行以下命令:

    nm-ap lib_jklmnop.dylib | grep OSO | awk'{printf(“%s%s\n”),toupper($1),$0)}
    
    输出应包含:

    00000000560D902C 00000000560d902c - 03 0001   OSO /some/file/path/abcdefg.o
    
    注意:您必须找到一个包含“abcdefg.o”的输出行。我们正在修复一个文件的OSO警告:abcdefg.o,因此如果您不使用与该文件对应的时间戳,那么下面的步骤就没有意义了

    第二步。取第一列中的十六进制数(本例中为560D902C),通过python运行,如下所示:

    echo导入日期时间\;t=datetime.datetime.fromtimestamp\(0x560D902C\)\;打印\(t.strftime \(\'%Y%m%d%H%m.%S\')\)\(python3
    
    (这一步可以使用perl或其他工具。Python似乎是可访问和可移植的,用于演示目的。)上面将使用“0x560D902C”并生成格式化的时间戳:201510011257.32

    第三步。使用从第2步获得的格式化时间戳,运行
    touch
    命令更改abcdefg.o上的时间戳:

    touch-t 201510011257.32 abcdefg.o
    
    现在,“o”上的时间戳与动态库中的OSO条目匹配。GDB将加载这个“o”文件

    (面向后代:在Mac OS X 10.8.5上测试,GNU gdb 6.3.50-20050815苹果版gdb-1824)

    建议阅读:


    看起来我只有在ffmpeg源上运行“make clean”时才会收到此消息