libxul.so: hidden symbol `_Unwind_Backtrace' isn't defined

RESOLVED FIXED in mozilla29

Status

defect
RESOLVED FIXED
6 years ago
2 years ago

People

(Reporter: jbeich, Assigned: jbeich)

Tracking

unspecified
mozilla29

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

I've tried to build m-c with clang trunk, and it fails because, unlike base clang[1], non-base clang installs unwind.h. The same error would likely occur with libunwind installed, too. We do have another unwind.h copy from libcxxrt but it's C++-only header.

I probably didn't fix it in bug 781457 because gcc_hidden.h (aka pragma visibility) was auto-disabled on FreeBSD at the time.

[1] http://svnweb.freebsd.org/changeset/base/241214

29:08.60 libxul.so
31:40.67 Executing: clang++ -Qunused-arguments -I/usr/local/include -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-mismatched-tags -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -std=gnu++0x -pipe -DNDEBUG -DTRIMMED -g -O -fomit-frame-pointer -fPIC -shared -Wl,-z,defs -Wl,-h,libxul.so -o libxul.so obj-x86_64-unknown-freebsd11.0/toolkit/library/tmp18_Ufh.list -pthread -L/usr/local/lib -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -Wl,-rpath-link,obj-x86_64-unknown-freebsd11.0/dist/bin -Wl,-rpath-link,/usr/local/lib ../../xpcom/typelib/xpt/src/libxpt.a ../../intl/unicharutil/util/internal/libintl_unicharutil_util_internal.a -L../../dist/bin -L../../dist/lib ../../dist/lib/libjs_static.a -L../../dist/bin -L../../dist/lib -lcrmf -lsmime3 -lssl3 -lnss3 -lnssutil3 -lXrender ../../dist/lib/libmozsqlite3.so -L/usr/local/lib -lasound -L../../dist/bin -L../../dist/lib -Lobj-x86_64-unknown-freebsd11.0/dist/lib -lnspr4 -lplc4 -lplds4 ../../dist/lib/libmozalloc.so -lgtk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lpango-1.0 -lgio-2.0 -lfontconfig -lfreetype -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lXfixes -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lcairo -pthread -lX11 -L/usr/local/lib -lXext -lX11 -lXext -lpangoft2-1.0 -lfontconfig -lfreetype -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lintl -L/usr/local/lib -lcairo -pthread -lXt -lgthread-2.0 -L/usr/local/lib -lfreetype -lfontconfig -L/usr/local/lib -lfreetype -Wl,--warn-unresolved-symbols -lkvm -lutil
[...]
31:41.08 ../../xpcom/base/Unified_cpp_xpcom_base1.o: In function `NS_StackWalk':
31:41.08 xpcom/base/nsStackWalk.cpp:1280: undefined reference to `_Unwind_Backtrace'
31:41.08 ../../xpcom/base/Unified_cpp_xpcom_base1.o: In function `unwind_callback(_Unwind_Context*, void*)':
31:41.08 xpcom/base/nsStackWalk.cpp:1243: undefined reference to `_Unwind_GetIP'
31:41.08 ../../xpcom/base/Unified_cpp_xpcom_base1.o: In function `NS_StackWalk':
31:41.08 xpcom/base/nsStackWalk.cpp:1280: undefined reference to `_Unwind_Backtrace'
31:41.08 xpcom/base/nsStackWalk.cpp:1280: undefined reference to `_Unwind_Backtrace'
31:41.08 xpcom/base/nsStackWalk.cpp:1280: undefined reference to `_Unwind_Backtrace'
31:41.08 xpcom/base/nsStackWalk.cpp:1280: undefined reference to `_Unwind_Backtrace'
31:41.08 xpcom/base/nsStackWalk.cpp:1280: undefined reference to `_Unwind_Backtrace'
31:41.08 ../../xpcom/base/Unified_cpp_xpcom_base1.o:xpcom/base/nsStackWalk.cpp:1280: more undefined references to `_Unwind_Backtrace' follow
31:41.08 ../../ipc/chromium/process_util_bsd.o: In function `base::LaunchApp(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::vector<std::__1::pair<int, int>, std::__1::allocator<std::__1::pair<int, int> > > const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&, base::ChildPrivileges, bool, int*, base::ProcessArchitecture)':
31:41.08 ipc/chromium/src/base/process_util_bsd.cc:124: warning: undefined reference to `environ'
31:41.08 ipc/chromium/src/base/process_util_bsd.cc:124: warning: undefined reference to `environ'
31:41.08 ../../dom/asmjscache/AsmJSCache.o: In function `mozilla::dom::asmjscache::CloseEntryForWrite(JS::Handle<JSObject*>, unsigned long, unsigned char*, long)':
31:41.08 dom/asmjscache/AsmJSCache.cpp:1514: warning: undefined reference to `PR_SyncMemMap'
31:41.08 /usr/local/bin/ld: libxul.so: hidden symbol `_Unwind_Backtrace' isn't defined
31:41.08 /usr/local/bin/ld: final link failed: Bad value
31:41.08 clang-3.5: error: linker command failed with exit code 1 (use -v to see invocation)
31:41.08 gmake[5]: *** [libxul.so] Error 1
On clang -stdlib=libc++ platforms C++-mode unwind.h comes from libcxxrt while C-mode unwind.h comes from clang. Let's check the copy Mozilla code would actually use.

r?bsmedberg if you think bug 326594 reviewer is more appropriate here.
Attachment #8362655 - Flags: review?(mh+mozilla)
Attachment #8362628 - Flags: review?(mh+mozilla)
Attachment #8362628 - Flags: review?(mh+mozilla) → review+
Attachment #8362655 - Flags: review?(mh+mozilla) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/d93e210ab3db
https://hg.mozilla.org/mozilla-central/rev/d0bcf67cd2d9
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.