[lldb-dev] link error in fedora 18

comicfans44 comicfans44 at gmail.com
Sat Feb 16 21:59:41 PST 2013

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:

      Module (const FileSpec& file_spec,
             const ArchSpec& arch,
             const ConstString *object_name = NULL,
           off_t object_offset = 0);

     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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130217/adf9b734/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: make_verbose.txt
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130217/adf9b734/attachment.txt>

More information about the lldb-dev mailing list