Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 574830 - [mozilla overlay] mail-client/thunderbird-45.0_beta2 fails to compile on amd64-musl due to missing sysctl.h
Summary: [mozilla overlay] mail-client/thunderbird-45.0_beta2 fails to compile on amd6...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2016-02-15 22:21 UTC by tt_1
Modified: 2016-03-03 21:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
compressed build.log (thunderbird-45.0_beta1-missing-sysctl-header.log.gz,178.10 KB, application/gzip)
2016-02-15 22:21 UTC, tt_1
Details
emerge.info (emerge-info,5.06 KB, text/plain)
2016-02-15 22:23 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2016-02-15 22:21:23 UTC
Created attachment 425604 [details]
compressed build.log

I'm getting the following error when compiling the new thunderbird ebuild from the mozilla overlay on amd64 musl. Musl doesn't seem to have sysctl.h 


In file included from [01m[K/var/tmp/portage/mail-client/thunderbird-45.0_beta1/work/thunderbird-45.0b1/mozilla/ipc/chromium/src/third_party/libevent/./arc4random.c:62:0[m[K,
                 from [01m[K/var/tmp/portage/mail-client/thunderbird-45.0_beta1/work/thunderbird-45.0b1/mozilla/ipc/chromium/src/third_party/libevent/evutil_rand.c:104[m[K,
                 from [01m[K/var/tmp/portage/mail-client/thunderbird-45.0_beta1/work/thunderbird-45.0b1/tbird/ipc/chromium/src/third_party/Unified_c_src_third_party0.c:101[m[K:
[01m[K/var/tmp/portage/mail-client/thunderbird-45.0_beta1/work/thunderbird-45.0b1/tbird/dist/system_wrappers/sys/sysctl.h:3:29:[m[K [01;31m[Kfatal error: [m[Ksys/sysctl.h: No such file or directory
 #include_next <sys/sysctl.h>
[01;32m[K                             ^[m[K
compilation terminated.


my useflags are 

[ebuild   R   ~] mail-client/thunderbird-45.0_beta1::mozilla  USE="crypt dbus jemalloc3 minimal -bindist -custom-cflags -custom-optimization -debug -ffmpeg -gstreamer -gstreamer-0 -gtk3 (-hardened) -jit -ldap -lightning -mozdom (-neon) -pulseaudio (-selinux) -startup-notification -system-cairo -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite" LINGUAS="de -ar -ast -be -bg -bn_BD -br -ca -cs -cy -da -el -en_GB -es_AR -es_ES -et -eu -fi -fr -fy_NL -ga_IE -gd -gl -he -hr -hsb -hu -hy_AM -id -is -it -ja -ko -lt -nb_NO -nl -nn_NO -pa_IN -pl -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -sq -sr -sv_SE -ta_LK -tr -uk -vi -zh_CN -zh_TW" 0 KiB
Comment 1 tt_1 2016-02-15 22:23:51 UTC
Created attachment 425606 [details]
emerge.info

output of emerge --info

however thunderbird does compile with USE="system-libevent" instead of using the provided one.
Comment 2 Ian Stakenvicius (RETIRED) gentoo-dev 2016-02-25 17:20:16 UTC
Do you have the same issue with firefox-45 with USE="-system-libevent" ?
Comment 3 tt_1 2016-03-03 09:43:13 UTC
Yes, the compile error is exactly the same with firefox-45.0b8 and USE="-system-libevent" 


In file included from /var/tmp/portage/www-client/firefox-45.0_beta8/work/firefox-45.0b8/ipc/chromium/src/third_party/libevent/./arc4random.c:62:0,
                 from /var/tmp/portage/www-client/firefox-45.0_beta8/work/firefox-45.0b8/ipc/chromium/src/third_party/libevent/evutil_rand.c:104,
                 from /var/tmp/portage/www-client/firefox-45.0_beta8/work/firefox-45.0b8/ff/ipc/chromium/src/third_party/Unified_c_src_third_party0.c:101:
/var/tmp/portage/www-client/firefox-45.0_beta8/work/firefox-45.0b8/ff/dist/system_wrappers/sys/sysctl.h:3:29: fatal error: sys/sysctl.h: No such file or directory
 #include_next <sys/sysctl.h>
                             ^
compilation terminated.
Comment 4 tt_1 2016-03-03 09:44:41 UTC
By the way, this is not the same as #574076 - my system libevent is build with USE="+threads" 

dev-libs/libevent-2.0.22-r2::gentoo was built with the following:
USE="ssl threads -debug -libressl -static-libs -test"
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2016-03-03 12:55:11 UTC
(In reply to tt_1 from comment #4)
> By the way, this is not the same as #574076 - my system libevent is build
> with USE="+threads" 
> 
> dev-libs/libevent-2.0.22-r2::gentoo was built with the following:
> USE="ssl threads -debug -libressl -static-libs -test"

System libevent has nothing to do with this, which is actually the issue here.  Mozilla's build system short-circuits the build of bundled libevent, skipping its configure, and since there's no check for sysctl.h within Mozilla's own configure there's nothing to stop sysctl.h from being #include'd at compile time.

Since hacking the mozilla build system to try and detect the presence of sysctl.h is a rather large job just to allow use of a bundled lib (which is undesirable in the first place) I'll be forcing on the system-libevent use flag in musl profiles for the mozilla packages.
Comment 6 tt_1 2016-03-03 18:47:57 UTC
Yeah, forcing the useflag to be enabled for the musl profile seems to be the best solution. Feel free to close this bug if you have done so.
Comment 7 Ian Stakenvicius (RETIRED) gentoo-dev 2016-03-03 21:27:14 UTC
commit bf795abcad63d3c4747ec8909bdc4697bb3b0e5a
Author: Ian Stakenvicius <axs@gentoo.org>
Date:   Thu Mar 3 15:10:39 2016 -0500

profiles/hardened/musl - package.use.force system-libevent on mozilla packages