Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 592586

Summary: mail-client/thunderbird-45.2.0: building w/gcc-6: error: 'malloc' was not declared in this scope
Product: Gentoo Linux Reporter: Francesco Turco <fturco>
Component: Current packagesAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED FIXED    
Severity: normal CC: fturco
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1245076
See Also: https://bugs.gentoo.org/show_bug.cgi?id=582446
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 582084    
Attachments: emerge --info
build log for thunderbird-45.2.0 using gcc-6.2.0

Description Francesco Turco 2016-08-31 12:43:52 UTC
Created attachment 444626 [details]
emerge --info

After upgrading to GCC 6.2.0 I cannot build mail-client/thunderbird-45.2.0 anymore.

--------

Example of error message:

In file included from /var/tmp/portage/mail-client/thunderbird-45.2.0/work/thunderbird-45.2.0/tbird/dist/stl_wrappers/cstdlib:34:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/stdlib.h:36,
                 from /var/tmp/portage/mail-client/thunderbird-45.2.0/work/thunderbird-45.2.0/tbird/dist/system_wrappers/stdlib.h:3,
                 from ../../dist/include/mozilla/Assertions.h:43,
                 from ../../dist/include/mozilla/ArrayUtils.h:14,
                 from /var/tmp/portage/mail-client/thunderbird-45.2.0/work/thunderbird-45.2.0/mozilla/mozglue/misc/StackWalk.cpp:9:
../../dist/include/mozilla/mozalloc.h: In function 'void* operator new(size_t, const std::nothrow_t&)':
../../dist/include/mozilla/mozalloc.h:192:28: error: 'malloc' was not declared in this scope
     return malloc_impl(size);
                            ^

-------

# emerge -pv thunderbird

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] mail-client/thunderbird-45.2.0::gentoo  USE="crypt dbus ffmpeg gstreamer jemalloc3 jit ldap minimal pulseaudio startup-notification -bindist -custom-cflags -custom-optimization -debug -gstreamer-0 -hardened -lightning -mozdom (-neon) (-selinux) (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite" L10N="-ar -ast -be -bg -bn-BD -br -ca -cs -cy -da -de -el -en-GB -es-AR -es-ES -et -eu -fi -fr -fy -ga -gd -gl -he -hr -hsb -hu -hy -id -is -it -ja -ko -lt -nb -nl -nn -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -sq -sr -sv -ta-LK -tr -uk -vi -zh-CN -zh-TW" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Comment 1 Francesco Turco 2016-08-31 12:52:09 UTC
Created attachment 444630 [details]
build log for thunderbird-45.2.0 using gcc-6.2.0
Comment 2 Ian Stakenvicius (RETIRED) gentoo-dev 2016-08-31 16:30:57 UTC
Apparently this one has been fixed in the mozilla-48 codebase, which means it will arrive in thunderbird with version 52.0 sometime next year.  I'll see if I can backport the patches though.

Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1245076
Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2016-08-31 19:12:10 UTC
thunderbird-45.3.0 in mozilla-overlay now has a backported patch from upstream which I think should address the issue(s) here.  Please test?
Comment 4 Francesco Turco 2016-08-31 21:25:32 UTC
I just successfully finished building thunderbird-45.3.0 from the mozilla overlay.
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2016-09-01 14:52:40 UTC
Thanks!  I'll integrate this patch into the next release.
Comment 6 Francesco Turco 2016-10-06 14:41:37 UTC
I successfully managed to build mail-client/thunderbird-45.4.0 from the official portage tree with gcc-6.2.0-r1. No user patches were needed.
Comment 7 Ian Stakenvicius (RETIRED) gentoo-dev 2016-10-06 14:43:24 UTC
(In reply to Francesco Turco from comment #6)
> I successfully managed to build mail-client/thunderbird-45.4.0 from the
> official portage tree with gcc-6.2.0-r1. No user patches were needed.

The patch was integrated into thunderbird-45.4.0 is why.  I'm still going to leave this open though due to the segfault at runtime issue and due to the possibility that we will remove the patch in favour of a different fix.
Comment 8 Jory A. Pratt gentoo-dev 2016-10-16 16:21:03 UTC
I have just pushed the gcc-6 compile flag fix for all issues. Thanks for reporting