| View previous topic :: View next topic |
| Author |
Message |
V10lator Apprentice


Joined: 11 Jul 2004 Posts: 207
|
Posted: Mon Apr 17, 2017 8:35 pm Post subject: [SOLVED] Can't compile Chromium nor debug the problem |
|
|
My problem is that gn sigsegfaults:
| Code: | Building gn using itself to out/Release...
DEBUG:root:Running: /var/tmp/portage/www-client/chromium-58.0.3029.19/work/temp/tmpKCXR0N/gn gen /var/tmp/portage/www-client/chromium-58.0.3029.19/work/chromium-58.0.3029.19/out/Release --args= is_debug=false is_component_build=false enable_nacl=false enable_hangout_services_extension=false enable_widevine=true use_cups=true use_gconf=false use_gnome_keyring=true use_gtk3=false use_kerberos=false use_pulseaudio=true fieldtrial_testing_like_official_build=true is_clang=false use_gold=false use_sysroot=false linux_use_bundled_binutils=false proprietary_codecs=true ffmpeg_branding="Chrome" google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc" google_default_client_id="329227923882.apps.googleusercontent.com" google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu" treat_warnings_as_errors=false fatal_linker_warnings=false custom_toolchain="/usr/portage/www-client/chromium/files/toolchain:default" use_allocator="none" is_debug=false
Command '['/var/tmp/portage/www-client/chromium-58.0.3029.19/work/temp/tmpKCXR0N/gn', 'gen', '/var/tmp/portage/www-client/chromium-58.0.3029.19/work/chromium-58.0.3029.19/out/Release', '--args= is_debug=false is_component_build=false enable_nacl=false enable_hangout_services_extension=false enable_widevine=true use_cups=true use_gconf=false use_gnome_keyring=true use_gtk3=false use_kerberos=false use_pulseaudio=true fieldtrial_testing_like_official_build=true is_clang=false use_gold=false use_sysroot=false linux_use_bundled_binutils=false proprietary_codecs=true ffmpeg_branding="Chrome" google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc" google_default_client_id="329227923882.apps.googleusercontent.com" google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu" treat_warnings_as_errors=false fatal_linker_warnings=false custom_toolchain="/usr/portage/www-client/chromium/files/toolchain:default" use_allocator="none" is_debug=false']' returned non-zero exit status -11 |
dmesg:
| Code: | | gn[21713]: segfault at 3d4b78aeff0 ip 0000000075c2e6cb sp 000003d4b78aeff0 error 6 in gn[75bf2000+2dc000] |
So I thought "heh, let's add debugging flags, add keepwork to FEATURES and see what's going on". So I did but /var/tmp/portage/www-client/chromium-58.0.3029.19/work/temp/ is still an empty folder.
My question is now: How to keep portage from emtpying /var/tmp/portage/www-client/chromium-58.0.3029.19/work/temp/ so I can do a gdb run with gn?
Last edited by V10lator on Mon Apr 17, 2017 11:32 pm; edited 1 time in total |
|
| Back to top |
|
 |
Jaglover Watchman


Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
| Back to top |
|
 |
V10lator Apprentice


Joined: 11 Jul 2004 Posts: 207
|
Posted: Mon Apr 17, 2017 9:02 pm Post subject: |
|
|
Thanks for the hint but sadly it also doesn't help. I tried:
| Code: | cd /usr/portage/www-client/chromium
ebuild chromium-58.0.3029.19.ebuild configure |
Which fails just like before but after that /var/tmp/portage/www-client/chromium-58.0.3029.19/work/temp/ is still empty. |
|
| Back to top |
|
 |
krinn Watchman


Joined: 02 May 2003 Posts: 7470
|
Posted: Mon Apr 17, 2017 10:21 pm Post subject: |
|
|
I'm unsure what should goes into pkg/pkg-name/work/temp, but most of it is store in pkg/pkg-name/work/pkg-name
So for you it mean you better look into /var/tmp/portage/www-client/chromium-58.0.3029.19/work/chromium-58.0.3029.19 |
|
| Back to top |
|
 |
V10lator Apprentice


Joined: 11 Jul 2004 Posts: 207
|
Posted: Mon Apr 17, 2017 10:30 pm Post subject: |
|
|
@krinn Look at the error messag, esp: Running: /var/tmp/portage/www-client/chromium-58.0.3029.19/work/temp/tmpKCXR0N/gn
The file must be there while portage/ebuild is running, else it couldn't be executed and then sigsegfault, right? But I always get an empty temp folder (not even the tempABCXYZ folder is there).
Anyway, I searched the whole /var/tmp/portage/www-client/chromium-58.0.3029.19/ for the gn executable: It isn't there.
//EDIT: I'm writing my findings here:
First finding: In the ebuild itself is this:
| Code: | # Bug 491582.
export TMPDIR="${WORKDIR}/temp"
mkdir -p -m 755 "${TMPDIR}" || die |
but there's no code to remove anything in there.
Second finding: In the ebuild is also this code:
| Code: | | tools/gn/bootstrap/bootstrap.py -v --gn-gen-args "${myconf_gn} use_allocator=\"none\"" || die |
I think this is exactly the code that fails and deletes the files, so my next step will be to look into it.
Third finding: In that (bootstrap.py) file:
| Code: | """Bootstraps gn.
It is done by first building it manually in a temporary directory, then building
it with its own BUILD.gn to the final destination.
""" |
I think I'm almost there...
Fourth finding:
| Code: | parser.add_option('--no-clean', action='store_true',
help='Re-used build directory instead of using new '
'temporary location each time') |
That looks extremely helpfull. Let's change the ebuild from
| Code: | | tools/gn/bootstrap/bootstrap.py -v --gn-gen-args "${myconf_gn} use_allocator=\"none\"" || die |
to
| Code: | | tools/gn/bootstrap/bootstrap.py -v --gn-gen-args "${myconf_gn} use_allocator=\"none\"" --no-clean || die |
Compiling... Failing... Still an empty temp directory.
Fifth finding:
| Code: | if options.no_clean:
build_dir = os.path.join(SRC_ROOT, 'out_bootstrap')
if not os.path.exists(build_dir):
os.makedirs(build_dir)
return run_build(build_dir, options)
else:
with scoped_tempdir() as tempdir:
return run_build(tempdir, options) |
So it didn't even use the temp dir this time but...
| Code: | $ ls /var/tmp/portage/www-client/chromium-58.0.3029.19/work/chromium-58.0.3029.19/out_bootstrap/
base build.ninja gen gn_lib.a tools
base.a dynamic_annotations.a gn libevent.a xdg_user_dirs.a |
Looks like a win!
//EDIT²: Time to report some bugs:
https://bugs.gentoo.org/show_bug.cgi?id=615902
https://bugs.chromium.org/p/chromium/issues/detail?id=712460 |
|
| Back to top |
|
 |
|