[lldb-dev] link error in fedora 18

Greg Clayton gclayton at apple.com
Fri Feb 22 14:17:41 PST 2013


We recently defined a "lldb::offset_t" which should be used in place of the bare "off_t" in any current functions. If this works, submit a patch and we will commit it for you.

Greg Clayton

On Feb 16, 2013, at 9:59 PM, comicfans44 <comicfans44 at gmail.com> wrote:

> Hello everyone. This is my first mail list post ,so please forgive my poor Englist or any mistake
> I'm facting the "undefined reference to `lldb_private::FileSpec::ReadFileContents ..." problem
> too ,after some digging , seems like this problem is lead by different typedef of "off_t"
>  
> after compiling FileSpec.o, nm gives:
>  
> 00001b90 T lldb_private::FileSpec::ReadFileContents(long, void*, unsigned int, lldb_private::Error*) const
> 00001d80 T lldb_private::FileSpec::ReadFileContents(long, unsigned int, lldb_private::Error*) const
>  
> but after compiling Host.o ,nm gives:
>  
> U lldb_private::FileSpec::ReadFileContents(long long, void*, unsigned int, lldb_private::Error*) const
>  
> same problem applies on following header too:
>  
> Core/Module.h:
>  
>       Module (const FileSpec& file_spec,
>              const ArchSpec& arch,
>              const ConstString *object_name = NULL,
>            off_t object_offset = 0);
>           
>  
> Symbol/ObjectFile.h:
>         size_t
>      ReadSectionData (const Section *section,
>                       off_t section_offset,
>                       void *dst,
>                       size_t dst_len) const;
>  
> force changing these define from "off_t" to "long" ,lldb compiled and run.
> but I can not assume lldb works OK. and I can not point out why off_t has
> different meaning in different translation unit.
>  
>  
> and this is my build environment:
>  
> llvm svn version: 175324
> clang svn version:175313
> lldb svn version:175378
>  
> build in tree, config with
>  
> ./configure --prefix=/home/my_name/local_install --enable-optimized --enable-targets=x86 CC=gcc CXX=g++
>  
> build host : ubuntu 11.04 32bit, gcc 4.6.3(compiled myself, first append in ${PATH}) ,system gcc: 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
>  
> (compile with clang also has the same problem)
>  
> attachment is the compile command in subdir "lldb/source/Host",
> hopes this can help you
>  
>  
> 本邮件附件清单如下:
>   (1) make_verbose.txt (23.8 K)
> 
> comicfans44,comicfans44 at gmail.com
> 2013-2-17
> <make_verbose.txt>_______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev





More information about the lldb-dev mailing list