Bug 168978 - mail/thunderbird: /base/nsStackWalk.cpp:1196:29: error: use of undeclared identifier '_Unwind_Backtrace' _Unwind_Reason_Code t = _Unwind_Backtrace(unwind_callback, &info);
Summary: mail/thunderbird: /base/nsStackWalk.cpp:1196:29: error: use of undeclared ide...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-gecko (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-12 14:40 UTC by O. Hartmann
Modified: 2012-07-27 14:27 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2012-06-12 14:40:03 UTC
The update/compiling/installing of port mail/thunderbird fails using CLANG and GCC with the following error.
Amongst other compilation errors of the new thunderbird 13 on both FreeBSD 10 and 9-STABLE (both most recent compiled worlds), with port graphics/blender installed, which depends on port devel/libunwind, the compilation of thunderbird-13.0 gets confused and breaks.

The same is with www/firefox (12 and 13 tried and confirmed).

[...]
clang++ -o FunctionTimer.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers -include ../../config/gcc_hidden.h -DMOZ_GLUE_IN_PROGRAM -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DSTATIC_EXPORTABLE_JS_API -DMOZ_THUNDERBIRD=1 -DOSTYPE=\"FreeBSD10\" -DOSARCH=FreeBSD -DEXCLUDE_SKIA_DEPENDENCIES  -DOS_LINUX=1 -DOS_POSIX=1  -D_IMPL_NS_COM -I../../ipc/chromium/src -I../../ipc/glue -I../../ipc/ipdl/_ipdlheaders  -I./../build -I../../xpcom/ds  -I. -I. -I../../dist/include -I../../dist/include/nsprpub  -I/usr/local/include/nspr -I/usr/ports/mail/thunderbird/work/comm-release/mozilla/dist/include/nss      -fPIC -Qunused-arguments -I/usr/local/include -fno-rtti -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wn
 o-unknown-warning-option -Wno-return-type-c-linkage -O3 -pipe -fno-strict-aliasing -DLDAP_DEPRECATED -march=native -DLDAP_DEPRECATED -fno-exceptions -fno-strict-aliasing -std=gnu++0x -ffunction-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED -fno-omit-frame-pointer  -D_THREAD_SAFE -D_REENTRANT -I/usr/local/include/gtk-2.0 -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng15 -I/usr/local/include/libdrm -I/usr/local/include/gtk-unix-print-2.0    -Qunused-arguments     -I/usr/local/include -DMOZILLA_CLIENT -include ../../mozilla-config.h /usr/ports/mail/thunderbird/work/comm-release/mozilla/xpcom/base/FunctionTimer.cpp
/usr/ports/mail/thunderbird/work/comm-release/mozilla/xpcom/base/nsStackWalk.cpp:1196:29: error: use of undeclared identifier '_Unwind_Backtrace'
    _Unwind_Reason_Code t = _Unwind_Backtrace(unwind_callback, &info);
[...]

Fix: 

One can get rid of this specific problem by temporary deinstall devel/libunwind.
How-To-Repeat: Install graphics/blender (which reels in devel/libunwind)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-06-12 23:29:29 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gecko

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 O. Hartmann 2012-06-14 07:07:02 UTC
Deleting port devel/libunwind by force and subsequently trying to
recompile/update port www/firefox ends up in the following error
message. In /etc/src.conf, I use

WITH_LIBCPLUSPLUS=      YES

[...]
clang++ -o nsDirPrefs.o -c -I../../../mozilla/dist/stl_wrappers
-I../../../mozilla/dist/system_wrappers -include
../../../mozilla/config/gcc_hidden.h -DMOZ_LDAP_XPCOM
-DMOZ_GLUE_IN_PROGRAM -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM
-DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET
-DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DMOZ_THUNDERBIRD=1
-DOSTYPE=\"FreeBSD10\" -DOSARCH=FreeBSD  -I. -I.
-I../../../mozilla/dist/include -I../../../mozilla/dist/include/nsprpub
 -I/usr/local/include/nspr
-I/usr/ports/mail/thunderbird/work/comm-release/mozilla/dist/include/nss
     -fPIC -I/usr/local/include -fno-rtti -fno-exceptions -Wall
-Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy
-Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof
-Wno-variadic-macros -Werror=return-type -pipe -O3 -fno-strict-aliasing
-march=native -fno-strict-aliasing -std=gnu++0x -pipe  -DNDEBUG
-DTRIMMED -fno-omit-frame-pointer   -I/usr/local/include
-DMOZILLA_CLIENT -include ../../../comm-config.h nsDirPrefs.cpp
nsDirPrefs.cpp:119:1: warning: delete called on 'DirPrefObserver' that
has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
NS_IMPL_ISUPPORTS2(DirPrefObserver, nsISupportsWeakReference, nsIObserver)
^
../../../mozilla/dist/include/nsISupportsImpl.h:1182:3: note: expanded
from macro 'NS_IMPL_ISUPPORTS2'
  NS_IMPL_RELEASE(_class)
      \
  ^
../../../mozilla/dist/include/nsISupportsImpl.h:471:40: note: expanded
from macro 'NS_IMPL_RELEASE'
  NS_IMPL_RELEASE_WITH_DESTROY(_class, delete (this))
                                       ^
../../../mozilla/dist/include/nsISupportsImpl.h:451:5: note: expanded
from macro 'NS_IMPL_RELEASE_WITH_DESTROY'
    _destroy;
      \
    ^
nsDirPrefs.cpp:404:9: error: case value evaluates to 2147483649, which
cannot be narrowed to type 'PRInt32' (aka 'int') [-Wc++11-narrowing]
   case DIR_POS_DELETE:
        ^
nsDirPrefs.cpp:96:44: note: expanded from macro 'DIR_POS_DELETE'
#define DIR_POS_DELETE                     0x80000001
                                           ^
nsDirPrefs.cpp:378:9: error: case value evaluates to 2147483648, which
cannot be narrowed to type 'PRInt32' (aka 'int') [-Wc++11-narrowing]
   case DIR_POS_APPEND:
        ^
nsDirPrefs.cpp:95:44: note: expanded from macro 'DIR_POS_APPEND'
#define DIR_POS_APPEND                     0x80000000
                                           ^
1 warning and 2 errors generated.
gmake[6]: *** [nsDirPrefs.o] Error 1
gmake[6]: Leaving directory
`/usr/ports/mail/thunderbird/work/comm-release/mailnews/addrbook/src'
gmake[5]: *** [src_libs] Error 2
gmake[5]: Leaving directory
`/usr/ports/mail/thunderbird/work/comm-release/mailnews/addrbook'
gmake[4]: *** [addrbook_libs] Error 2
gmake[4]: *** Waiting for unfinished jobs....
nsMsgSearchNews.cpp
clang++ -o nsMsgSearchNews.o -c -I../../../../mozilla/dist/stl_wrappers
-I../../../../mozilla/dist/system_wrappers -include
../../../../mozilla/config/gcc_hidden.h -DMOZ_GLUE_IN_PROGRAM
-DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API
-D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET
-DIMPL_THEBES  -DMOZ_THUNDERBIRD=1 -DOSTYPE=\"FreeBSD10\"
-DOSARCH=FreeBSD  -I. -I. -I../../../../mozilla/dist/include
-I../../../../mozilla/dist/include/nsprpub  -I/usr/local/include/nspr
-I/usr/ports/mail/thunderbird/work/comm-release/mozilla/dist/include/nss
     -fPIC -I/usr/local/include -fno-rtti -fno-exceptions -Wall
-Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy
-Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof
-Wno-variadic-macros -Werror=return-type -pipe -O3 -fno-strict-aliasing
-march=native -fno-strict-aliasing -std=gnu++0x -pipe  -DNDEBUG
-DTRIMMED -fno-omit-frame-pointer   -I/usr/local/include
-DMOZILLA_CLIENT -include ../../../../comm-config.h nsMsgSearchNews.cpp
rm -f libmsgsearch_s.a
/usr/local/bin/python2.7 ../../../../mozilla/config/pythonpath.py
-I../../../../mozilla/config
../../../../mozilla/config/expandlibs_gen.py nsMsgFilterService.o
nsMsgFilterList.o nsMsgFilter.o nsMsgSearchTerm.o nsMsgBodyHandler.o
nsMsgLocalSearch.o nsMsgSearchValue.o nsMsgSearchAdapter.o
nsMsgSearchSession.o nsMsgImapSearch.o nsMsgSearchNews.o   >
libmsgsearch_s.a.desc
/usr/ports/mail/thunderbird/work/comm-release/mozilla/config/nsinstall
-R -m 644 nsMsgTraitService.js nsMsgTraitService.manifest
../../../../mozilla/dist/bin/components
/usr/local/bin/python2.7 ../../../../mozilla/config/buildlist.py
../../../../mozilla/dist/bin/chrome.manifest "manifest
components/nsMsgTraitService.manifest"
/usr/ports/mail/thunderbird/work/comm-release/mozilla/config/nsinstall
-R Bogofilter.sfd DSPAM.sfd POPFile.sfd SpamAssassin.sfd SpamPal.sfd
../../../../mozilla/dist/bin/isp
gmake[5]: Leaving directory
`/usr/ports/mail/thunderbird/work/comm-release/mailnews/base/search/src'
gmake[4]: Leaving directory
`/usr/ports/mail/thunderbird/work/comm-release/mailnews'
gmake[3]: *** [libs_tier_platform] Error 2
gmake[3]: Leaving directory
`/usr/ports/mail/thunderbird/work/comm-release/mozilla'
gmake[2]: *** [tier_platform] Error 2
gmake[2]: Leaving directory
`/usr/ports/mail/thunderbird/work/comm-release/mozilla'
gmake[1]: *** [default] Error 2
gmake[1]: Leaving directory
`/usr/ports/mail/thunderbird/work/comm-release/mozilla'
gmake: *** [default] Error 2
*** [do-build] Error code 1

Stop in /usr/ports/mail/thunderbird.
*** [build] Error code 1

Stop in /usr/ports/mail/thunderbird.

===>>> make failed for mail/thunderbird
===>>> Aborting update

===>>> Update for mail/thunderbird failed
===>>> Aborting update

Terminated
[...]
Comment 3 Jan Beich freebsd_committer freebsd_triage 2012-06-14 13:11:18 UTC
"O. Hartmann" <ohartman@zedat.fu-berlin.de> writes:

> Deleting port devel/libunwind by force and subsequently trying to
> recompile/update port www/firefox ends up in the following error
> message. In /etc/src.conf, I use
>
> WITH_LIBCPLUSPLUS=      YES

It's unused unless you build with -stdlib=libc++.
http://wiki.freebsd.org/NewC++Stack

>
> [...]
> clang++ -o nsDirPrefs.o -c -I../../../mozilla/dist/stl_wrappers
[...]
> nsDirPrefs.cpp:404:9: error: case value evaluates to 2147483649, which
> cannot be narrowed to type 'PRInt32' (aka 'int') [-Wc++11-narrowing]
>    case DIR_POS_DELETE:
>         ^
> nsDirPrefs.cpp:96:44: note: expanded from macro 'DIR_POS_DELETE'
> #define DIR_POS_DELETE                     0x80000001
>                                            ^
> nsDirPrefs.cpp:378:9: error: case value evaluates to 2147483648, which
> cannot be narrowed to type 'PRInt32' (aka 'int') [-Wc++11-narrowing]
>    case DIR_POS_APPEND:
>         ^
> nsDirPrefs.cpp:95:44: note: expanded from macro 'DIR_POS_APPEND'
> #define DIR_POS_APPEND                     0x80000000
>                                            ^

thunderbird is known to be currently broken with clang.
http://lists.freebsd.org/pipermail/freebsd-gecko/2012-June/002273.html
Comment 4 Florian Smeets freebsd_committer freebsd_triage 2012-07-27 14:27:16 UTC
State Changed
From-To: open->closed

Should be fixed in the latest version