New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 604389 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

sys-libs/db doesn't emerge due to C++ exception

Project Member Reported by fs...@chromium.org, Apr 18 2016

Issue description

If you try to do:

emerge-guado db

you end up with:
libtool: compile:  x86_64-cros-linux-gnu-gcc -B/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.25.51 -c -I. -I/build/guado/tmp/portage/sys-libs/db-4.7.25_p4-r5/work/db-4.7.25/build_unix/../dist/.. -D_GNU_SOURCE -D_REENTRANT -O2 -pipe -O2 -pipe -march=corei7 -g -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -clang-syntax /build/guado/tmp/portage/sys-libs/db-4.7.25_p4-r5/work/db-4.7.25/build_unix/../dist/../db_checkpoint/db_checkpoint.c  -fPIC -DPIC -o .libs/db_checkpoint.o
/build/guado/tmp/portage/sys-libs/db-4.7.25_p4-r5/work/db-4.7.25/build_unix/../dist/../rpc_server/c/db_server_proc.c:643:6: warning: assigning to 'u_int8_t *'
      (aka 'unsigned char *') from 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        gid = replyp->gid.gid_val;
            ^ ~~~~~~~~~~~~~~~~~~~
/build/guado/tmp/portage/sys-libs/db-4.7.25_p4-r5/work/db-4.7.25/build_unix/../dist/../cxx/cxx_env.cpp:589:5: error: cannot use 'throw' with exceptions disabled
                                throw dl_except;
                                ^


This is due to ChromeOS adding "-fno-exception" by default to CXX_FLAGS (I really can't think for the life of me why this makes any sense).

sys-libs/db is a dependency on net-proxy/squid, being added to the Pedra board, so this needs to be fixed.

One solution that works is calling cros_enable_cxx_exceptions on the ebuild.

I've tried to add a third_party/chromiumos-overlay/chromeos/config/env/sys-libs/db file that does the same, which seems to be the current solution for it, but it doesn't seem to do anything. Help?

 
Cc: vapier@chromium.org
you can try to rename 
cros_pre_src_prepare_enable_cxx_exceptions
to 
cros_pre_src_compile_enable_cxx_exceptions

to make it work.

Adding @vapier for more comments.


Comment 2 by fs...@chromium.org, Apr 18 2016

Status: Started (was: Available)
This solves it. Thanks so much. I'll update the cl and add you. So config/env is only applied to the env of each command? Damn. There goes a day of my life I'll never get back.

Comment 3 by vapier@chromium.org, Apr 18 2016

they're applied at the phase that the function name says to.
cros_pre_src_prepare_enable_cxx_exceptions says to run before src_prepare.
cros_pre_src_compile_enable_cxx_exceptions says to run before src_compile.

if you read this ebuild, it's EAPI=0, so there is no src_prepare phase, only src_compile.  we don't execute hooks for phases that don't exist.
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/45df1fa72dd6e4c559daacd370a5a3ec56a8eed1

commit 45df1fa72dd6e4c559daacd370a5a3ec56a8eed1
Author: Fernando Serboncini <fserb@google.com>
Date: Fri Apr 15 17:50:04 2016

Fixes cxx compilation of sys-libs/db

BUG= chromium:604389 
TEST=Manual emerge

Change-Id: Ie202931ec7183bf10ee0ea6106d02c2e0c6eb86d
Reviewed-on: https://chromium-review.googlesource.com/339230
Commit-Ready: Fernando Serboncini <fserb@chromium.org>
Tested-by: Fernando Serboncini <fserb@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[add] https://crrev.com/45df1fa72dd6e4c559daacd370a5a3ec56a8eed1/chromeos/config/env/sys-libs/db

Comment 5 by fs...@chromium.org, Apr 21 2016

Status: Fixed (was: Started)

Sign in to add a comment