[Dwarf-Discuss] dsymutil: "could not find referenced DIE" followed by a segmentation fault and other newbie questions

Adrian Prantl aprantl at apple.com
Mon Dec 10 09:55:56 PST 2018



> On Dec 8, 2018, at 6:24 AM, Gil Moses via Dwarf-Discuss <dwarf-discuss at lists.dwarfstd.org> wrote:
> 
> Hi,
> 
> Building with Xcode 7, once in a while I get the following warnings from the dsymutil tool (a few dozens):
> "could not find referenced DIE" 
> Followed be a segmentation fault.
> 
> Adding the verbosity flag, I got detailed information about the DIEs that had the error, e.g.:
> ===========
> while processing /p4client/ProAudio/dev_main/ProAudio/XcodeBuildProducts/Debug/libWaveShell-Common.a(GraphicStream_Utils.o):
> warning: could not find referenced DIE
>    in DIE:
> 
> 0x0001415e:       DW_TAG_imported_declaration [99]  
>                    DW_AT_decl_file [DW_FORM_data1]	("/Applications/Xcode7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types/_time_t.h")
>                    DW_AT_decl_line [DW_FORM_data2]	(20047)
>                    DW_AT_import [DW_FORM_ref4]	(cu + 0x4c4f5254 => {0x4c4f5254})
> ============
> 
> How do I go about understanding the error, what caused it and how to solve it?
> BTW, the lib size being built is around 350MB. Could there be a size issue causing this seg fault?

If you have questions about Apple-specific versions of the various LLVM tools, the best way to get in contact is to file a bugreport on https://bugreport.apple.com/.

The version of dsymutil that you are using (700) is quite old. Is using a newer version from a more recent Xcode an option for you?

> While I'm here, where could I download the full source code of dsymutil? All I found was links to separate files (https://opensource.apple.com/source/clang/clang-700.0.72/src/tools/dsymutil/)

Dsymutil is part of the LLVM project, if you want to build it from source, you'll need to download LLVM and compile the "dsymutil" target. The https://opensource.apple.com/source/clang/clang-700.0.72/src directory you mentioned should contains the entire LLVM project. Instructions for building it can be found here: http://llvm.org/docs/GettingStarted.html.

That said, I would recommend trying a more recent version of dsymutil first.

-- adrian


More information about the Dwarf-Discuss mailing list