View previous topic :: View next topic |
Author |
Message |
davidbrooke Guru
Joined: 03 Jan 2015 Posts: 341
|
Posted: Wed Aug 02, 2017 6:18 pm Post subject: [SOLVED] Chromium compile error |
|
|
I have reviewed a couple of posts with what looks like the same error for chromium but I don't understand how to resolve the issue.
Here are the other posts:
https://forums.gentoo.org/viewtopic-t-1067024-highlight-chromium.html
https://forums.gentoo.org/viewtopic-t-1064908-highlight-chromium.html
Compile error
Code: | [5509/27197] x86_64-pc-linux-gnu-g++ -MMD -MF obj/third_party/angle/src/vulkan_support/VkLayer_core_validation/core_validation.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XCB_KHX -DVULKAN_NON_CMAKE_BUILD -DSYSCONFDIR=\"/etc\" -DFALLBACK_CONFIG_DIRS=\"/etc/xdg\" -DFALLBACK_DATA_DIRS=\"/usr/local/share:/usr/share\" -DLAYERS_SOURCE_PATH=\"angledata\" -DDEFAULT_VK_LAYERS_PATH=\".\" -DAPI_NAME=\"Vulkan\" -DHAVE_SECURE_GETENV -I../.. -Igen -I../../third_party/vulkan-validation-layers/src/layers -Igen/third_party/angle/src/vulkan_support/angle/vulkan -I../../third_party/vulkan-validation-layers/src/include -I../../third_party/vulkan-validation-layers/src/include -I../../third_party/vulkan-validation-layers/src/loader -Igen/third_party/angle/src/vulkan_support/angle/vulkan -I../../third_party/glslang-angle/src -I../../third_party/spirv-tools-angle/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -m64 -march=x86-64 -pthread -Wall -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fomit-frame-pointer -g0 -fvisibility=hidden -Wno-unused-function -Wno-ignored-attributes -std=gnu++11 -Wno-narrowing -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -march=core-avx2 -O2 -pipe -fno-delete-null-pointer-checks -c ../../third_party/vulkan-validation-layers/src/layers/core_validation.cpp -o obj/third_party/angle/src/vulkan_support/VkLayer_core_validation/core_validation.o
ninja: build stopped: subcommand failed.
* ERROR: www-client/chromium-60.0.3112.78::gentoo failed (compile phase):
* ninja -v -j9 -l0 -C out/Release chrome chromedriver chrome_sandbox failed
*
* Call stack:
* ebuild.sh, line 115: Called src_compile
* environment, line 5201: Called eninja '-C' 'out/Release' 'chrome' 'chromedriver' 'chrome_sandbox'
* environment, line 1785: Called die
* The specific snippet of code:
* "$@" || die "${nonfatal_args[@]}" "${*} failed"
*
* If you need support, post the output of `emerge --info '=www-client/chromium-60.0.3112.78::gentoo'`,
* the complete build log and the output of `emerge -pqv '=www-client/chromium-60.0.3112.78::gentoo'`.
*
* MemTotal: 7825164 kB
* SwapTotal: 3070972 kB
*
* The complete build log is located at '/var/tmp/portage/www-client/chromium-60.0.3112.78/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/www-client/chromium-60.0.3112.78/temp/environment'.
* Working directory: '/var/tmp/portage/www-client/chromium-60.0.3112.78/work/chromium-60.0.3112.78'
* S: '/var/tmp/portage/www-client/chromium-60.0.3112.78/work/chromium-60.0.3112.78'
>>> Failed to emerge www-client/chromium-60.0.3112.78, Log file:
>>> '/var/tmp/portage/www-client/chromium-60.0.3112.78/temp/build.log'
* Messages for package www-client/chromium-60.0.3112.78:
* USER_NS is required for sandbox to work
* Please check to make sure these options are set correctly.
* Failure to do so may cause unexpected problems.
* ERROR: www-client/chromium-60.0.3112.78::gentoo failed (compile phase):
* ninja -v -j9 -l0 -C out/Release chrome chromedriver chrome_sandbox failed
*
* Call stack:
* ebuild.sh, line 115: Called src_compile
* environment, line 5201: Called eninja '-C' 'out/Release' 'chrome' 'chromedriver' 'chrome_sandbox'
* environment, line 1785: Called die
* The specific snippet of code:
* "$@" || die "${nonfatal_args[@]}" "${*} failed"
|
Emerge --info
Code: | ~ $ emerge --info
Portage 2.3.6 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.4, glibc-2.23-r4, 4.9.16-gentoo x86_64)
=================================================================
System uname: Linux-4.9.16-gentoo-x86_64-Intel-R-_Core-TM-_i7-4790K_CPU_@_4.00GHz-with-gentoo-Gentoo-Stable
KiB Mem: 7825164 total, 2782884 free
KiB Swap: 3070972 total, 3070936 free
Timestamp of repository gentoo: Wed, 02 Aug 2017 17:30:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash: 4.3_p48-r1::gentoo
dev-lang/perl: 5.24.1-r2::gentoo
dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake: 3.7.2::gentoo
dev-util/pkgconfig: 0.28-r2::gentoo
sys-apps/baselayout: 2.3::gentoo
sys-apps/openrc: 0.26.3::gentoo
sys-apps/sandbox: 2.10-r3::gentoo
sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo
sys-devel/automake: 1.11.6-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils: 2.26.1::gentoo, 2.28-r2::gentoo
sys-devel/gcc: 4.9.4::gentoo, 5.4.0-r3::gentoo
sys-devel/gcc-config: 1.7.3::gentoo
sys-devel/libtool: 2.4.6-r3::gentoo
sys-devel/make: 4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc: 2.23-r4::gentoo
Repositories:
gentoo
location: /usr/portage
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
fkmclane
location: /var/lib/layman/fkmclane
masters: gentoo
priority: 50
steam-overlay
location: /var/lib/layman/steam-overlay
masters: gentoo
priority: 50
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core-avx2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://mirrors.rit.edu/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cli consolekit cracklib crypt cups cxx dbus dri dts dvdr emboss encode exif fam ffmpeg firefox flac fortran gdbm gif glamor gpm gstreamer gtk gtk3 iconv icu ipv6 jpeg lcms ldap libnotify lightdm mad mng modules mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support readline sdl seccomp session spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vaapi vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
|
Last edited by davidbrooke on Thu Aug 03, 2017 2:58 pm; edited 2 times in total |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31202 Location: here
|
Posted: Wed Aug 02, 2017 6:41 pm Post subject: |
|
|
In chunck of build.log you posted there is no error, you should post full build.log with wgetspaste.
If build.log is too long search chuck with error with keyword "error:". _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
davidbrooke Guru
Joined: 03 Jan 2015 Posts: 341
|
Posted: Wed Aug 02, 2017 6:54 pm Post subject: |
|
|
I'm confused....there is an error in the build log I posted:
Code: | * ERROR: www-client/chromium-60.0.3112.78::gentoo failed (compile phase):
* ninja -v -j9 -l0 -C out/Release chrome chromedriver chrome_sandbox failed |
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31202 Location: here
|
Posted: Wed Aug 02, 2017 7:01 pm Post subject: |
|
|
davidbrooke wrote: | I'm confused....there is an error in the build log I posted:
Code: | * ERROR: www-client/chromium-60.0.3112.78::gentoo failed (compile phase):
* ninja -v -j9 -l0 -C out/Release chrome chromedriver chrome_sandbox failed |
|
This is not the real error, try to find in all build.log "error:" keyword.
For example in your first link posted the real error is
Code: | ../../ui/gfx/linux/client_native_pixmap_dmabuf.cc: In constructor ‘gfx::ClientNativePixmapDmaBuf::ClientNativePixmapDmaBuf(const gfx::NativePixmapHandle&, const gfx::Size&)’:
../../ui/gfx/linux/client_native_pixmap_dmabuf.cc:98:31: error: ‘minor’ cannot be used as a function
minor = minor(buf.st_dev);
^
../../ui/gfx/linux/client_native_pixmap_dmabuf.cc:99:31: error: ‘major’ cannot be used as a function
major = major(buf.st_dev); |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
davidbrooke Guru
Joined: 03 Jan 2015 Posts: 341
|
Posted: Wed Aug 02, 2017 7:02 pm Post subject: |
|
|
Searching the build log I found four other errors but not the one it failed on:
Code: | unused-function -Wno-ignored-attributes -march=core-avx2 -O2 -pipe -c ../../third_party/vulkan-validation-layers/src/loader/debug_report.c -o obj/third_party/angle/src/vulkan_support/vulkan_loader/debug_report.o
../../third_party/vulkan-validation-layers/src/loader/debug_report.c: In function ‘debug_report_create_instance’:
../../third_party/vulkan-validation-layers/src/loader/debug_report.c:50:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
^
../../third_party/vulkan-validation-layers/src/loader/debug_report.c:50:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
../../third_party/vulkan-validation-layers/src/loader/debug_report.c: In function ‘util_CreateDebugReportCallbacks’:
../../third_party/vulkan-validation-layers/src/loader/debug_report.c:235:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (uint32_t i = 0; i < num_callbacks; i++) {
^
../../third_party/vulkan-validation-layers/src/loader/debug_report.c:238:13: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (uint32_t j = 0; j < i; j++) {
^
../../third_party/vulkan-validation-layers/src/loader/debug_report.c: In function ‘util_DestroyDebugReportCallbacks’:
../../third_party/vulkan-validation-layers/src/loader/debug_report.c:249:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (uint32_t i = 0; i < num_callbacks; i++) {
^
../../third_party/vulkan-validation-layers/src/loader/debug_report.c: At top level: |
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31202 Location: here
|
Posted: Wed Aug 02, 2017 7:12 pm Post subject: |
|
|
What's your default compiler? _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
davidbrooke Guru
Joined: 03 Jan 2015 Posts: 341
|
Posted: Wed Aug 02, 2017 7:18 pm Post subject: |
|
|
fedeliallalinea wrote: | What's your default compiler? |
gcc-4.9.4 |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31202 Location: here
|
Posted: Wed Aug 02, 2017 7:22 pm Post subject: |
|
|
The problem is that gcc 4.9 use as default -std=gnu89 and this not allow to declare variable inline on a for loop.
You have two solution, the first is switch to gcc 5.4 while the other is to force gcc 4.9 to use -std=gnu11 with package.env
Code: | # echo -e "CFLAGS=\"\${CFLAGS} -std=gnu11\"\nCXXFLAGS=\"\${CXXFLAGS} -std=gnu11\"" >> /etc/portage/env/force-gnu11.conf
# echo "www-client/chromium force-gnu11.conf" >> /etc/portage/package.env |
EDIT: if you choose switch to gcc 5.4 remember revdep-rebuild for abi change problem (see here) _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
davidbrooke Guru
Joined: 03 Jan 2015 Posts: 341
|
Posted: Wed Aug 02, 2017 8:06 pm Post subject: |
|
|
fedeliallalinea wrote: | The problem is that gcc 4.9 use as default -std=gnu89 and this not allow to declare variable inline on a for loop.
You have two solution, the first is switch to gcc 5.4 while the other is to force gcc 4.9 to use -std=gnu11 with package.env
Code: | # echo -e "CFLAGS=\"\${CFLAGS} -std=gnu11\"\nCXXFLAGS=\"\${CXXFLAGS} -std=gnu11\"" >> /etc/portage/env/force-gnu11.conf
# echo "www-client/chromium force-gnu11.conf" >> /etc/portage/package.env |
EDIT: if you choose switch to gcc 5.4 remember revdep-rebuild for abi change problem (see here) |
The option to force gcc 4.9 to use -std=gnu11 with package.env doesn't work...same errors as before.
I going to wait and re-install Gentoo with GCC 5.4...I don't upgrading....had too many issues in the past.
Thanks for the help. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22447
|
Posted: Thu Aug 03, 2017 1:18 am Post subject: |
|
|
You said it didn't work. Did the instructions provided not cause -std=gnu11 to appear in $CFLAGS or did the addition of the flag not resolve the specific error message you showed above? |
|
Back to top |
|
|
davidbrooke Guru
Joined: 03 Jan 2015 Posts: 341
|
Posted: Thu Aug 03, 2017 2:55 pm Post subject: |
|
|
Hu wrote: | You said it didn't work. Did the instructions provided not cause -std=gnu11 to appear in $CFLAGS or did the addition of the flag not resolve the specific error message you showed above? |
1. Not cause -std=gnu11 to appear in $CFLAGS?
I'm not sure how to do that
2. Did the addition of the flag not resolve the specific error message you showed above?
If the fix was working at the time of the test then yes it didn't resolve the issue.
or
See #1 |
|
Back to top |
|
|
davidbrooke Guru
Joined: 03 Jan 2015 Posts: 341
|
Posted: Thu Aug 03, 2017 2:57 pm Post subject: |
|
|
I reinstalled Gentoo with gcc 5.4 and chromium installed fine.
I'm going to consider this issue resolved.
Thanks to all for the help! |
|
Back to top |
|
|
|