[llvm-bugs] [Bug 24480] New: lldb 3.7.0rc2 self-build LTO fails to link on FreeBSD; references undefined JSONArray/String/Object and StreamString

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 17 22:07:49 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24480

            Bug ID: 24480
           Summary: lldb 3.7.0rc2 self-build LTO fails to link on FreeBSD;
                    references undefined JSONArray/String/Object and
                    StreamString
           Product: new-bugs
           Version: 3.7
          Hardware: All
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: greenreaper at hotmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 14734
  --> https://llvm.org/bugs/attachment.cgi?id=14734&action=edit
Full build log for argdumper failure

My system is FreeBSD 10.1-RELEASE-p16 on an Ivy Bridge E3-1225v2. I'm using the
llvm37 FreeBSD port which downloaded the 3.7.0rc2 build from Git.  The port
applies a few patches but they're just backported fixes for OpenMP on Blender.
https://svnweb.freebsd.org/ports/head/devel/llvm37/

FreeBSD's Makefile offers to build individual components of llvm. I with all
options enabled using the following options in /etc/make.conf: 

CPUTYPE?=ivybridge

CFLAGS+=-O3
CXXFLAGS+=-Wno-deprecated -O3
LDFLAGS+=-fuse-ld=gold -v

However, when I add -flto to CFLAGS, CXXFLAGS and LDFLAGS, the linking of
argdumper fails with the following error messages:

/tmp/lto-llvm-70e76e.o:ld-temp.o:function main: error: undefined reference to
'lldb_private::JSONArray::JSONArray()'
/tmp/lto-llvm-70e76e.o:ld-temp.o:function main: error: undefined reference to
'lldb_private::JSONString::JSONString(char const*)'
/tmp/lto-llvm-70e76e.o:ld-temp.o:function main: error: undefined reference to
'lldb_private::JSONArray::AppendObject(std::__1::shared_ptr<lldb_private::JSONValue>)'
/tmp/lto-llvm-70e76e.o:ld-temp.o:function main: error: undefined reference to
'lldb_private::JSONObject::JSONObject()'
/tmp/lto-llvm-70e76e.o:ld-temp.o:function main: error: undefined reference to
'lldb_private::JSONObject::SetObject(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&,
std::__1::shared_ptr<lldb_private::JSONValue>)'
/tmp/lto-llvm-70e76e.o:ld-temp.o:function main: error: undefined reference to
'lldb_private::StreamString::StreamString()'
/tmp/lto-llvm-70e76e.o:ld-temp.o:function main: error: undefined reference to
'lldb_private::StreamString::GetData() const'
/tmp/lto-llvm-70e76e.o:ld-temp.o:function main: error: undefined reference to
'lldb_private::StreamString::~StreamString()'

I see this about r241522 - Make the "lldb/Utility/JSON.h" able to parse JSON
into tokens with the new JSONParser class.
http://lists.llvm.org/pipermail/lldb-commits/Week-of-Mon-20150706/020208.html

Perhaps there is a file that isn't known or available to the linker plugin on
FreeBSD but is on other platforms?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150818/e2c691b8/attachment.html>


More information about the llvm-bugs mailing list